Model.fill_fe_gaps_elems#

Model.fill_fe_gaps_elems(mode, collection1, collection2, max_width, AdjacentComp=0, ByFeature=0, CurvedFill=0, DefineMaxWidth=0, GuideNodePairs=s_defaultEntityList2, Remesh=0)#

Fills gaps in FE from elements selected on both sides of the gap.

Parameters:
  • mode (int) –

    0 - The input elements are the shell elements defining the boundary, and the gap boundaries are.

    1 - The input elements are 1D elements defining directly the gap boundaries.

  • collection1 (Collection) – The collection containing the element entities at the first boundary.

  • collection2 (Collection) – The collection containing the element entities at the second boundary.

  • max_width (double) – Maximum allowed gap width to be filled.

  • AdjacentComp (unsigned int) –

    0 - Fill elements should be created in a new component.

    1 - Fill elements should be created in the adjacent component.

    2 - Fill elements should be created in the current component.

  • ByFeature (unsigned int) –

    0 - Features should not be considered.

    1 - Features should be considered.

  • CurvedFill (unsigned int) –

    0 - Gaps are filled without taking into consideration the shape of adjacent elements.

    1 - Gaps are filled taking into consideration the shape of adjacent elements, ensuring a smooth fi.

  • DefineMaxWidth (unsigned int) –

    0 - Ignore max_width for gap filling.

    1 - Consider max_width for gap filling.

  • GuideNodePairs (EntityList2) – Specifies an optional list of node IDs in the form “M1 M2 N1 N2 O1 O2 …” where (M1, M2), (N1, N2) and (O1, O2) are node pairs. These pairs are used to divide the gap to be filled into smaller loops. When provided, gaps are filled ensuring that the loops are split at the specified pairs. This aids in filling complex hole shapes by guiding the filling process correctly.

  • Remesh (unsigned int) –

    0 - Fill elements should not be remeshed.

    1 - Fill elements should be remeshed.

Examples#

Fill gaps less than 100 between elements in components with IDs 1 and 5, including remeshing#
import hm
import hm.entities as ent

model = hm.Model()

elems1 = hm.Collection(model, hm.FilterByCollection(ent.Element, ent.Component), hm.Collection(model, ent.Component, [1]))
elems2 = hm.Collection(model, hm.FilterByCollection(ent.Element, ent.Component), hm.Collection(model, ent.Component, [5]))

model.fill_fe_gaps_elems(
      mode=0,
      collection1=elems1,
      collection2=elems2,
      max_width=100.0,
      DefineMaxWidth=1,
      Remesh=1)
Fill gaps between features of two sets of elements using a gap width of 50, and using guide node pairs for correct triangulation#
import hm
import hm.entities as ent
model = hm.Model()

elems1 = hm.Collection(model, ent.Element, list(range(12,19), range(55,101)))
elems2 = hm.Collection(model, ent.Element, list(range(45,51), range(101,167)))

nodeList = [
      [ent.Loadcol(model, 17), ent.Loadcol(model, 18)],
      [ent.Loadcol(model, 25), ent.Loadcol(model, 66)],
]

model.fill_fe_gaps_elems(
      mode=0,
      collection1=elems1,
      collection2=elems2,
      max_width=100.0,
      ByFeature=1,
      AdjacentComp=1,
      GuideNodePairs=nodeList,
      DefineMaxWidth=1,
      Remesh=1)