hm_collisioninit

Initializes the collision detection module.

Syntax

hm_collisioninit ?config? ?tolerance? ?allowable_depth? ?min_overlap?

Type

HyperMesh Tcl Query Command

Description

Initializes the collision detection module. This must precede any calls to hm_collisionentitycreate and hm_collisioncheck, and must be followed by a call to hm_collisionend.

Inputs

config
The configuration that defines the collision behavior. This value is obtained by running hm_collisiongetconfig. Default is 0.
tolerance
The tolerance to use for intersection checks (for hm_collisiongetconfig intersect_planar keyword) or penetration checks (for hm_collisiongetconfig penetrat_min_overlap keyword). If not specified, the default is 1.e-08.
allowable_depth
The allowable depth to use when finding and reporting interferences. If specified, config should be 0 and tolerance should be -1.0. If not specified, this is ignored.
min_overlap
For allowable_depth, in cases where collision entities overlap, there may be many intersections, and sorting out which ones are false or not is expensive. This option allows for calculating percentages by measuring the number of intersection segments against the half the number of nodes in each collision entity. If both percentages exceed the min_overlap value, we do not perform the allowable_depthanalysis and instead report all of the intersections as true.

Example

To find intersecting surfaces from IDs 1-10:

*createmark surfs 1 1-10
hm_collisioninit
hm_collisionentitycreate surfs 1 0 1 0 0 0 0 0 0
hm_collisioncheck 0 0 1 0 0 0 0
hm_collisionend
hm_getmark surfs 1

To find penetrating surfaces from IDs 1-10, using the thickness assigned to the surface components:

*createmark surfs 1 1-10
hm_collisioninit
hm_collisionentitycreate surfs 1 0 1 0 0 0 0 0 0
hm_collisioncheck 0 0 0 1 0 0 0
hm_collisionend
hm_getmark surfs 1

To find both penetrating and intersecting surfaces from IDs 1-10, using the thickness assigned to the surface components:

*createmark surfs 1 1-10
hm_collisioninit
hm_collisionentitycreate surfs 1 0 1 0 0 0 0 0 0
hm_collisioncheck 0 0 1 2 0 0 0
hm_collisionend
hm_getmark surfs 1
hm_getmark surfs 2

To find both penetrating and intersecting surfaces from IDs 1-10, using the thickness assigned to the surface components, and using an allowable depth of 0.1:

*createmark surfs 1 1-10
hm_collisioninit 0 -1 0.1
hm_collisionentitycreate surfs 1 0 1 0 0 0 0 0 0
hm_collisioncheck 0 0 1 2 0 0 0
hm_collisionend
hm_getmark surfs 1
hm_getmark surfs 2

Errors

None.

Version History

11.0.130

2017.2 - Added new optional argument min_overlap.