Model.defaultremeshsurf#
- Model.defaultremeshsurf(collection, elem_size, elem_type, elem_type_2, previous_settings, comp_mode, size_control, skew_control, mesh_type, min_size, max_size, chordal_dev, max_angle)#
Re-meshes a selection of surfaces using saved or default parameters and various options, and deletes any elements already meshed on those surfaces.
- Parameters:
collection (Collection) – The collection containing the surface entities to re-mesh.
elem_size (double) – The default element size used to calculate element densities along edges (when necessary).
elem_type (int) –
Flag indicating the elements generated for mapped meshing algorithms. Valid values are:
0 - trias
1 - quads
2 - mixed
3 - right trias
4 - quads only
elem_type_2 (int) –
Flag indicating the elements generated for free meshing algorithms. Valid values are:
0 - trias
1 - quads
2 - mixed
3 - right trias
4 - quads only
previous_settings (int) –
Flag indicating whether to break, keep or redo connectivity between neighboring surfaces. Valid values are:
0 - Keep previous settings and do not break connectivity between neighboring surfaces.
1 - Break connectivity between neighboring surfaces.
2 - Keep connectivity between neighboring surfaces.
3 - Redo connectivity between neighboring surfaces by expanding surface selection by one layer of adjacent surfaces.
comp_mode (int) –
Parameter specifying how entities are organized into components. Valid options are:
0 - Elements are created in the current component.
1 - Elements are created in the same components as their parent surfaces.
size_control (int) –
Flag indicating whether to create uniformly sized elements. Valid options are:
0 - Do not create uniformly sized elements.
1 - Create uniformly sized elements.
skew_control (int) –
Flag indicating whether to create optimally shaped elements when using mapping algorithms. Valid options are:
0 - Do not create optimally shaped elements.
1 - Create optimally shaped elements.
mesh_type (int) –
Parameter specifying the meshing algorithm for edge/surface meshing. Valid options are:
1 - Standard edge meshing.
2 - Chordal deviation edge meshing.
3 - Proximity based surface meshing.
4 - Proximity and curvature based surface meshing.
5 - Curvature based surfaced meshing.
6 - Proximity and curvature based meshing with free edge deviation.
7 - Curvature based surface meshing with free edge deviation.
11 - Standard edge meshing with flow “align” control.
12 - Chordal deviation edge meshing with flow “align” control.
14 - Standard edge meshing with flow “align” and “size” control.
min_size (double) – The minimum edge size for chordal deviation meshing. Ignored otherwise.
max_size (double) – The maximum edge size for chordal deviation meshing. Ignored otherwise.
chordal_dev (double) – The chordal deviation value for chordal deviation meshing. Ignored otherwise.
max_angle (double) – The maximum angle (in degrees) between edges for chordal deviation meshing. Ignored otherwise.
Example#
Re-meshing using quads using a default edge size of 1.0 for the surface with ID 3#import hm import hm.entities as ent model = hm.Model() inp_col = hm.Collection(model, ent.Surface, [3]) model.defaultremeshsurf( collection=inp_col, elem_size=1.0, elem_type=1, elem_type_2=1, previous_settings=1, comp_mode=0, size_control=0, skew_control=0, mesh_type=1, min_size=0.0, max_size=0.0, chordal_dev=0.0, max_angle=0.0, )
Re-meshing using mixed type elements for the size controlled mapping algorithm using tria transitions, trias for free mesh and chordal deviation edge meshing for surfaces 3, 5 and 6#import hm import hm.entities as ent model = hm.Model() inp_col = hm.Collection(model, ent.Surface, [3, 5, 6]) model.defaultremeshsurf( collection=inp_col, elem_size=1.0, elem_type=1, elem_type_2=0, previous_settings=1, comp_mode=0, size_control=1, skew_control=0, mesh_type=1, min_size=0.5, max_size=30.0, chordal_dev=0.1, max_angle=15.0, )