Model.hmmeshsurfacesphere#

Model.hmmeshsurfacesphere(quads)#

Within the automeshing module, generates quad or tria elements using a surfaceless algorithm. Can only be used with model.surfacemode(mode=3) and one of the Model.surfacespherefromfournodes() or Model.surfacespherefromthreepoints() or Model.surfacespherefull() function.

Parameters:

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

Example#

Identify a spherical region pass through the given four nodes , and , without actually build a surface , creates 150 elements with a density of 15.0 along a longitude and 10.0 around the equator#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacemode(mode=3)

model.surfacespherefromfournodes(
    list=[
        ent.Line(model, 159),
        ent.Line(model, 141),
        ent.Line(model, 178),
        ent.Line(model, 228),
    ]
)
model.set_meshedgeparams(
    edge_index=0,
    elem_density=15.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=15.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.hmmeshsurfacesphere(quads=1)
model.storemeshtodatabase(elemstosurfcomp=0)
model.ameshclearsurface()