hm_geomfindsymmetry
Finds and returns the symmetry transformation matrix and matched / unmatched surfaces between two selections.
Syntax
hm_geomfindsymmetry entity_type mark_id1 mark_id2 ?options?
Type
HyperMesh Tcl Query Command
Description
Finds and returns the symmetry transformation matrix and matched / unmatched surfaces between two selections.
- A list of 16 float values defining the transformation matrix (either computed automatically or supplied by the user).
- A list of pairs of matched entities.
- A list of unmatched entities from first selection.
- A list of unmatched entities from second selection.
- The maximum deviation between source and target.
- A list of two coordinate lists (first on source, and second on target) where the maximum deviation occurs.
Inputs
- entity_type
- The type of entity to find symmetry for. Surfaces and lines 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
- 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. If the tolerance and transformation are not supplied, the best possible transformation is reported along with the calculated deviation.
- 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 for surfaces. If not supplied, the transformation will be computed automatically if possible.
Examples
*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} 1.8453535353e-06 { {-12.537342065573 -5 -2.4626579344272} {-12. 537342065573 -5 4.537112141223}}
*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} 1.8453535353e-06 { {-12.537342065573 -5 -2.4626579344272} {-12. 537342065573 -5 4.537112141223}}
*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} 1.8453535353e-06 { {-12.537342065573 -5 -2.4626579344272} {-12. 537342065573 -5 4.537112141223}}
Errors
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
11.0.130
2019.1 - Now returns six lists instead of four. The fifth is the maximum deviation between the source and target, and the sixth is a list of two coordinate lists where the maximum deviation occurs with the first on the source and the second on the target.