Model.hmmeshsurfacecone#
- Model.hmmeshsurfacecone(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 theModel.surfacecone()orModel.surfaceconefull()function.- Parameters:
quads (int) – If nonzero, specifies that the created elements should be quads.
Example#
Identify a cylindrical region of radius 100.0 and height 200.0 , and then has the automesher create 300.0 elements on it , with a density of 10.0 up the side and 30.0 around the circumference#import hm import hm.entities as ent model = hm.Model() model.surfacemode(mode=3) model.surfaceconefull(top_center=ent.Node(model,180),bottom_center=ent.Node(model,86),base_radius=100.0,top_radius=100.0,aspect_ratio=1.0,height=200.0) model.set_meshedgeparams( edge_index=0, 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=1, elem_density=30.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=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=3, elem_density=30.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.hmmeshsurfacecone(quads=1) model.storemeshtodatabase(elemstosurfcomp=0) model.ameshclearsurface()