hm_holedetectionsetholeparams

Defines parameters for finding 2D holes in both geometry and FE.

Syntax

hm_holedetectionsetholeparams hole_shape=<> ?parameter1=<>? ?parameter2=<>? etc...

Type

HyperMesh Tcl Query Command

Description

Defines parameters for finding 2D holes in both geometry and FE. Multiple calls to this command can be made to override or redefine the parameters for each hole shape. Settings are cleared on any call to hm_holedetectioninit/hm_holedetectionend.

This must be preceded by a call to hm_holedetectioninit.

Only hole_shape is mandatory. All other parameters are optional and have default values. Parameters can be specified in any order.

Inputs

hole_shape=
The shape of hole the parameters are being defined for. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3 + 16*Bit4).
Bit0
0 - Do not consider general holes
1 - Consider general holes
Bit1
0 - Do not consider circular holes
1 - Consider circular holes
Circular holes: The distance from any of its nodes to the calculated center must not differ from the calculated radius by more than max_geom_dev_percent and max_geom_dev_abs (if enabled). Also, no edge must make an angle greater than max_smooth_edge_angle with either adjoining edge.
Bit2
0 - Do not consider rounded holes.
1 - Consider rounded holes.
Rounded holes: The distance from any of the nodes on the rounded ends to the respective calculated centers must not differ from the calculated radii by more than max_geom_dev_percent and max_geom_dev_abs (if enabled). The radii must be within max_geom_dev_percent of each other. Also, no edge must make an angle greater than max_smooth_edge_angle with either adjoining edge. Opposite straight sides must have lengths within max_geom_dev_percent of each other.
Bit3
0 - Do not consider square holes.
1 - Consider square holes.
Square holes: At every node except four, no edge must make an angle greater than max_smooth_edge_angle. At those four nodes, the measured angle is within max_geom_dev_percent and max_geom_angle_dev_abs (if enabled) of 90 degrees. And, all four sides must have lengths within max_geom_dev_percent and max_geom_dev_abs (if enabled) of their average. The sides must have a relative deviation from straight lines of not more than max_straightness_dev_percent.
Bit4
0 - Do not consider rectangular holes.
1 - Consider rectangular holes.
Rectangular holes: At every node except four, no edge must make an angle greater than max_smooth_edge_angle. At those four nodes, the measured angle is within max_geom_dev_percent and max_geom_angle_dev_abs (if enabled) of 90 degrees. Opposite pairs of sides must have lengths within max_geom_dev_percent and max_geom_dev_abs (if enabled) of each other. The sides must have a relative deviation from straight lines of not more than max_straightness_dev_percent.
?hole_type=<>?
The hole type to consider. If 0 (default), the holes type check is skipped. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 8*Bit3).
Bit0
0 - Do not consider surface holes.
1 - Consider surface holes.
Surface holes: Holes with small angle deviation of axis of adjacent surface normals.
Bit1
0 - Do not consider flanged surface holes
1 - Consider flanged surface holes
Flanged surface holes: Holes with bent edges (stiffness ring rib).
Bit2
0 - Do not consider cylindrical holes.
1 - Consider cylindrical holes.
Cylindrical holes: Free edge loops of cylinders.
Bit3
0 - Do not consider conical holes.
1 - Consider conical holes.
Conical holes: Free edge loops of cones.
?max_avg_adj_surf_angle=<>?
Maximum average angle deviation of holes axial direction of adjacent surfaces normals. Acceptable values are [0.0, 90.0]. If less than 0.0, this check is skipped. Default value 45 degrees.
?max_big_planar_dim=<>?
This threshold applies to the rounded (elongated) and rectangular holes. The maximum planar dimension of the hole cannot exceed this value. If less than or equal to 0.0, this check is skipped. Default value 0.0.
?max_geom_angle_dev_abs=<>?
Sets the absolute angle threshold for deviation of corner angles of rectangular holes from right angle, see holes_shape. Acceptable values are [0.0, 90.0], otherwise the closer extreme is used. If less than 0.0, this check is skipped. Default value -1.
?max_geom_dev_abs=<>?
Sets the absolute threshold for linear hole shape deviation, see hole_shape. If less than 0.0, this check is skipped. Default value -1.
?max_geom_dev_percent=<>?
Sets the relative threshold for hole linear and angle shape deviation, see hole_shape. Acceptable values are [0.0, 100.0], otherwise the closer extreme is used. If less than 0.0, this check is skipped. Default value -1.
?max_offset_plane_dev=<>?
No node on the perimeter of a hole must exceed this distance from the mean plane. If less than or equal to 0.0, this check is skipped. Default value 0.0.
?max_planar_dim=<>?
The maximum width of the hole cannot exceed this value. If less than or equal to 0.0, this check is skipped. Default value 0.0.
?max_smooth_edge_angle=<>?
See hole_shape. Acceptable values are [0.0, 90.0], otherwise the closer extreme is used. If less than 0.0, this check is skipped. Default value -1.
?max_straightness_dev_percent=<>?
Sets the relative threshold for the chordal deviation of the sides of rectangular holes of straight lines, see hole shape. Acceptable values are [0.0, 100.0], otherwise the closer extreme is used. If less than 0.0, this check is skipped. Default value -1.
?min_planar_dim=<>?
The minimum width of the hole must exceed this value. If less than or equal to 0.0, this check is skipped. Default value 0.0.

Example

To write out all geometric shell hole details to a file named C:/temp/holes.txt:
set holesfile [open "C:/temp/holes.txt" "w"]
hm_holedetectioninit
*createmark surfs 1 all
hm_holedetectionsetentities surfs 1
hm_holedetectionsetholeparams hole_shape=31 
hm_holedetectionfindholes 1
set n [hm_holedetectiongetnumberofholes]
if { $n > 0 } {
puts $holesfile "Number of holes = $n"
puts $holesfile "Holes details"
for {set i 0} {$i < $n} {incr i} {
puts $holesfile "i = $i [hm_holedetectiongetholedetails $i]"
}
} else {
puts $holesfile "Holes not detected."
}
hm_holedetectionend
close $holesfile

Errors

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

Version History

14.0