Model.elemoffset#

Model.elemoffset(collection, density, bias_style, bias, initial_offset, corner_type, thickness_type, thickness, shells_only, offset_type, component_flag)#

Offsets shell elements normally to create solid elements.

Parameters:
  • collection (Collection) – The collection containing the element entities to offset.

  • density (int) – The density (number of layers) of solid elements to create in the normal direction.

  • bias_style (int) – The bias style.

  • bias (double) – The bias intensity value.

  • initial_offset (double) – The initial offset value.

  • corner_type (int) –

    0 - Create elements with square corners.

    1 - Create elements with rounded corners.

    8 - Offset the elements using CFD corners. When this option is specified, an additional mark of surfaces and elements can be specified to specify the geometry to follow.

  • thickness_type (int) –

    0 - Elements are offset by the value of thickness.

    1 - Elements are by the thickness of the selected elements.

    2 - Elements are offset by the thickness from the element size.

    4 - Elements are offset by a distribution with different thickness ratios per node.

  • thickness (double) – The total thickness of the layers of elements to create.

  • shells_only (int) –

    0 - Create hexas and pentas from quads and trias, and create quads from plot elements.

    1 - Create offset quads, trias, and plot elements.

    3 - Thicken shell elements into solids.

  • offset_type (int) –

    0 - Create elements in the positive normal element direction.

    1 - Create elements in the negative normal element direction.

  • component_flag (int) –

    0 - Newly created elements should be organized into the current component.

    1 - Newly created elements should be organized into the component of the input elements.

Example#

Build layers of solid elements by offset shells with IDs 22 and 109#
import hm
import hm.entities as ent

model = hm.Model()

elems = hm.Collection(model, ent.Element, [22,109])

model.elemoffset(
    collection=elems,
    density=3,
    bias_style=0,
    bias=0.0,
    initial_offset=0.5,
    corner_type=1,
    thickness_type=0,
    thickness=1.0,
    shells_only=0,
    offset_type=0,
    component_flag=0
)