hm_holedetectionend

Clear memory and ends the hole/tube detection module.

Syntax

hm_holedetectionend

Type

HyperMesh Tcl Query

Description

Clears memory and ends the hole detection module. This must be preceded by any calls to hm_holedetectioninit and other hm_holedetection* APIs.

"Major" database changes made while inside of the hole detection module will invalidate and delete any results.

Example

To write out all geometric shell hole details to a file named C:/temp/holes.txt:

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