Model.split_elements_by_structure_pattern_freeselection#

Model.split_elements_by_structure_pattern_freeselection(collection, refine_size, adjacent_layers)#

Creates a refined mesh inside a selected area and makes the transition using structured patterns .

Parameters:
  • collection (Collection) – The collection containing the input entities. Valid entities are nodes and elems. For nodes, all attached elements are considered.

  • refine_size (double) – The element size for the refinement zone.

  • adjacent_layers (double) – The number of adjacent element layers to use for making transitions.

Examples#

Refine all elements attached to the node with ID 198 to a size of 25.0 , use 1 layer for transition#
import hm
import hm.entities as ent

model = hm.Model()

model.split_elements_by_structure_pattern_freeselection(
    collection=hm.Collection(model, ent.Node, [198]),
    refine_size=25.0,
    adjacent_layers=1.0,
)
Refine the elements with IDs 175 - 180 to a size of 0.5, use 2 layers for transition#
import hm
import hm.entities as ent

model = hm.Model()

model.split_elements_by_structure_pattern_freeselection(
    collection=hm.Collection(model, ent.Element, [175, 176, 177, 178, 179, 180]),
    refine_size=0.5,
    adjacent_layers=2.0,
)