Model.optimized_elements_remesh2#
- Model.optimized_elements_remesh2(collection, criteria_file, elem_size, elem_type, feature_angle, vertex_angle, comp_mode, break_flag, algorithm)#
Remeshes elements with the selection of the best meshing algorithm and optimization of node positions.
- Parameters:
collection (Collection) – The collection containing the element entities to remesh.
criteria_file (hwString) – The path and file name of the criteria file. Set the value to “dummy” to use the default file.
elem_size (double) – The default element size used to calculate element densities along edges, when necessary. Element sizes along shared edges cannot be changed.
elem_type (int) –
The type of elements to create. Valid values are:
0 - trias
1 - quads
2 - mixed
3 - right trias
4 - quads only
feature_angle (double) – The angle, in degrees, specifying the feature lines. This is approximately the minimal internal angle between the elements adjacent to a feature line. Valid values are between
18-90degrees.vertex_angle (double) – The angle between two edge segments when a vertex is created.
comp_mode (int) –
A flag that specifies how the elements are organized. Valid values are:
0 - Elements are created in the current component.
1 - Elements are created in the same component as their parent surface(s).
break_flag (int) –
Determines if connectivity will be broken along shared edges between elements when a different element size is chosen. Valid values are:
0 - Do not break connectivity.
1 - Break connectivity.
algorithm (int) –
Determines the algorithm for meshing. Valid values are:
0 - Standard meshing
1 - Meshing with flow “align” control
3 - Meshing with flow “align” and “size” control
Example#
Re - mesh the displayed elements with element size 10 , mixed elements type , and optimize node positions use * default * criteria file (criteria_file="dummy ") , feature and vertex angle of 30 degrees , and meshing flow with align and size control#import hm import hm.entities as ent model = hm.Model() remesh_elems_col = hm.CollectionByDisplayed(model, ent.Element) model.optimized_elements_remesh2( collection=remesh_elems_col, criteria_file="dummy", elem_size=10.0, elem_type=2, feature_angle=30.0, vertex_angle=30.0, comp_mode=1, break_flag=0, algorithm=3, )