*morphfitfaces

Fits selected faces to nodes or elements according to the specified parameters.

Syntax

*morphfitfaces fmark etype emark offset nproj p_vec nhand mode method smooth regnodes

Type

HyperMesh Tcl Modify Command

Description

This command fits the faces placed on the specified mark (using the *morphmanagefacemark command) to the selected nodes or elements by sliding them, tilting them, or adjusting the curvature of the faces. The faces can be fit through the selected nodes or elements or just moved towards or away from the nodes or elements to meet a target buffer percentage (offset). The number of handles per edges of the fitted faces can be updated when using this command to get a more precise fit.

Inputs

fmark
The mark ID of the morph volume faces to be fitted. Valid values are 0, 1, 2 and 3.
etype
Valid values are nodes and elems.
emark
The mark ID of the nodes or elements to which the faces will be fit. Valid values are 1 and 2.
offset
The target buffer zone value for the nodes or elements inside the morph volumes to be met during fitting. When fitting through nodes or elements this value is not used and can be set to 0.0.
nproj
0 - Project faces along vector specified by p_vec
1 - Project faces normal to their current orientation
p_vec
The ID of vector used for the projection direction. Must be set to 1.
nhand
Number of mid-handles per edge for each face to be fit. HyperMorph will update the number of mid-handles for each edge if necessary. No more than 5 mid-handles can be specified for an edge. To keep the existing number of handles per edge, set to -1.
mode
0 - Fit using the buffer zone method (buffer zone is specified using offset).
1 - Fit through the selected nodes or elements.
method
0 - Slide faces
1 - Tilt faces
2 - Fit faces - smooth
3 - Fit faces - wavy
4 - Fit faces - approximate
smooth
Amount of smoothness desired for the fitted face. The value of smooth must be between 0 and 10 inclusive with the higher numbers resulting in smoother faces. This value only applies for face fitting, not sliding or tilting.
regnodes
0 - Do not register nodes to morph volumes after fitting faces.
1 - Register nodes to morph volumes after fitting faces.

Examples

To slide two faces normally to all the nodes displayed with a buffer of 10% and keeping the number of handles constant with a smoothness value of 6 and no registration of nodes:

*morphmanagefacemark 3 0 0 3
*morphmanagefacemark 2 2 0 1
*morphmanagefacemark 3 2 0 1
*createmark nodes 1 "displayed"
*createvector 1 0.0000 0.0000 0.0000
*morphfitfaces 0 nodes 1 10 1 1 -1 0 0 6 0

To fit two faces smoothly along a vector through all the nodes displayed and enforcing three handles per edge with a smoothness value of 4 and registering the nodes:

*morphmanagefacemark 3 0 0 3
*morphmanagefacemark 2 5 0 1
*morphmanagefacemark 3 5 0 1
*createmark nodes 1 "displayed"
*createvector 1 0.0000 1.0000 0.0000
*morphfitfaces 0 nodes 1 0 0 1 3 1 2 4 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

11.0