Model.hmshrinkwrap#

Model.hmshrinkwrap(entity_collection, elems_collection, wrap_type, elem_size, warpage_value)#

The shrink wrap function allows a complex FE model to be simplified quickly into an approximation of the original FE representation. The capability works by removing and blending out features of the original part to remove complexity.

Parameters:
  • entity_collection (Collection) – The collection containing the input components or element entities.

  • elems_collection (Collection) – The collection containing the feature element entities. It should be different from entity_collection. Considered for tight wrap only.

  • wrap_type (int) –

    1 - Loose wrap mesh.

    2 - Tight wrap mesh.

  • elem_size (double) – Element size for shrink wrap meshing.

  • warpage_value (double) – Warpage value, above which the shrink wrap elements will be split. Enabled for tight wrap mesh only. If warpage_value=-1.0 the alogrithm will ignore splitting of elements in tight wrap mode.

Example#

Loosely wrapping displayed elements with an element size of 2.0#
import hm
import hm.entities as ent

model = hm.Model()

element_collection = hm.CollectionByDisplayed(model, ent.Element)

model.hmshrinkwrap(
    entity_collection=element_collection,
    elems_collection=hm.Collection(model, ent.Element, populate=False),
    wrap_type=1,
    elem_size=2.0,
    warpage_value=-1.0,
)