*optimized_mesh

Generates a mesh with the selection of the best meshing algorithm and optimization of node positions.

Syntax

*optimized_mesh mark_id filename elem_size elem_type smooth_across feature_angle algorithm do_remesh comp_mode

Type

HyperMesh Tcl Modify

Description

This command is used to create a mesh on a surface using saved or default parameters on surfaces and specifying various options. Any elements attached to the input surfaces are deleted before the meshing operation.

Inputs

mark_id
The mark ID containing the surfaces to mesh. Valid values are 1 and 2.
criteria_file
The full path and filename for the user-defined quality index criteria file. If no file is given, "dummy" should be specified.
elem_size
The default element size used to calculate element densities along edges for topology cleanup operations.
elem_type
The type of elements to create. Valid values are:
  • 0 - trias
  • 1 - quads
  • 2 - mixed
  • 3 - right trias
  • 4 - quads only
smooth_across
Flag indicating whether to ignore surface edges for element smoothing and cleanup operations. Valid values are:
  • 0 – Honor surface edges for element smoothing and cleanup.
  • 1 – Ignore surface edges for element smoothing and cleanup.
feature_angle
The angle, in degrees, specifying the feature lines. This is approximately the minimum angle between the elements adjacent to a feature line.
algorithm
Determines the algorithm for surface meshing. Valid values are:
  • 0 – Standard surface meshing
  • 1 – Meshing with flow "align" control
  • 3 – Meshing with flow "align" and "size" control
do_remesh
Flag indicating whether to keep or delete existing elements on the surfaces. Valid values are:
  • 0 – Keep existing elements on selected surfaces.
  • 1 – Delete existing elements on selected surfaces.
comp_mode
Parameter specifying how entities are organized into components:
  • 0 – Elements are created in the current component.
  • 1 – Elements are created in the same components as their parent surfaces.

Example

To start the optimization process with a criteria file named C:/criteria/mycriteria.txt for displayed surfaces, with tria elements, element size of 15, feature angle of 35 degrees, ignoring surface edges for smoothing and new elements created in their surface components:

*createmark surfaces 1 displayed
*optimized_mesh 1 "C:/criteria/mycriteria.txt" 15 0 0 1 35 0 0 1

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}