Model.hmmeshskin#

Model.hmmeshskin(quads)#

Within the automeshing module, generates quad or tria elements using a surfaceless algorithm that approximates a skin surface. Can only be used together with model.surfacemode(mode=3) and Model.surfaceskin().

Parameters:

quads (int) – If nonzero, specifies that the created elements should be quads.

Example#

Identify a region in the shape of a skin surface across lines with IDs 1 , 2 , 3 , and 4 and then creates 50 quad elements#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacemode(mode=3)
line1 = ent.Line(model, 1)
line2 = ent.Line(model, 2)
line3 = ent.Line(model, 3)
line4 = ent.Line(model, 4)

model.surfaceskin(skin_linelist=[line1, line2, line3, line4], auto_reverse=1)
model.set_meshedgeparams(
    edge_index=0,
    elem_density=5.0,
    alg_type=0,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)
model.set_meshedgeparams(
    edge_index=1,
    elem_density=10.0,
    alg_type=0,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)
model.set_meshedgeparams(
    edge_index=2,
    elem_density=5.0,
    alg_type=0,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)
model.set_meshedgeparams(
    edge_index=3,
    elem_density=10.0,
    alg_type=0,
    bias_style=0,
    bias=0.0,
    min_size=0.0,
    max_size=0.0,
    chordal_dev=0.0,
    max_angle=0.0,
)
model.hmmeshskin(quads=1)
model.storemeshtodatabase(elemstosurfcomp=0)
model.ameshclearsurface()