Model.surface_rmesh#

Model.surface_rmesh(collection, min_length, max_length, chordal_deviation, fillet_angle, edge_accuracy, fix_edge_nodes_flag)#

Used by the R-Mesh macro to quickly generate a quad/tria shell mesh for rigid tool surfaces.

Parameters:
  • collection (Collection) – The collection containing the input surface entities.

  • min_length (double) – The smallest acceptable length of edges in mesh elements.

  • max_length (double) – The maximum acceptable length of mesh element edges.

  • chordal_deviation (double) – The maximum allowable chordal deviation between the edge of an element and the adjacent geometry.

  • fillet_angle (double) – The maximum allowable angle between two adjacent elements. Similar to chordal_deviation, it determines the number of element edges that are used to describe the curvature of a given shape.

  • edge_accuracy (double) – Reserved for future development. Must be set to 0.

  • fix_edge_nodes_flag (int) – Reserved for future development. Must be set to 0.

Example#

Create a mesh on displayed surfaces with a minimum element edge length of 0.5, a maximum element edge length of 30, and maximum chordal deviation of 0.1, and a maximum fillet angle of 15 degrees#
import hm
import hm.entities as ent

model = hm.Model()

surface_collection = hm.CollectionByDisplayed(model, ent.Surface)
model.surface_rmesh(
    collection=surface_collection,
    min_length=0.5,
    max_length=30.0,
    chordal_deviation=0.1,
    fillet_angle=15,
    edge_accuracy=0,
    fix_edge_nodes_flag=0,
)

Note

HyperMesh prioritizes these arguments in the same order that they are listed above: min_length is top priority, followed by max_length, then chordal_deviation and fillet_angle. Note that the final two arguments are given equal weight.

In actual practice, some element edges may still be smaller than the min length parameter, because they also depend on the lengths of edges in the model geometry.