hm_geomfindsymmetry

Finds and returns the symmetry transformation matrix and matched / unmatched surfaces between two selections.

Syntax

m_geomfindsymmetry entity_type mark_id1 mark_id2 ?options?

Type

HyperMesh Tcl Query

Description

Finds and returns the symmetry transformation matrix and matched / unmatched surfaces between two selections.

The return consists of four lists:
  1. A list of 16 float values defining the transformation matrix (either computed automatically or supplied by the user).
  2. A list of pairs of matched entities.
  3. A list of unmatched entities from first selection.
  4. A list of unmatched entities from second selection.

Inputs

entity_type
The type of entity to find symmetry for. Only surfaces are currently supported.
mark_id1
The ID of the mark containing the first input set of entities. Valid values are 1 and 2.
mark_id2
The ID of the mark containing the second input set of entities. Valid values are 1 and 2.
options
Optional arguments as follows:
tolerance tol (optional)
This argument should be followed by a float value, tol, to be used as the tolerance for comparison. If not supplied, the default geometry cleanup tolerance will be used.
transformation a11 a12 a13 a14 a21 a22 a23 a24 a31 a32 a33 a34 a41 a42 a43 a44
This argument should be followed by 16 float values, a11-a44, which are the components of the 4x4 transformation matrix that maps the first selection of entities to the second. This argument is optional. If not supplied, the transformation will be computed automatically if possible.

Examples

To find the symmetry between the surfaces in comps named "a" and "b", using the default tolerance and automatic transformation calculations. The return values are indented in the line below the command:

*createmark surfs 1 "by comp" a
*createmark surfs 2 "by comp" b
hm_geomfindsymmetry surfs 1 2
{1 0 0 0 0 1 0 0 0 0 1 0 0 -4.44089209850E-016 7 1} {{2 30} {3 31} {5 33} {6 34} {7 35} {8 36} {10 38} {11 39} {12 40} {13 41} {15 43} {16 44} {17 45} {19 47} {20 48} {21 49} {22 50} {23 51} {24 52} {27 55} {28 56}} {18 1 9 14 57 4 26 25} {46 29 32 58 59}

To find the symmetry between the surfaces in comps named "a" and "b", using a tolerance of 1e-5 and automatic transformation calculations. The return values are indented in the line below the command:

*createmark surfs 1 "by comp" a
*createmark surfs 2 "by comp" b
hm_geomfindsymmetry surfs 1 2 tolerance 1e-5
{1 0 0 0 0 1 0 0 0 0 1 0 0 -4.44089209850E-016 7 1} {{2 30} {6 34} {8 36} {10 38} {11 39} {12 40} {13 41} {15 43} {16 44} {17 45} {19 47} {20 48} {21 49} {22 50} {23 51} {24 52} {28 56}} {18 1 3 7 9 5 14 57 4 26 25 27} {46 29 31 32 35 58 59 33 55}

To find the symmetry between the surfaces in comps named "a" and "b", using a tolerance of 1e-5, and specifying the transformation manually. The return values are indented in the line below the command:

*createmark surfs 1 "by comp" a
*createmark surfs 2 "by comp" b
hm_geomfindsymmetry surfs 1 2 transformation 1 0 0 0 0 1 0 0 0 0 1 0 0 0 7 1 tolerance 1e-5
{1 0 0 0 0 1 0 0 0 0 1 0 0 0 7 1} {{2 30} {6 34} {8 36} {10 38} {11 39} {12 40} {13 41} {15 43} {16 44} {17 45} {19 47} {20 48} {21 49} {22 50} {23 51} {24 52} {28 56}} {18 1 3 7 9 5 14 57 4 26 25 27} {46 29 31 32 35 58 59 33 55}

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

11.0.130