hm_collisionentitycreate
Adds entities to consider for collision detection.
Syntax
hm_collisionentitycreate entity_type mark_id dimension thickness_type thickness edge_penetration midside_nodes split_quads used_topology grouping_identifier
Type
HyperMesh Tcl Query
Description
Adds entities to consider for collision detection. This must precede any calls to hm_collisioncheck, and must be preceded by a call to hm_collisioninit.
Multiple calls to this API can be made to add additional entities to the collision detection.
Inputs
- entity_type
- The type of entity to add. Valid values are nodes, surfs, solids, elems and comps (only elems in comps are considered).
- mark_id
- The ID of the mark containing the entities to add. Valid values are 1 and 2.
- dimension
- Defines the dimension of elements to consider. Valid only for elems and comps.
- thickness_type
- Defines how the thickness is applied to the input entities.
- thickness
- The assigned thickness when thickness_flag is 0. Ignored otherwise.
- edge_penetration
- 0 - Do not consider edge penetrations.
- midside_nodes
- Valid only for elems and comps.
- split_quads
- Valid only for elems and comps.
- used_topology
- 0 - Consider specified entities.
- grouping_identifier
- Entities with the same grouping identifier are not checked against each other. This is useful for performing checks "by pair". If set to 0, entities are checked against all others.
Examples
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 penetrating surfaces from IDs 1-5 with a uniform thickness of 1.5, against those with IDs 6-10 and uniform thickness 2.0, considering edge penetration effects:
hm_collisioninit
*createmark surfs 1 1-5
hm_collisionentitycreate surfs 1 0 1 1.5 1 0 0 0 1
*createmark surfs 1 6-10
hm_collisionentitycreate surfs 1 0 1 2.0 1 0 0 0 2
hm_collisioncheck 0 0 0 1 0 0 0
hm_collisionend
hm_getmark surfs 1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
11.0.130