Model.adaptive_wrapper_build#
- Model.adaptive_wrapper_build()#
Builds the skeletal octree structure for the adaptive wrap mesher. It performs proximity checks, refines the octree based on various input parameters, and also identifies gaps holes and patches them.
This function must be called between
Model.adaptive_wrapper_init()andModel.adaptive_wrapper_end().It uses input defined by
Model.adaptive_wrapper_set_features(),Model.adaptive_wrapper_set_params()andModel.adaptive_wrapper_proximity_params().Example#
Usage of the adaptive_wrapper_build functions#import hm import hm.entities as ent model = hm.Model() # Initialization of wrapper mesh with base mesh elems = hm.Collection(model, ent.Element) model.adaptive_wrapper_init(collection=elems, clean_intersection=1, wrap_type=0) # Define features model.adaptive_wrapper_set_features( feature_type=1, collection=elems, feature_angle=30.0, clean_features=1, clean_tol=1.0, ) # Set various meshing and refinement parameters model.adaptive_wrapper_set_params( max_elem_size=10.0, min_elem_size=0.1, string_array=[ "LeakCheckNodes: 20 24 19", "GapPatchTolerance: 3.0", "HolePatchTolerance: 10.0", "RefineByBoxCompIds: 4 5 6", "RefineByNodeCurvature: 1", "RefineByFeatureProximity: 0", "RefineByAllElemSize: 1", ], ) # Proximity options model.adaptive_wrapper_proximity_params( self_proximity_for_all=1, prox_lower_bound=0.2, string_array=[ "WithinGroup: 0.5 1 3 10 12 13", "WithinGroup: 1.5 3 9 20", "AcrossGroup: 0.5 3 10 12 13 4 9 8 7 19", ], ) # Build skeletal octree structure model.adaptive_wrapper_build() # Generate mesh model.adaptive_wrapper_mesh(mesh_type=0, DoRemesh=1, RemeshGrowthRate=1.2) # End of wrapper mesh model.adaptive_wrapper_end()