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? ?min_angle_limit? ?max_angle_limit?

Type

HyperMesh Tcl Query Command

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
2 - Check the element normal side only
3 - Check 'outward volume' side (default behavior if not specified)
4 - check 'inward volume' side
proximity_scheme
0 - Checks basic proximity along a ray from the element center along the normal direction.
1 - Checks comprehensive proximity. Reports any proximity within an imaginary offsetted volume of the element (default behaviour if not specified).
proximity_by_edge
0 - Ignores proximity for nearby edges (default behaviour if not specified).
1 - Considers proximity for nearby edges.
min_angle_limit
If the angle between the proximate element pairs is less than this value, such pairs are not reported.
max_angle_limit
If the angle between the proximate element pairs is greater than this value, such pairs are not reported.

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

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

Version History

2019

2019.1 - Added new optional arguments min_angle_limit and max_angle_limit.