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.
0 - No restriction
2 - 2D shells only
3 - 3D solids only
thickness_type
Defines how the thickness is applied to the input entities.
0 - Use the value specified by thickness.
1 - Use component thickness.
2 - Use element thickness. Valid only for elems and comps.
Add 10 to these values to also apply the thickness on the outside of solid elements or geometry (i.e. report solid skins being close to each other, but not intruding each other).
Add 20 to these values to also apply the thickness on the inside of solid elements or geometry, reporting a normal pointing outwards (i.e. report solids intruding each other).
Add 30 to these values to also apply the thickness on the inside and outside of solid elements or geometry, reporting a normal pointing outwards (i.e. combine the two options above).
Add 40 to these values to also apply the thickness to solid elements or geometry as if their skins were shell elements (i.e. report close faces with a normal pointing outwards, intruding faces with a normal pointing inwards).
thickness
The assigned thickness when thickness_flag is 0. Ignored otherwise.
edge_penetration
0 - Do not consider edge penetrations.
1 - Consider edge penetrations.
midside_nodes
Valid only for elems and comps.
0 - Do not consider midside nodes.
1 - Consider midside nodes.
split_quads
Valid only for elems and comps.
0 - Do not split quads at the center for calculation purposes.
1 - Split quads at the center for calculation purposes.
used_topology
0 - Consider specified entities.
1 - Consider only nodes of specified entities.
2 - Use all edges of elements or faces.
3 - Use only free edges of shell elements.
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

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

11.0.130