*morphhandlescalexyz

Morphs a mesh by scaling the distances between handles and a specified node according to the specified system.

Syntax

*morphhandlescalexyz h_entity_type h_mark_id node_id x y z system_id sym con

Type

HyperMesh Tcl Modify

Description

This command will scale the positions of the selected handles with respect to a reference node and system. Scaling factors can be assigned for the x, y, and z directions independently. If no system is specified, the scaling factors will apply in the global x, y, and z directions. If no node is specified, the handle positions will be averaged to determine the position of the reference node. A scaling factor of 1.0 will produce no movement of the handle in that direction while a scaling factor of 0.0 will move the handle to the x, y, or z position of the node or system origin.

Inputs

h_entity_type
Must be set to handles.
h_mark_id
The mark ID of the handles. Valid values are 1 and 2.
node_id
ID of the scaling reference node (or 0).
x
Scaling factor in the x direction (1.0 is no scaling).
y
Scaling factor in the y direction (1.0 is no scaling).
z
Scaling factor in the z direction (1.0 is no scaling).
system_id
ID of the scaling reference system (or 0).
sym
0 – Do not use symmetry links between handles
1 – Use symmetry links between handles
con
0 – Do not apply constraints
1 – Apply constraints

Examples

To scale a mark of handles relative to a node and system:

*createmark handles 1 "all"
*morphscalehandlexyz handles 1 5 2.0 2.0 2.0 2 1 1

To scale a mark of handles relative to the average position of the handles using the global system for x, y, and z:

*createmark handles 1 "all"
*morphscalehandlexyz handles 1 0 2.0 2.0 2.0 0 1 1

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

10.0