*element2Dshiftnodes
Reorders the nodes in a 2D element.
Syntax
*element2Dshiftnodes element_id mode shift_value first_node_id second_node_id direction_vector
Type
HyperMesh Tcl Modify
Description
Reorders the nodes in 2D elements based on various modes.
Inputs
- element_id
- The 2D element ID to reorder.
- mode
- Determines how the nodes are reordered.
- 1 - Shift the first node by the value given by shift_value.
- 2 - Shift the first node by the value given by shift_value and reverse the element orientation.
- 3 - Make first_node_id the first node.
- 4 - Make first_node_id the first node and reverse the element orientation.
- 5 - Make first_node_id the first node and second_node_id the second. This may reverse the element orientation.
- 6 - Find the element’s oriented side closest to the direction of direction_vector and set the first 2 nodes to be this side.
- 7 - Find the element’s oriented side closest to the direction of direction_vector and set the first 2 nodes to be this side with the reverse orientation.
- shift_value
- When mode is 1 or 2, this is an integer defining the shift of the element nodes.
- first_node_id
- When mode is 3, 4 or 5, this defines the first node in the reordered 2D element.
- second_node_id
- When mode is 5, this defines the second node in the reordered 2D element.
- direction_vector
- The vector ID closest to the orientation of the element’s first and second nodes. This vector is created with *createvector.
Example
If the original element ID 100 is ordered with nodes 34, 62, 88, 11.
*element2Dshiftnodes 100 1 2 0 0 0
*element2Dshiftnodes 100 2 2 0 0 0
*element2Dshiftnodes 100 3 0 62 0 0
*element2Dshiftnodes 100 4 0 62 0 0
*element2Dshiftnodes 100 5 0 88 62 0
*createvector 1 0.0000 1.0000 0.0000
*element2Dshiftnodes 100 6 0 0 0 1
*createvector 1 0.0000 1.0000 0.0000
*element2Dshiftnodes 100 7 2 0 0 1
Errors
if { [ catch {command_name...} ] } {
# Handle error
}