hm_collisioncheck
Performs a collision detection.
Syntax
hm_collisioncheck mark_id_int_elems mark_id_pene_elems mark_id_int_surfs mark_id_pene_surfs mark_id_pene_nodes self_check reserved1 ?pair_angle? ?store_segments? ?mark_adjoining? ?topo_feature_angle? ?pair_results?
Type
HyperMesh Tcl Query
Description
Performs a collision detection using entities defined by hm_collisionentitycreate. This must be preceded by hm_collisoininit and one or more calls to hm_collisionentitycreate.
Multiple calls to this API can be made to perform different detections.
Inputs
- mark_id_int_elems
- The ID of the mark that should contain any intersected elements on output. Valid values are 1 and 2. If set to 0, no intersected elements are output. Only valid if elems or comps are used as input entities.
- mark_id_pene_elems
- The ID of the mark that should contain any penetrated elements on output. Valid values are 1 and 2. If set to 0, no penetrated elements are output. Only valid if elems or comps are used as input entities.
- mark_id_int_surfs
- The ID of the mark that should contain any intersected surfaces on output. Valid values are 1 and 2. If set to 0, no intersected surfaces are output. Only valid if surfaces or solids are used as input entities.
- mark_id_pene_surfs
- The ID of the mark that should contain any penetrated surfaces on output. Valid values are 1 and 2. If set to 0, no penetrated surfaces are output. Only valid if surfaces or solids are used as input entities.
- mark_id_pene_nodes
- The ID of the mark that should contain any penetrated nodes on output. Valid values are 1 and 2. If set to 0, no penetrated nodes are output. Only valid if nodes are used as input entities.
- self_check
- 0 - Do not include self checks.
- reserved1
- Reserved for future use. Must be set to 0.
- pair_angle
- The maximum allowed angle between penetrating pair normals. Meaningful values are 0.0 < angle < 90.0. Other values disable this functionality.
- store_segments
- Set to 1 to store the intersection lines formed when intersection entitites. Only valid when mark_id_int_elems or mark_id_int_surfs are non-zero. The segments can then be visualized using *createintersectionsegments. Default is 0.
- mark_adjoining
- 0 - No additional marking (default).
- topo_feature_angle
- The angle used to identify topo faces. If set to 0.0, the global feature angle is utilized (default).
- pair_results
- If set to 1, detailed pair results are calculated and the hm_collisionget* and hm_collisionwriteresultsfile APIs can be used. If set to 0, detailed pair results are not calculated and the hm_collisionget* and hm_collisionwriteresultsfile APIs cannot be used (default).
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
hm_collisionend
hm_getmark surfs 1
To find intersecting surfaces from IDs 1-10 and to create intersection segments:
*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 90.0 1
*createintersectionsegments 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
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
hm_collisionend
hm_getmark surfs 1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
11.0.130