Model.CE_ConnectorTrimAdvanced#
- Model.CE_ConnectorTrimAdvanced(style, collection, node_collection, tolerance, snap, mode1, mode2)#
Trims/splits the spot/seam connectors using nodes.
- Parameters:
style (hwString) – The style of connectors to edit. Valid values are area, seam and spot.
collection (Collection) – The collection containing the spot/seam collector entities to trim/split.
node_collection (Collection) – The collection containing the input node entities.
tolerance (double) – The tolerance value used to snap the nodes to the point of spot connectors when
snap=1.snap (int) –
0 - Do not snap nodes to spot connectors
1 - Snap nodes to spot connectors
mode1 (int) –
0 - Split
1 - Trim
mode2 (int) –
0 - None
1 - Create trim/split connector with location node entities
2 - Create trim/split connectors with location line entities
Examples#
Split spot connector with ID 101 using node with ID 1001#import hm import hm.entities as ent model = hm.Model() model.CE_ConnectorTrimAdvanced( style="spot", collection=hm.Collection(model, ent.Connector, [101]), node_collection=hm.Collection(model, ent.node, [1001]), tolerance=0.5, snap=1, mode1=0, mode2=0, )
Trim seam connector with ID 102 using node with ID 1002#import hm import hm.entities as ent model = hm.Model() model.CE_ConnectorTrimAdvanced( style="seam", collection=hm.Collection(model, ent.Connector, [102]), node_collection=hm.Collection(model, ent.node, [1002]), tolerance=0.5, snap=1, mode1=1, mode2=0, )