Model.selfstitchcombine2#
- Model.selfstitchcombine2(collection, allow_self_stitch=1, allow_stitch_different_surfs=1, stitch_only_free_edges=1, allow_small_edge_collapse=0, equivalence_to='across_comp', tolerance_across=0.0, tolerance_within=0.0)#
Performs equivalencing of edges within surfaces or/and between surfaces.
- Parameters:
collection (Collection) – The collection containing the surface entities to operate on.
allow_self_stitch (unsigned int) –
Specifies whether to consider stitching edges of the same surface. Valid values are:
0 - Do not consider self-stitching.
1 - Consider self-stitching (same surface edges). (default)
allow_stitch_different_surfs (unsigned int) –
Specifies whether to consider stitching edges between different surfaces. Valid values are:
0 - Do not stitch edges between different surfaces.
1 - Stitch edges between different surfaces. (default)
stitch_only_free_edges (unsigned int) –
Specifies whether to restrict to free edges for stitching. Valid values are:
0 - Consider all edges.
1 - Consider free edges only. (default)
allow_small_edge_collapse (unsigned int) –
Specifies whether to allow collapsing small edges when stitching. Valid values are:
0 - Do not collapse small edges. (default)
1 - Collapse small edges.
equivalence_to (hwString) –
Specifies which edges to consider for stitching. Valid values are:
across_comp - Allow equivalence between components. (default)
within_comp_only - Do not equivalence between components.
to_connected_surfs - Equivalence between selected surfaces and surfaces connected to selection.
within_selection - Equivalence only within the subset of selected surfaces.
tolerance_across (double) – The equivalencing tolerance value for edges of different surfaces. The default geometry tolerance is used if this input is not specified.
tolerance_within (double) – The equivalencing tolerance for edges within a single surface. The default geometry tolerance is used if this input is not specified.
Example#
Equivalence edges between all displayed surfaces using a tolerance value of0.2#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains all the displayed surfaces surfaces_displayed_collection = hm.CollectionByDisplayed(model, ent.Surface) model.selfstitchcombine2( collection=surfaces_displayed_collection, tolerance_across=0.2, tolerance_within=0.2 )