Model.adaptive_wrapper_set_features#
- Model.adaptive_wrapper_set_features(feature_type, collection, feature_angle, clean_features, cleanup_tol)#
Assigns/extracts features for the adaptive wrapper mesher.
This function must be called after
Model.adaptive_wrapper_init()and beforeModel.adaptive_wrapper_build().- Parameters:
feature_type (int) –
The feature extraction scheme. Valid values are:
1 - Simple feature extraction
2 - Connected feature extraction
3 - User defined features
4 - Do not use features
collection (Collection) – The collection containing user-defined plotel feature elements. Only used if
feature_type=3.feature_angle (double) – If
feature_type=1or=2, this is the feature angle used for feature extraction.clean_features (int) – 1 - Cleans features based on feature overlap. This is used to avoid excessive refinement.
cleanup_tol (double) – If
clean_feature=1, this is the tolerance used to check for feature overlap.
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()