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 ?offset?
Type
HyperMesh Tcl Query
Description
Adds input entities to consider for collision detection. This must be called after hm_collisioninit, and before any calls to hm_collisionentitycreate.
Multiple calls to this API can be made to add additional input entities to the collision detection. Note that the input entities are different from the core collision entity. These commands do not operate on those entities, only on temporary memory.
When using the collirad collision detection engine, only one call is supported for each grouping_identifier. This means that either a single call to this API has to be made with grouping_identifier as 0, or one call with grouping_identifier 1 and 2 each.
Inputs
- entity_type
- The type of entity to add.
- 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. Ignored by the collirad engine.
- thickness_type
- Defines how the thickness is applied to the input entities, in combination with thickness.
- thickness
- The assigned uniform thickness when thickness_flag is 0. If thickness_flag has 300 or 400 added while using component or element thickness, thi sis used as a thickness multiplier or add-on.
- edge_penetration
- Not valid for groups for which the solver logic is applied.
- midside_nodes
- Valid only for elems and comps.
- split_quads
- Valid only for elems and comps.
- used_topology
- This is ignored for the collirad engine.
- 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.
- offset
- Used to specify which element types to offset using solver properties.
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
To find penetrating elements from components with IDs 1-5 using thickness defined on elements, offset defined on shell elements:
hm_collisioninit
*createmark comps 1 1-5
hm_collisionentitycreate comps 1 0 2 0 0 0 0 0 0 10
hm_collisioncheck 0 1 0 0 0 0 0 0 0 0 0 0
hm_collisionend
hm_highlightmark elems 1 "h"
To find penetrating elements from all components using a thickness multiplier of 1.1 on thickness defined on elements:
hm_collisioninit
*createmark comps 1 all
hm_collisionentitycreate comps 1 0 302 1.1 0 0 0 0 0
hm_collisioncheck 0 1 0 0 0 0 0 0 0 0 0 1
hm_collisionend
hm_highlightmark elems 1 "h"
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
11.0.130
2017.1 - Updated the option descriptions to indicate their support for the opcode vs. collirad engines. Added values 100 and 200 to thickness_type.
2019 - Added new optional argument offset. Added values 300 and 300 to thickness_type.