*morphconstraintupdateeq

Updates an equation type constraint for the specified nodes.

Syntax

*morphconstraintupdateeq ntype nmark type mcon vec function distance ivec meth oid color

Type

HyperMesh Tcl Modify

Description

This command will update a constraint for the nodes on the mark which positions the nodes on or a specified distance away from the surface of the function. The function can contain x, y, and z variables but should not contain an equals sign. The surface of the function is located where the value of the function equals zero. The function will be positioned at the global origin if meth is set to 0. If meth is set to 1, oid will specify the origin node and the global system will be used for the x, y, and z directions. If meth is set to 2, oid will specify the local system to be used for the origin and x, y, and z.

type determines if the nodes move along the surface of the function, are bounded by the surface of the function, remain a set distance from the surface of the function, or maintain their original distance from the surface of the function.

To enable mesh stretching, add 32 to the type (thus 1, 3, and 5 become 33, 35, and 37).

Inputs

ntype
Must be set to nodes.
nmark
The ID of the mark containing the constrained nodes. Valid values are 1 and 2.
type
0 – Moves along the surface of the function
1 – Bounded by the surface of the function
3 – Remains a set distance from the surface of the function
5 – Maintains its original distance from the surface of the function
+32 - Enables mesh stretching around constrained nodes
mcon
The ID of the morph constraint to update.
vec
The ID of the vector created using *createvector. Must be set to 1.
function
String containing a surface definition function f(x,y,z)
distance
Distance nodes must remain away from the surface of the function (type 1 and 3 only).
ivec
0 – Project normal to function
1 – Project along vector vector
meth
0 – Use global origin and system
1 – Use global system with node ID oid as the origin
2 – Use local system with ID oid as the origin and system
oid
ID of node or system specified in meth.
color
The color of the constraint. Valid values are 1-64.

Examples

To update a constraint where all nodes move along the surface of a sphere and are projected normal to the sphere:

*createmark nodes 1 "all"
*createvector 1 1.0 0.0 0.0
*morphconstraintupdateeq nodes 1 0 12 1 "x*x+y*y+z*z-100.0" 0.0 0 0 0 11

To update a constraint where all nodes are bounded by the sphere by a distance of 2.0, projected along a vector, and use a local system to orient the sphere:

*createmark nodes 1 "all"
*createvector 1 1.0 0.0 0.0
*morphconstraintupdateeq nodes 1 1 12 1 "x*x+y*y+z*z-100.0" 2.0 1 2 1 11

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