hm_holedetectiongetmatedetails

Returns details about a specific hole/tube mating 'group'.

Syntax

hm_holedetectiongetmatedetails index

Type

HyperMesh Tcl Query Command

Description

Returns details about a specific hole/tube mating 'group'. This must be preceded by a call to hm_holedetectionfindmates.

Inputs

index
The index of the mate to get details for, starting from 0 up to the number of found mating groups minus 1.
The details are returned as follows:
  • total_length {center_top x/y/z} {center x/y/z} {center_bottom x/y/z} number_of_indices {ordered_indices top-to-bottom}
  • Where total_length is the complete length of the hole/tube chain, measured from hole-to-hole and including the depth of any tubes, and center is the center of the hole/tube chain which lies on the center-line connecting holes/tubes.

Example

To write out all geometric shell mate 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
hm_holedetectionfindmates
set n [hm_holedetectiongetnumberofmates]
if { $n > 0 } {
puts $holesfile "Number of mates = $n"
puts $holesfile "Mate details"
for {set i 0} {$i < $n} {incr i} {
puts $holesfile "i = $i [hm_holedetectiongetmatedetails $i]"
}
} else {
puts $holesfile "Holes mates 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