hm_holedetectionfindholes

Executes the hole/tube detection tools.

Syntax

hm_holedetectionfindholes find

Type

HyperMesh Tcl Query Command

Description

Runs the hole detection functions for finding holes and tubes based on input entities and parameters. This must be preceded by calls to hm_holedetectioninit, hm_holedetectionsetentities, and hm_holedetectionsetholeparams or hm_holedetectionsettubeparams.

Inputs

find
Bit value defining the types of holes and tubes to find (Bit0 + 2*Bit1 + 4*Bit2):
Bit0
0 - Do not find holes
1 - Find holes
Bit1
0 - Do not find 2D tubes
1 - Find 2D tubes
Bit2
0 - Do not find 3D tubes
1 - Find 3D tubes

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