Model.createintersectionsegments#
- Model.createintersectionsegments(collector, flag=0, param=0.0)#
Creates intersection segments as plot elements from the results of
model.hm_collisioncheck().model.hm_collisioncheck()must be run with the save_segments option specified before running this function. This function must also be called beforemodel.hm_collisionend()is called.- Parameters:
collector (int) –
0 - Create segments as plot elements in a component named ^intersection_segments.
1 - Create segments as plot elements in the current component.
flag (int) – Reserved for future development.
param (double) – Reserved for future development.
Example#
Find intersect surfaces from IDs 1-10 and create intersection segments#import hm import hm.entities as ent model = hm.Model() checking_surfs = hm.Collection(model,ent.Surface,list(range(1,11))) intersect_surfs = hm.Collection(model,ent.Surface,populate=False) model.hm_collisioninit() model.hm_collisionentitycreate(collection=checking_surfs,dimension=0,thickness_type=1,thickness=0,edge_penetration=0,midside_nodes=0,split_quads=0,used_topology=0,grouping_identifier=False,offset=0) model.hm_collisioncheck(intersected_surfaces=intersect_surfs,store_segments=True) model.createintersectionsegments(collector=0) model.hm_collisionend() print("Intersected surfaces: ", [s.id for s in intersect_surfs])