*surfacemark_find_organize_symmetry

Identify symmetry between surfaces in a given set, with respect to a given reflection plane.

Syntax

*surfacemark_find_organize_symmetry surf_set_mark_id1 surf_set_mark_id2 plane options tolerance

Type

HyperMesh Tcl Modify Command

Description

This command compares surfaces from two different sets, checking whether any surface in one set has an identical counterpart in another set after reflection with respect to the input plane. Optionally, only one set of surfaces can be provided on input, in which case this single set is automatically split into two sets based on the surfaces’ position with respect to the input plane. As a result of symmetry calculations, surfaces are either deleted or reorganized into newly created components, depending on the chosen options parameter (see comments).

Inputs

surf_set_mark_id1
The mark containing the surfaces in the first set.
surf_set_mark_id2
The mark containing the surfaces in the second set, or zero for no additional surfaces.
plane
The symmetry plane around which surfaces will be reflected & compared.
options
An integer value representing a combination of flags used to modify command behavior (see comments).
tolerance
Tolerance value used to calculate surfaces identity.
Parameter options description
As a result of surface sets symmetry calculation, input surfaces are separated into four sets:
  • output_set0 - unmatched (no symmetric counterpart was found) surfaces of input set surf_set_mark_id1.
  • output_set1 - matched (symmetric counterpart was found) surfaces of surf_set_mark_id1.
  • output_set2 - unmatched (no symmetric counterpart was found) surfaces of input set surf_set_mark_id2.
  • output_set3 - matched (symmetric counterpart was found) surfaces of surf_set_mark_id2.
The options parameter is composed of several "action" groups, with each group consisting of four bits. Each bit in the group corresponds to one of four output sets:
Action group "move to component" - bits 0…3: These bits correspond to the output set numbers (0-3). Surfaces from the specified output set set are moved into a component with a predefined name as described below:
output set original component name new component name
output_set0 <name> <name>_unmatched
output_set1 <name> <name>_plus
output_set2 <name> <name>_unmatched
output_set3 <name> <name>_minus
Action group "delete" - bits 4…7 (corresponding to <output set #+4>): surfaces from the corresponding output set (4=unmatched/mark1, 5=matched/mark1, 6=unmatched/mark2, 7=matched/mark2) are deleted (if both "move to component" and "delete" actions are specified for the same output set, this "delete" action takes precedence).
Action group "highlight" - bits 8…11 (corresponding to <output set #+8>): surfaces from the corresponding output set (8=unmatched/mark1, 9=matched/mark1, 10=unmatched/mark2, 11=matched/mark2) are also placed into their corresponding input set and highlighted.
The final value for the options parameter is the sum of 2 to the power of the bit value for each desired action. For example, the "move to component" output set uses bit values equal to the output set numbers, so so moving the unmatched surfaces (output_set0 and output_set2) into a component requires an options value of 2^0 + 2^2 = 5.

Example

Suppose you want to find the symmetry between surfaces in a set marked by input mark 1 and surfaces marked by input mark 2. You want to use identity tolerance of 0.1. You want to reorganize and highlight surfaces that were found to be symmetrical, and to delete surfaces that do not have symmetric counterpart. You would then construct the options parameter as follows:
  • Organizing symmetric surfaces - add bits 1 and 3 (action group "move to component" for output_set1 and output_set3).
  • Deleting unmatched surfaces - add bits 4 and 6 (action group "delete" for output_set0 and output_set2).
  • Highlighting symmetric surfaces - add bits 9 and 11 (action group "highlight" for output_set1 and output_set3).

Combining all bits gives the value for options parameter:

options = 2^1 + 2^3 + 2^4 + 2^6 + 2^9 + 2^11 = 2650

So we call the command as:

*surfacemark_find_organize_symmetry 1 2 2650 0.1

Errors

This command does not return any errors that can be handled.