*surfacemark_duplicate_check
Check identity between input surface sets.
Syntax
*surfacemark_duplicate_check mark_id1 mark_id2 options use_plane plane tol
Type
HyperMesh Tcl Modify Command
Description
This command takes surfaces from two different sets and checks if any surface in one set has an identical counterpart in another set. Optionally, reflection with respect to an input plane is used before checking identity. Only one set of surfaces may also be provided on input if mark_id2 is set to 0. If a plane is provided (use_plane = 2), then this single set is automatically split into two sets by the surfaces’ position with respect to the input plane. As a result of identity calculations, surfaces are removed or switched between input sets or returned depending on the input options parameter.
- output_set0 - no identical counterpart was found (unmatched) for surfaces of mark_id1.
- output_set1 - identical counterpart was found (matched) for surfaces of mark_id1.
- output_set2 - no identical counterpart was found (unmatched) for surfaces of mark_id2.
- output_set3 - identical counterpart was found (matched) for surfaces of mark_id2.
- output_set0 - surfaces that do not have duplicate counterparts.
- output_set1 - "master" surfaces that do have duplicate counterparts (in the set of several identical surfaces, only one surface is selected as "master").
- output_set2 - "slave" surfaces that have duplicate counterparts.
- output_set3 - empty set.
Inputs
- mark_id1
- The ID of the mark containing the first set of surfaces. Valid values are 1 and 2.
- mark_id2
- The ID of the mark containing the second set of surfaces. Valid values are 1 and 2.
- options
- Integer value representing combination of flags used to modify command behavior. This
parameter is composed of several "action" groups, with each group consisting of several
possible values. The value of this parameter is a sum of the required values:
- Set selection group - bits 0…3: Since there is a limitation that only two mark values can be used to designate input sets and respectively the same two values are used to mark surfaces in output sets, this means that only two out of four output sets can be selected.
- Set selection bits group is used to indicate which of possible four output sets are returned on output. If corresponding to output set bit is set to 1, then surfaces from corresponding result set are selected.
- Mark inversion group - bits 4…7: If corresponding bit is not set, then output set is marked by the same mark as originating input set. If bit is set, the mark of another set is used instead. Those bits do not have any effect in case corresponding bit in set selection bits group is not set. Also, bits in this group do not have any effect in case both sets are the same.
- Highlight group - bits 9 and 10. If bit 9 is set, then surfaces in the output set marked by surf_set_mark_id1 are highlighted. If bit 10 is set, then surfaces in the output set marked by surf_set_mark_id2 are highlighted.
- use_plane
- 0 - Check for identity of surfaces in two sets.
- plane
- A plane ID defining the symmetry plane. Must be set to 1.
- tol
- Tolerance value used to calculate surfaces identity.
Example
*createmark surfs 1 "all"
*surfacemark_duplicate_check 1 1 4 0 1 0.1
*deletemark surfs 1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}