*check_symmetric_surfaces

Checks whether a selection of surfaces is symmetric.

Syntax

*check_symmetric_surfaces entity_type mark_id_source mark_id_target string_array number_of_strings

Type

HyperMesh Tcl Modify Command

Description

Checks whether a selection of surfaces is symmetric. Optionally, the transformation can be supplied. The transformation can be supplied as a translation, a rotation, or a 4x4 transformation matrix. If not supplied, the transformation is computed internally. The tolerance for matching the mesh can also be supplied. If not given, the global geometry cleanup tolerance is used instead. The global node tolerance is used for the computation. If the surfaces deviate on the number of fixed points, it can fix the target surfaces by adding or suppressing fixed points.

The output information is logged into two global Tcl arguments: g_hw_argc and g_hw_argv. These can be accessed after the execution of the command.

If a transformation was not supplied to the command, the internally computed transformation is logged in terms of translation and rotation. It also contains the general status of the command (whether the surfaces are symmetric or not).

Inputs

entity_type
The type of source/target entity. Currently only supported for surfaces.
mark_id_source
The ID of the source mark of entities. Valid values are 1 and 2.
mark_id_target
The ID of the target mark of entities. Valid values are 1 and 2.
string_array
The ID of the string array that contains the additional input parameters. The string array is created using the *createstringarray command. This should always be set to 1.
Valid parameters and their syntax are:
rotation:
angle: <angle in degrees>
axis: <axis, x component> <axis, y component > <axis, z component >
base: <base, x component> < base, y component > < base, z component >
tolerance:
<value>
transformation:
<tr11> <tr12> <tr13> <tr14> <tr21> <tr22> <tr23> <tr24> <tr31> <tr32> <tr33> <tr34> <tr41> <tr42> <tr43> <tr44>
translation:
<x component> <y component > <z component>
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.

Examples

To check if surfaces with ID’s 10 and 20 are symmetric with a translation along the y direction, and a rotation of 90 degrees along the global y-axis:
*createmark surfs 1 10
*createmark surfs 2 20
*createstringarray 2 {{translation: 0 1 0} {rotation: angle :90 axis : 0 1 0 base: 0 0 0}}
*check_symmetric_surfaces surfs 1 2 1 2
if { [info exists g_hw_argc] } {
    foreach outMessage $g_hw_argv {
        puts $outMessage
    }
}
To do the check using a custom tolerance and transformation matrix:
*createmark surfs 1 10
*createmark surfs 2 20
*createstringarray 2 "transformation: 0 0 1 0 0 1 0 0 -1 0 0 0 2.5 0 12.5 1" "tolerance: 0.1"
*check_symmetric_surfaces surfs 1 2 1 2
if { [info exists g_hw_argc] } {
    foreach outMessage $g_hw_argv {
        puts $outMessage
    }
}
To do the check by auto-detecting the transformation:
*createmark surfs 1 10
*createmark surfs 2 20
*createstringarray 2 "tolerance: 0.1"
*check_symmetric_surfaces surfs 1 2 1 2
if { [info exists g_hw_argc] } {
    foreach outMessage $g_hw_argv {
        puts $outMessage
    }
}

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.101

2019.1 - Added new string_array values tolerance and transformation.