Model.splitelements#

Model.splitelements(method, collection)#

Splits shell elements using various methods.

Parameters:
  • method (int) –

    Defines the method used to split the elements. Valid values are:

    2 - Divide quads, shortest diagonals

    12 - Divide quads, aligned diagonals

    21 - Split all sides

    22 - Divide quads, unionjack diagonals

    23 - Midpoint, to quads

    24 - Midpoint, to trias

    32 - Divide quads, largest angle diagonals

    Add 4 to any method to enable the use of an inferred surface if no geometry exists. Add 100 to any of the “divide quads” methods (method=22 or method=32) to reverse the split direction.

  • collection (Collection) – The collection containing the element entities to split.

Examples#

Split quad elements with IDs 1 - 10 use unionjack diagonals#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements with IDs 1-10
filter_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 11)))
elements_collection = hm.Collection(model, filter_elements)

model.splitelements(method=22, collection=elements_collection)
Split quad elements with IDs 1 - 10 use unionjack diagonals and use an inferred surface#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements with IDs 1-10
filter_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 11)))
elements_collection = hm.Collection(model, filter_elements)

model.splitelements(method=26, collection=elements_collection)