Model.rejectmesh#
- Model.rejectmesh(faceindex)#
Discards a generated mesh (if any) for the specified face within the automeshing module.
- Parameters:
faceindex (unsigned int) – The index of the face into the particular surface under consideration.
Note
This function must precede any call to
Model.storemeshtodatabase()for the givenfaceindex.Example#
Discard mesh of face 2 in a given surface. For complete example please see example inModel.ameshclearsurface()orModel.interactivemeshsurf()#import hm import hm.entities as ent model = hm.Model() # Before we have set the edge and face parameters for automeshing module model.automesh(face_index=3, algorithm=1, elem_type=1) # Smoothing # .... model.smoothelements(faceindex=2, smoothmethod=1, iterations=10) model.smoothelements(faceindex=3, smoothmethod=1, iterations=10) # Discarding mesh of face 2 model.rejectmesh(faceindex=2) # Setting again new parameters for face 2 and after setting new parameters... #...new elements are generated for the current surface. model.set_meshedgeparams( edge_index=8, elem_density=6, alg_type=0, bias_style=0, bias=-2.0, min_size=0.0, max_size=0.0, chordal_dev=0.0, max_angle=0.0, ) model.set_meshedgeparams( edge_index=5, elem_density=3, 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=6, elem_density=5, alg_type=0, bias_style=0, bias=2.0, min_size=0.0, max_size=0.0, chordal_dev=0.0, max_angle=0.0, ) model.set_meshedgeparams( edge_index=7, elem_density=8, 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_meshfaceparams( face_index=2, shape_type=1, elem_type=1, alg_type=0, elem_size=0, smooth_method=0, smooth_tol=0.1, size_control=0, skew_control=0, ) model.automesh(face_index=2, algorithm=1, elem_type=1) model.storemeshtodatabase(elemstosurfcomp=0)