hm_holedetectiongetholedetails

Returns details about a specific hole/tube.

Syntax

hm_holedetectiongetholedetails index

Type

HyperMesh Tcl Query Command

Description

Returns details about a specific hole/tube. This must be preceded by a call to hm_holedetectionfindholes.

Inputs

index
The index of the hole to get details for, starting from 0 up to the number of found holes minus 1.
General hole:
0 0 {center x/y/z} {axis x/y/z} {entities ordered lines/nodes} {0 - No washer elements, 1 - Washer elements; Always 0 for geometry holes}
Circular hole:
0 1 radius {center x/y/z} {axis x/y/z} {entities ordered lines/nodes} {0 - No washer elements, 1 - Washer elements; Always 0 for geometry holes}
Rounded hole:
0 2 radius1 {center1 x/y/z} radius2 {center2 x/y/z} length {center x/y/z} {axis x/y/z} {entities ordered lines/nodes} {0 - No washer elements, 1 - Washer elements; Always 0 for geometry holes}
Square hole:
0 3 length {center x/y/z} {axis x/y/z} {entities ordered lines/nodes} {0 - No washer elements, 1 - Washer elements; Always 0 for geometry holes}
Rectangular hole:
0 4 length width {center x/y/z} {axis x/y/z} {entities ordered lines/nodes} {0 - No washer elements, 1 - Washer elements; Always 0 for geometry holes}
General tube:
1 0 {center_top x/y/z} {axis_top x/y/z} {rim_entities_top ordered lines/nodes} depth {tube_entities surfaces/shells/solids and face indicies} capped_flag {center_bottom x/y/z} {axis_bottom x/y/z} {rim_entities_bottom ordered lines/nodes}
Circular tube:
1 1 radius_top {center_top x/y/z}  {axis_top x/y/z} {rim_entities_top ordered lines/nodes} depth {tube_entities surfaces/shells/solids and face indicies} capped_flag radius_bottom {center_bottom x/y/z}  {axis_bottom x/y/z} {rim_entities_bottom ordered lines/nodes}
Rounded tube:
1 2 radius1_top {center1_top x/y/z} radius2_top {center2_top x/y/z}  length_top {center_top x/y/z}  {axis_top x/y/z}  {rim_entities_top ordered lines/nodes} depth {tube_entities surfaces/shells/solids and face indicies} capped_flag radius1_bottom {center1_bottom x/y/z} radius2_bottom {center2_bottom x/y/z} length_bottom {center_bottom x/y/z}  {axis_bottom x/y/z} {rim_entities_bottom ordered lines/nodes}
Square tube:
1 3 length_top {center_top x/y/z}  {axis_top x/y/z}  {rim_entities_top ordered lines/nodes} depth {tube_entities surfaces/shells/solids and face indicies} capped_flag length_bottom {center_bottom x/y/z}  {axis_bottom x/y/z}  {rim_entities_bottom ordered lines/nodes} 
Rectangular tube:
1 4 length_top width_top {center_top x/y/z}  {axis_top x/y/z}  {rim_entities_top ordered lines/nodes} depth {tube_entities surfaces/shells/solids and face indicies} capped_flag length_bottom width_bottom {center_bottom x/y/z}  {axis_bottom x/y/z}  {rim_entities_bottom ordered lines/nodes} 

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