Model.hm_collisionend#

Model.hm_collisionend()#

Clears memory and ends the collision detection module. This must be preceded by any calls to Model.hm_collisioninit() and Model.hm_collisionentitycreate() and Model.hm_collisioncheck().

Note that this does not include the core collision entity. These functions do not operate on those entities, only on temporary memory.

Returns:

Example#

Find intersect surfaces from IDs 1 - 10#
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)
model.hm_collisionend()

print("Intersected surfaces: ", [s.id for s in intersect_surfs])