Model.surfacesplinefrommesh#

Model.surfacesplinefrommesh(shellelemcollection, edgeelemcollection, tol)#

Creates geometry on selected 2D mesh elements. Uses selected plot elements to create edges between surfaces.

Parameters:
  • shellelemcollection (Collection) – The collection containing the 2D element entities that are used to create surfaces.

  • edgeelemcollection (Collection) – The collection containing the 1D element entities that are used to create boundaries between created surfaces.

  • tol (double) – Maximal deviation of mesh points from created surfaces at boundaries. If the value is set to 0 or is negative, deviation is calculated internally based on the average size of mesh elements.

Example#

Create geometry that fits the 2D elements with IDs 1,2,3,4 and use the 1D elements with IDs 5,6,7 to create boundaries between surfaces . Use automatically calculated tolerance for created boundaries#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacesplinefrommesh(
    shellelemcollection=hm.Collection(model, ent.Element, [1, 2, 3, 4]),
    edgeelemcollection=hm.Collection(model, ent.Element, [5, 6, 7]),
    tol=0.0,
)