Model.untrim_selected_edges#
- Model.untrim_selected_edges(collection_lines, collection_surfs, untrim_option, keep_vertices, reserved1, reserved2)#
Modifies surfaces by removing user-selected free edges and replacing each chain of edges with a new edge that is determined as follows:
In case of “shortcut” option, the new straight edge joins the end-points of selected edge chain.
In case of “extend” option, the function attempts to finds the intersection of two rays along tangents at the edge chain end-points. If such an intersection point exists, the new straight edges join the end-points of original edge chains with this intersection point.
The input can include free edges on several surfaces simultaneously, and can include both internal and external free edges. The function ignores all non-free edges of the selection.
If all edges of an internal or external loop are selected, the function removes the entire loop. In these special cases, the function extends the functionalities of
Model.edgesmarkuntrim()andModel.surfacemarkuntrim().- Parameters:
collection_lines (Collection) – The collection containing the line entities to untrim.
collection_surfs (Collection) – Reserved for future development.
untrim_option (int) –
Specifies how the new edges be constructed:
0 - Use the shortcut option.
1 - Use the extend option.
keep_vertices (int) –
0 - Vertices at the ends of the selected edge chains might be removed if necessary (based on the value of the user-specified “geom. feature angle”).
1 - Vertices at the ends of the selected edge chains are preserved.
reserved1 (double) – Reserved for future development. Must be set to 0.
reserved2 (double) – Reserved for future development. Must be set to 0.
Example#
Untrimme the red edges with ID 36800 - 36802 via shortcut option and to preserve the vertices at the ends of the selected edge chains#import hm import hm.entities as ent model = hm.Model() # Creating the collection that contains the lines with IDs 36800-36802 input_collection = hm.Collection(model, ent.Line, [36800, 36801, 36802]) empty_collection = hm.Collection(model, ent.Surface, populate=False) model.untrim_selected_edges( collection_lines=input_collection, collection_surfs=empty_collection, untrim_option=0, keep_vertices=1, reserved1=0, reserved2=0, )