Model.adaptive_wrapper_init#
- Model.adaptive_wrapper_init(collection, clean_intersection, wrap_type)#
Specifies the base mesh which need to be wrapped, along with the type of wrap. Base mesh self intersections can be resolved.
This function must be called before
Model.adaptive_wrapper_build()and must be followed byModel.adaptive_wrapper_end().- Parameters:
collection (Collection) – The collection containing the base mesh on which the wrapping will be performed. Currently only supported for collection of elements.
clean_intersection (int) –
0 - Do not generate intersection lines and remesh base mesh using these intersection lines.
1 - Generate intersection lines and remesh base mesh using these intersection lines.
wrap_type (int) –
0 - Exterior wrap
1 - Cavity wrap
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()