hm_holedetectionsettubeparams

Defines parameters for finding tubes in both geometry and FE.

Syntax

hm_holedetectionsettubeparams tube_shape=<> tube_type=<> ?parameter1=<>? ?parameter2=<>? etc

Type

HyperMesh Tcl Query

Description

Defines parameters for finding tubes 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 tube_shape and tube_type are mandatory. All other parameters are optional and have default values. Parameters can be specified in any order.

Inputs

tube_shape=<>
The shape of tube 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 tubes
1 – Consider general tubes
Bit1
0 – Do not consider circular tubes
1 – Consider circular tubes
Circular tubes: 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. Also, no edge must make an angle greater than max_smooth_edge_angle with either adjoining edge.
Bit2
0 – Do not consider rounded tubes
1 – Consider rounded tubes
Rounded tubes: The distance from any of its nodes on the rounded ends to the respective calculated centers must not differ from the calculated radii by more than max_geom_dev_percent. 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 tubes
1 – Consider square tubes
Square tubes: 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 of 90 degrees. And, all four sides must have lengths within max_geom_dev_percent of their average.
Bit4
0 – Do not consider rectangular tubes
1 – Consider rectangular tubes
Rectangular tubes: 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 of 90 degrees. Opposite pairs of sides must have lengths within max_geom_dev_percent of each other.
tube_type=<>
0 – General
1 – Open
2 – Capped on one side
?feature_angle=<>?
Used to identify each connected sequence of feature edges. Specifically a feature edge is one whose adjoining faces form an angle greater than this value. Acceptable values are [0.0, 180], otherwise closer extreme is used. Default value -30.0.
?max_geom_dev_percent=<>?
See tube_shape. Acceptable values are [0.0, 100.0], otherwise closer extreme is used. If less than 0.0, this check is skipped. Default value -1.
?max_height=<>?
The distance between the center of the rims cannot exceed this value. If less than or equal to 0.0, this check is skipped. Default value 0.0.
?max_offset_angle=<>?
For FE tubes, neither normal associated with each rim differs by more than this angle from primary axis. If less than or equal to 0.0, check is avoided – a value of 45.0 is suggested. Default value 0.0.
?max_offset_plane_dev=<>?
Applied to each rim. No node on the perimeter of a tube 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=<>?
Applied to each rim. The maximum planar dimension of tube 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 tube_shape. Acceptable values are [0.0, 90.0], otherwise closer extreme is used. If less than 0.0, this check is skipped. Default value -1.
?min_cone_angle=<>?
The inward facing normal direction of all faces comprising the wall of the tube must make this angle with respect to the primary axis. The primary axis is between the centers of the rims. If less than or equal to 0.0, this check is skipped. A value of 45.0 is recommended. Default value 0.0.
?min_planar_dim=<>?
Applied to each rim. The minimum planar dimension of the tube must exceed this value. If less than or equal to 0.0, this check is skipped. Default value 0.0.
?min_height=<>?
The distance between the center of the rims 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 general tube 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_holedetectionsettubeparams tube_shape=31 tube_type=0
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