*map_symmetric_mesh

Maps a mesh between symmetric source/target surfaces.

Syntax

*map_symmetric_mesh entity_type mark_id_source mark_id_target string_array number_of_strings

Type

HyperMesh Tcl Modify

Description

Maps the mesh from source surfaces to target surfaces with an optionally supplied transformation. The global option of node tolerance is used while mapping.

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 surfs.
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:
translation:
<x component> <y component > <z component>
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 >
ElementMappingAsLists
If present, element lists 1 and 2 are populated with source and corresponding target elements, respectively. This is useful for determining the source-to-target element mapping. Case insensitive.
NodeMappingAsLists
If present, node lists 1 and 2 are populated with source and corresponding target nodes, respectively. This is useful for determining the source-to-target node mapping. Case insensitive.
PreferReflection
If present, reflective symmetry is preferred. Otherwise, other symmetries get perference over reflective symmetry. Case insensitive.
number_of_strings
Integer indicating the size (number of strings) in the string array created using *createstringarray.

Example

To map the mesh from surface with ID 10 to surface with ID 20 (surfaces 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 1 {{translation: 0 1 0} {rotation: angle :90 axis : 0 1 0 base: 0 0 0}}
*map_symmetric_mesh surfs 1 2 1 2
if { [info exists g_hw_argc] } {
foreach outMessage $g_hw_argv {
puts $outMessage
}
}
To map the mesh from surface with ID 10 to surface with ID 20, auto detecting the transformation:
*createmark surfs 1 10
*createmark surfs 2 20
*map_symmetric_mesh surfs 1 2 1 0
To map the mesh from surface with ID 10 to surface with ID 20, auto detecting the transformation, and getting the source to target node and element mappings:
*createmark surfs 1 10
*createmark surfs 2 20
*createstringarray 2 "NodeMappingAsLists" "ElementMappingAsLists"
*map_symmetric_mesh surfs 1 2 1 2
set sourceNodeList [hm_getlist nodes 1]
set targetNodeList [hm_getlist nodes 2]
set sourceElemList [hm_getlist elements 1]
set targetElemList [hm_getlist elements 2]

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