Model.elementsaddnodesfixed#

Model.elementsaddnodesfixed(elements_collection, nodes_collection)#

Marks the specified nodes of the old elements as fixed nodes (nodes that must be retained in the mesh to be created) before using the functions for remeshing/meshing by elements.

Parameters:
  • elements_collection (Collection) – The collection containing the element entities that are considered for remeshing/meshing by elements.

  • nodes_collection (Collection) – The collection containing the node entities specifying the nodes to be retained in the new mesh.

Note

The use of this function implies that it will be followed by a function that performs remeshing/meshing by elements, such as:

Example#

Re - mesh the elements with IDs 154 , 155 , 158 , 159 , 160 , 161 , 164 , 165 , 339 , 341 , 343 , 345 , and 347 , and retain the nodes with IDs 210 , 277 , and 370 in the mesh to be created#
import hm
import hm.entities as ent

model = hm.Model()

remesh_elems_col = hm.Collection(
    model,
    ent.Element,
    [154, 155, 158, 159, 160, 161, 164, 165, 339, 341, 343, 345, 347],
)

retain_nodes_col = hm.Collection(model, ent.Node, [210, 277, 370])

model.elementsaddnodesfixed(
    elements_collection=remesh_elems_col, nodes_collection=retain_nodes_col
)

model.defaultremeshelems(
    collection=remesh_elems_col,
    elem_size=3.0,
    elem_type=2,
    elem_type_2=2,
    comp_mode=0,
    size_control=1,
    skew_control=1,
    edge_mesh_type=1,
    min_size=0.0,
    max_size=0.0,
    max_deviation=0.0,
    max_angle=0.0,
    previous_settings=0,
    vertex_angle=30,
)