Model.element3Dshiftnodes#
- Model.element3Dshiftnodes(element_entity_3d, mode, shift_value, first_node_entity, last_node_entity, second_node_entity, element_entity_2d)#
This function reorders the nodes in 3D elements based on various modes.
- Parameters:
element_entity_3d (Entity) – The object describing the 3D element entity to reorder.
mode (int) –
Determines how the nodes are reordered.
1 - Reorder the nodes as defined by the shift_value argument (2 digit value).
2 - Reorder the nodes defined by 3 nodes in the 3D element. The
first_node_id,last_node_idandsecond_node_idarguments define the new base face.3 - Reorder the nodes by referencing a face element defined by the
element_id_2Dargument.4 - Reorder the nodes as defined by the
shift_value(1 digit value) andfirst_node_idarguments.shift_value (int) – When
mode=1, this is a 2 digit integer. The first digit defines the element’s new base face index, while the second defines the index of the new first node for that face. Whenmode=4, this is a 1 digit integer. The digit defines the element’s new base face index.first_node_entity (Entity) – The object describing the first node entity in the reordered 3D element, when
mode=2, or the first node in the new base, whenmode=4.last_node_entity (Entity) – The object describing the last node entity in the reordered 3D element base face, when
mode=2.second_node_entity (Entity) – The object describing the second node entity in the reordered 3D element base face, when
mode=2.element_entity_2d (Entity) – The object describing the 2D element entity to use as the base face for the reordered 3D element. The first node of this 2D element becomes the first node of the 3D element.
Examples#
Reorder nodes in hexa element with ID 213 so that the first node of the third face becomes the element ‘s first node#import hm import hm.entities as ent model = hm.Model() model.element3Dshiftnodes( element_entity_3d=ent.Element(model, 213), mode=1, shift_value=31, first_node_entity=ent.Element(model, 0), last_node_entity=ent.Element(model, 0), second_node_entity=ent.Element(model, 0), element_entity_2d=ent.Element(model, 0), )
Reorder nodes in hexa element with ID 213 so that the face contain nodes with IDs 137 , 138 , and 139 becomes the hexa ‘s base face :#import hm import hm.entities as ent model = hm.Model() model.element3Dshiftnodes( element_entity_3d=ent.Element(model, 213), mode=2, shift_value=0, first_node_entity=ent.Element(model, 137), last_node_entity=ent.Element(model, 138), second_node_entity=ent.Element(model, 139), element_entity_2d=ent.Element(model, 0), )
Reorder nodes in hexa element with ID 213 so that its quadrilateral face element with ID 94 becomes the hexa ‘s new base face , and quad 94 ‘s first node becomes the hexa ‘s first node#import hm import hm.entities as ent model = hm.Model() model.element3Dshiftnodes( element_entity_3d=ent.Element(model, 213), mode=3, shift_value=0, first_node_entity=ent.Element(model, 0), last_node_entity=ent.Element(model, 0), second_node_entity=ent.Element(model, 0), element_entity_2d=ent.Element(model, 94), )
Reorder nodes in hexa element with ID 213 so that node with ID 94 of the third face becomes the hexa ‘s first node#import hm import hm.entities as ent model = hm.Model() model.element3Dshiftnodes( element_entity_3d=ent.Element(model, 213), mode=4, shift_value=3, first_node_entity=ent.Element(model, 94), last_node_entity=ent.Element(model, 0), second_node_entity=ent.Element(model, 0), element_entity_2d=ent.Element(model, 0), )