Model.hmmeshsurfaceplane#

Model.hmmeshsurfaceplane(quads)#

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

Parameters:

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

Example#

Create a square , planar surface normal to the x axis with the center at the origin , of size 10.0 , and create 45 elements#
import hm
import hm.entities as ent

model = hm.Model()

model.surfacemode(mode=3)

model.surfaceplane(plane_normal=[1.0,0.0,0.0],plane_base=[0.0,0.0,0.0],size=10.0)
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=9.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=9.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.hmmeshsurfaceplane(quads=1)
model.storemeshtodatabase(elemstosurfcomp=0)
model.ameshclearsurface()