*morphnodesmatrixdiffenvelope

Reorients the selected nodes by taking the difference between two matrices while morphing the affected elements.

Syntax

*morphnodesmatrixdiffenvelope m_entity_type m_mark_id e_entity_type e_mark_id f_entity_type f_mark_id matrix_array matrix_length integ mbias fbias envelope undisplayed

Type

HyperMesh Tcl Modify

Description

This command will reorient the selected nodes by taking the difference between two matrices positioned with respect to the global coordinate system. For each node, the position relative to the initial matrix is found and then relocated to the same relative position with respect to the final matrix. The fixed nodes are held in place and the affected elements (or all unfixed nodes in the model if integ is 3, 6, or 7) are stretched according to the value of integ.

Temporary handles are created for all moving and fixed nodes to determine the stretching of the affected elements. If integ is 0, a general domain is temporarily created for the affected elements. If integ is 1, the domains currently in the model are used. If integ is 2, 1D, 2D, 3D, and edge domains are temporarily created for the affected elements but the 2D domains are not partitioned. If integ is 3 then handle influences are applied using a spatial relationship rather than through a domain. If integ is 4, only the selected moving nodes are moved and all others are held fixed. If integ is 5, 1D, 2D, 3D, and edge domains are temporarily created for the affected elements and the 2D domains are partitioned. Any handles created due to partitioning are moved based on their distance from the moving and fixed nodes. If integ is 6, then handle influences are applied using the kriging algorithm. If integ is 7, then handle influences extend only up to a given distance (if envelope is positive) or a given multiple of the applied perturbations (if envelope is negative) away from the moving nodes.

The bias factors function as they would for handles except that all moving nodes will have the mbias value and all fixed nodes will have the fbias value.

If integ is set to 3, 6, or 7, nodes on undisplayed elements and components can be morphed, fixed, or excluded depending on the value sent in for undisplayed.

Inputs

m_entity_type
Must be set to nodes.
m_mark_id
Mark ID of moving nodes. Valid values are 1 and 2.
e_entity_type
Must be set to elems.
e_mark_id
Mark ID of affected elements. Valid values are 1 and 2.
f_entity_type
Must be set to nodes.
f_mark_id
Mark ID of fixed nodes. Valid values are 1 and 2.
matrix_array
ID of array of doubles, created using *createdoublearray. This should be set to 1. This array defines two 4x4 matrices where the first matrix is at the final orientation and the second matrix is at the initial orientation. The matrices have the following format:
[rxx rxy rxz 0 ryx ryy ryz 0 rzx rzy rzz 0 tx ty tz 1]
matrix_length
The length of matrix_array. Must be set to 32.
integ
0 - Free edges (a single general domain)
1 - Use existing domains
2 - Inferred edges (1D, 2D, 3D, and edge domains - no partitioning)
3 - Morph all nodes using a proximity algorithm
4 - Morph all moving nodes and fix the unselected nodes
5 - Partitioned edges (1D, 2D, 3D, and edge domains with partitioning)
6 - Morph all nodes algorithm using the Kriging algorithm
7 - Morph all nodes within an envelope around the moving nodes
mbias
Bias factor of moving nodes.
fbias
Bias factor of fixed nodes.
envelope
If positive, all nodes beyond the given distance away from the moving nodes will be fixed. If integ is set to 7, the distance given defines an envelope around the moving nodes within which the morphing of those nodes will linearly taper from fully matching the nearest moving node to zero at the edge of the envelope. If any fixed nodes are within the envelope they will also reduce the morphing of nearby nodes.
If negative, all nodes beyond a distance calculated by multiplying the total perturbation of each moving node by the absolute value of the envelope and extended away from each moving node will be fixed. If integ is set to 7, the calculated distance defines an envelope around the moving nodes within which the morphing of those nodes will linearly taper from fully matching the nearest moving node to zero at the edge of the envelope. If any fixed nodes are within the envelope they will also reduce the morphing of nearby nodes.
undisplayed
If integ is set to 3, 6, or 7, nodes which are not displayed can be affected by the morphing. This field can be used to determine how undisplayed nodes are handled:
0 - Morph nodes on undisplayed elements
1 - Fix nodes on undisplayed elements – they will function just like nodes on the fixed mark
2 - Exclude nodes on undisplayed elements – they will not be morphed nor affect the morphing

Examples

To translate and rotate a mark of nodes and stretch all the elements in the model using the existing domains:

*createmark nodes 1 11 12 13
*createmark elems 1 "all"
*createmark nodes 2 21 22 23
*createdoublearray 32 0.866 0.5 0 0 -0.5 0.866 0 0 0 0 1.0 0 1.8 2.6 3.5 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
*morphnodesmatrixdiffenvelope nodes 1 elems 1 nodes 2 1 1 1.0 1.0 0.0 0

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

2019