hm_collisioninit

Initializes the collision detection module.

Syntax

hm_collisioninit ?config? ?tolerance? ?allowable_depth?

Type

HyperMesh Tcl Query

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.

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