Skip to content

surface_object

SurfaceObject

Bases: PolydataObject

selected_paths = [] instance-attribute

selected_point_ids = [] instance-attribute

__init__()

catch_event(picked_point_id, event=None, key=None, **kwargs)

Catch mouse button events.

Parameters:

Name Type Description Default
picked_point_id int

Picked point ID

required
event str

Mouse event name

None
key str

Currently pressed key name

None
**kwargs dict

Additional kwargs, for compability

{}

Returns:

Name Type Description
list list

Actors to represent selected object

close_loop()

Close loop on pressed L-key and Right Mouse Button.

Returns:

Name Type Description
list list[SphereGlyph | TubeObject]

Actors to show closed loop

hide_edges()

Hide edges of the surface.

select_loop(point_id)

Finds shortest path between last and current selected points Makes TubeObject to show selected loop lines.

Parameters:

Name Type Description Default
point_id int

Selected point's ID

required

Returns:

Name Type Description
list list[SphereGlyph | TubeObject]

SphereGlyph or TubeObject to show first selected point or loop's lines

select_point(point_id)

Method for selecting points usign S-key and Left Mouse Button.

Parameters:

Name Type Description Default
point_id int

Id of selected point

required

Returns:

Name Type Description
list list

Actors to represent selected points

show_edges(color=None, line_width=0.3, as_tube=False)

Set edge visibility of the surface.

Parameters:

Name Type Description Default
color str

Color of the edges

None
line_width float

Edges line width

0.3
as_tube bool

If true edges will be showed as tubes

False

stop_point_selection()

Method to finish selecting points usign S-key and Right Mouse Button.

Returns:

Name Type Description
list list

Actors to show selected points

undo_previous_path()

Method for removing the final part of the selected path up until the previous selected point using U-key and Left Mouse Button.

Returns:

Name Type Description
list list[SphereGlyph | TubeObject]

SphereGlyph or TubeObject to show first selected point or loop's lines

undo_previous_selection()

Method for removing previous selected point using U-key and Left Mouse Button.

Returns:

Name Type Description
list list[SphereGlyph | TubeObject]

Actors to represent selected points