Model.hmmeshsurfacetorus#
- Model.hmmeshsurfacetorus(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.surfacetorus()orModel.surfacetorusfromthreepoints()orModel.surfacetorusfull()function.- Parameters:
quads (int) – If nonzero, specifies that the created elements should be quads.
Example#
Identify a region that corresponds to the upper half of a torus , and without make a surface , creates 400 elements with a density of 40.0 around the major circumference of the torus and 10.0 across the upper half#import hm import hm.entities as ent model = hm.Model() model.surfacemode(mode=3) model.surfacetorus( center=ent.Node(model, 17), major_vector=ent.Node(model, 19), normal_vector=ent.Node(model, 18), minor_radius=20.0, major_radius=115.0, major_start_angle=0.0, major_end_angle=360.0, minor_start_angle=0.0, minor_end_angle=180.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=40.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=40.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.hmmeshsurfacetorus(quads=1) model.storemeshtodatabase(elemstosurfcomp=0) model.ameshclearsurface()