hm_getmatching
Performs a comparison and returns matching results.
Syntax
hm_getmatching entity_type mark_id ?option1=<value1>? ?option2=<value2>? ... ?optionN=<valueN>?
Type
HyperMesh Tcl Query Command
Description
Performs a comparison and returns matching results.
Returns a matching pair of comps or parts passed along with the percentage match. The reference/target entities are sequenced first in the output, followed by matching source entities, and subsequently followed by the matching percentage. If a source entity matches with more than one target, the pairs with maximum match percentage are returned. A source returned with one reference is not part of any other match pair.
Inputs
- entity_type
- The type of entity to copmare. Valid values are comps or parts.
- mark_id
- The ID of the mark of entities to compare. Valid values are 1 and 2.
- areaCalcMethod=<value>
- Specifies how the matching area percentage is calculated:
- compareType=<value>
- Specifies with what entities the comparison happens:
- deformationTolerance=<value>
- The match tolerance value (default 0.0).
- encoding_algorithm
- The optional encoding algorithm to use when searchMethod=ByEncoding. Valid values are:
- matchingPercentThreshold=<value>
- The matching area threshold above which matching pairs are returned (default is node tolerance).
- referenceEntityMarkId=<value>
- The ID of the mark of reference/target entities. Valid values are 1 and 2.
- referenceEntityType=<value?
- The type of reference/target entity. Valid values are comps or parts.
- searchMethod=<value>
- Specifies how the matching is done:
- sphhar_bandwidth
- Optional, valid for encoding_algorithm 0, default 16.
- sphhar_fallof
- Optional, valid for encoding_algorithm 0, default 2.828427.
- sphhar_radii
- Optional, valid for encoding_algorithm 0, default 32.
- sphhar_resolution
- Optional, valid for encoding_algorithm 0, default 64.
Examples
*createmark parts 1 "by ids" 4
*createmark parts 2 "by ids" 6
hm_getmatching parts 1 referenceEntityType=parts referenceEntityMarkId=2 matchingPercentThreshold=0.0 deformationTolerance=1.0
*createmark parts 1 "by ids" 4
*createmark parts 2 "by ids" 6
hm_getmatching parts 1 referenceEntityType=parts referenceEntityMarkId=2 deformationTolerance=0.6 searchMethod=ByEncoding compareType=0
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2020
2020.1 - Added new options compareType, encoding_algorithm, sphhar_bandwidth, sphhar_fallof, sphhar_radii and sphhar_resolution. Added new searchMethod ByEncoding.