*hm_auto_elem_cleanup

Attempts to improve the selected elements using element cleanup tools.

Syntax

*hm_auto_elem_cleanup mark_id use_surround remove_folded reduce_trias fix_failed qi_smooth feature_angle criteria_file inverse_angle options qi_target

Type

HyperMesh Tcl Modify

Description

Attempts to improve the selected elements using element cleanup tools. This is applied to a selection of shell elements to improve the element quality using four cleanup options:
  • remove folded elements
  • reduce triangular elements in mixed shell meshes
  • fix elements failing the element quality checks
  • smooth elements to optimize element quality

Inputs

mark_id
The ID of the mark containing the input shell elements. Valid values are 1 and 2.
use_surround
Indicates whether some elements surrounding the selection can be used in the element cleanup process:
0 – Do not use surrounding elements
1 – Allow surrounding elements to be included
remove_folded
Indicates whether to use the remove folded elements cleanup option:
0 – Do not use the remove folded elements cleanup option
1 – Use the folded elements cleanup option
reduce_trias
Indicates whether to use the reduce triangular elements cleanup option.
0 – Do not use the reduce triangular elements cleanup option
1 – Use the reduce triangular elements cleanup option
fix_failed
Indicates whether to use the fix failed elements cleanup option.
0 – Do not use the fix failed elements cleanup option
1 – Use the fix failed elements cleanup option
qi_smooth
Indicates whether to use the optimizing element quality index cleanup option:
0 – Do not use the optimizing element quality index cleanup option
1 – Use the optimizing element quality index cleanup option
feature_angle
The angle to use to define features in the range of 0 to 360. A common value is 30.
criteria_file
The path to the criteria file. If the criteria are set using the *reset_qa_calculator command, "dummy" can be used as the criteria file name
inverse_angle
The angle to use to define folded elements in the range of 90 to 180. A common value is 150.
options
Flags that specify various additional options/behaviors. Bit values are used and the value is calculated as (Bit0 + 2*Bit1).
Bit0
Shared surface edge handling.
0 – Do not maintain shared surface edges.
1 – Maintain shared surface edges.
Bit1
Connectivity between 2D element edges shared with 1D and 3D elements during cleanup.
0 – Do not maintain connectivity. Elements that have this connectivity may become disconnected after cleanup.
1 – Maintain connectivity. Elements that have this connectivity will remain connected after cleanup.
qi_target
The target quality index value to use if qi_smooth is set to 1.

Example

To cleanup the displayed elements using QI criteria set using the *reset_qa_calculator command:

*createdoublearray 89 1 2 12 10 8 5 4.5 1 1.5 12 14 16 19 25 1 1 1 2 4 5 10  1 2 0 5 15 20 40 1 1 90 110 140 150 165 1 1 90 70 40 30 15 1 1 60 80 120 130 155 1 1 60 50 30 20 10 1 1.5 0 10 50 60 75 1 2 1 0.9 0.6 0.5 0.35 0 0 0 0.3 0.8 1 2 1 2 0 3.846 6.615 8 10.31 0 0 0.5 1 5
*reset_qa_calculator 1 89
*createmark elements 1 "displayed"
*hm_auto_elem_cleanup 1 1 1 1 1 1 30 "dummy" 150 1 0.2

Errors

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