Model.renumberelemsnodesasmapgrid#

Model.renumberelemsnodesasmapgrid(elem_collection, origin_node_id, x_ref_node_id, elem_start_id, node_start_id)#

Orders nodes and elements in grid format and renumber nodes and elements with specified start ID.

Parameters:
  • elem_collection (Collection) – The collection containing the element entities to renumber. Only quad elements are allowed.

  • origin_node_id (int) – The ID of the node to use as the origin of the grid.

  • x_ref_node_id (int) – The ID of the node to use as the x-axis of the grid.

  • elem_start_id (int) – The starting ID to use for renumbering the elements.

  • node_start_id (int) – The starting ID to use for renumbering the nodes.

Example#

Renumbere all elements , use node with ID 4 as the origin , node with ID 1 as the x - axis , with IDs start at ID 100 for both nodes and elements#
import hm
import hm.entities as ent

model = hm.Model()

model.renumberelemsnodesasmapgrid(
    elem_collection=hm.Collection(model, ent.Element),
    origin_node_id=4,
    x_ref_node_id=1,
    elem_start_id=100,
    node_start_id=100,
)