*morphsculptmesh2

Sculpts the elements on the mark with additional modes of operation compared to *morphsculptmesh.

Syntax

*morphsculptmesh2 etype emark stype smark ttype tmark tool tvec tlines tpoints tplane rnode tsize offset path plines ppoints svec push remesh con relief mode

Type

HyperMesh Tcl Modify

Description

This command sculpts the elements on the first mark according to the various parameters. Sculpting is treated as a morph and can be undone and redone.

Note that you must always create all marks, lists, vectors, and the plane before *morphsculptmesh2, even if they are not used. Make sure the vectors and the plane are non-zero.

Inputs

etype
elems
emark
Mark ID of elements to be sculpted. Valid values are 1 and 2.
stype
surfs
smark
Mark ID of surfaces for use as surface sculpting tool. Valid values are 1 and 2.
ttype
elems
tmark
Mark ID of elements for use as mesh sculpting tool. Valid values are 1 and 2.
tool
0 = ball
1 = cone
2 = cylinder
3 = line from line list
4 = plane
5 = surfaces
6 = mesh
7 = line from nodes
tvec
Mark ID of orientation vector for cylinder tool. Valid values are 1 and 2.
tlines
Mark ID of line list for line tool. Valid values are 1 and 2.
tpoints
Mark ID of node list for line tool. Valid values are 1 and 2.
tplane
Mark ID of plane for plane tool. Valid values are 1 and 2.
rnode
ID of reference node for positioning line, surface, and mesh tools
tsize
Radius for ball and cylinder tools
Angle for cone tool
Taper angle for line, surface, and mesh tools
offset
Amount of offset for tool in sculpting direction.
path
0 = along node list - smooth (ppoints)
1 = along line list (plines, ppoints)
2 = along node list - linear (ppoints)
plines
Mark ID of line list for path. Valid values are 1 and 2.
ppoints
Mark ID of node list for path. Valid values are 1 and 2.
svec
Mark ID of vector for sculpting direction. Valid values are 1 and 2.
push
0 = pull
1 = push
remesh
0 = do not remesh
1 = remesh (not supported)
2 = do not remesh - interactive mode
3 = remesh - interactive mode (not supported)
con
0 = do not use constraints
1 = use constraints
relief
If mode is 0 or 2, this is the amount of mesh compression allowed (between 0.0 and 1.0)
If mode is 1 or 3 = compression distance
mode
0 = sculpt along vector using relief percentage
1 = distance based compression
2 = sculpting along element normals
3 = sculpting along element normals with distance based compression

Each tool requires only the specified fields. For instance, the cylinder tool needs only tsize and tvec, and does not need smark, tmark, tplane, and rnode.

Higher values of relief result in more compression of the sculpted elements for modes 0 and 2. For modes 1 and 3, relief refers to the distance away from the tool through which compression is evenly applied.

Morphing along element normals (modes 2 and 3) requires that shell elements be included in emark. Sculpting of solid elements along element normals is allowed if the surface of the solid elements is covered with shell elements and those shell elements are placed in emark. If compression is used, nodes inside the volume of a solid mesh will be affected.

Example

To use a ball tool of radius 5.0 and offset of zero dragged along nodelist 2, pushing the mesh along vector 2 using constraints with a mesh compression factor of 0.5:

*createmark elems 1 "all"
*createmark surfs 1
*createmark elems 2
*createlist lines 1
*createlist nodes 1
*createlist lines 2
*createlist nodes 2 7028
*createvector 1 1.0 0.0 0.0
*createplane 1,1.0 0.0 0.0 1.0 0.0 0.0
*createvector 2 16.9220 -3.7030 -25.1660
*morphsculptmesh2 elems 1 surfs 1 elems 2 0 1 1 1 1 7027 5.0 0.0 0 2 2 2 1 0 1 0.5 0

Errors

Incorrect usage of *morphsculptmesh2 results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {*morphsculptmesh2 … } ] } {
# Handle error
}

"Error creating surface from lines." - occurs if a line tool is dragged along a line and the resulting surface cannot be constructed.

"Error creating tacit surface." - occurs if a mesh tool is selected and there is an error generating a tacit surface for the mesh.

"Error generating path." - occurs if the line representing the path cannot be created.

"Error generating normal vectors." - occurs if the normal directions for the affected elements cannot be determined.

Version History

9.0