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:
ByLowestId - Calcualte with respect to the entity with the lowest ID (default)
ByHighestId - Calcualte with respect to the entity with the highest ID
deformationTolerance=<value>
The match tolerance value (default 0.0).
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.
If not specified, the entire source is considered.
If specified, referenceEntityType is required.
referenceEntityType=<value?
The type of reference/target entity. Valid values are comps or parts.
If not specified, the entire source is considered.
If specified, referenceEntityMarkId is required.
searchMethod=<value>
Specifies how the matching is done:
ByArea - Matching is done with repect to area (default)
ByTopo - Matching is done with repect to exact topo matches
entity_type
Syntax.
entity_type
Syntax.
entity_type
Syntax.

Examples

To compare part 4 to part 6 using a tolerance of 1.0:
*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

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

2020