hm_proximityinitwithtarget
Checks the proximity between elements or components, allowing the user to specify the target, and stores the results internally.
Syntax
hm_proximityinitwithtarget source_entity_type source_mark_id target_entity_type target_mark_id max_proximity_distance ?check_side? ?proximity_scheme? ?proximity_by_edge?
Type
HyperMesh Tcl Query
Description
Checks the proximity between elements or components, allowing the user to specify the target, and stores the results internally. Other APIs can be used to query the results.
This must precede any calls to other hm_proximityget*/hm_proximitymark* APIs, and must be followed by a call to hm_proximityend.
Inputs
- source_entity_type
- The type of source entity to query. Valid values are elements and components.
- source_mark_id
- The ID of the mark containing the source input entities. Valid values are 1 and 2.
- target_entity_type
- The type of target entity to query. Valid values are elements and components.
- target_mark_id
- The ID of the mark containing the target input entities. Valid values are 1 and 2.
- check_side
- 1 – Check both sides of the elements
- proximity_scheme
- 0 – Checks basic proximity along a ray from the element center along the normal direction.
- proximity_by_edge
- 0 – Ignores proximity for nearby edges (default behaviour if not specified).
Examples
To find elements in proximity between the "source" and "target" components, and highlight the found entities:
*createmark comps 1 "source"
*createmark comps 2 "target"
hm_proximityinitwithtarget comps 1 comps 2 2.5
hm_proximitymarksourceproximityelements 1
hm_proximitymarktargetproximityelements 2
hm_highlightmark elems 1 h
hm_highlightmark elems 2 l
hm_proximityend
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2019