hm_holedetectiongetholedetailsdata

Returns details about a specific query for a hole/tube.

Syntax

hm_holedetectiongetholedetailsdata index query_key

Type

HyperMesh Tcl Query Command

Description

Returns details about a specific query for a hole/tube.

Inputs

index
The index of the hole/tube to get details for, starting from 0.
query_key
The keyword to be used for a specific shape type. Valid values are:
axis
The x/y/z coordinates of the axis. Valid for all holes.
axis_bottom
The x/y/z coordinates of the bottom axis. Valid for all tubes.
axis_top
The x/y/z coordinates of the top axis. Valid for all tubes.
capped_flag
Returns true if there is a capped hole. Valid for all tubes.
center
The x/y/z coordinates of the center. Valid for all holes.
center_bottom
The x/y/z coordinates of the bottom center. Valid for all tubes.
center_top
The x/y/z coordinates of the top center. Valid for all tubes.
depth
The tube depth. Valid for all tubes.
entities_list
The list of ordered nodes or lines. Valid for all holes.
has_washer
Returns true if there is a washer. Valid for all 2D mesh holes.
length
The side length. Valid for square/rectangular holes.
length_bottom
The bottom side length. Valid for square/rectangular tubes.
length_top
The top side length. Valid for square/rectangular tubes.
radius
The circular radius. Valid for circular holes.
radius_bottom
The bottom circular radius. Valid for circular tubes.
rim_entities_bottom
The bottom list of ordered nodes or lines. Valid for all tubes.
rim_entities_top
The top list of ordered nodes or lines. Valid for all tubes.
radius_top
The top circular radius. Valid for circular tubes only.
shape_type
The shape type. Valid for all holes/tubes.
tube_barrel_info
The number of barrels, barrel types, and entity IDs in the format {number_of_barrels {barrel_type {surface/element/face IDs}}}. Valid for all tubes.
tube_entities_list
The list of tube surfaces, shells, or solids and face indices. Valid for all tubes.
width
The side width. Valid for rectangular holes.
width_bottom
The bottom side width. Valid for rectangular tubes.
width_top
The top side width. Valid for rectangular tubes.

Examples

To write out geometric shell hole queried information details to 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 "queried data details of hole"
puts $holesfile "shape-type = [hm_holedetectiongetholedetailsdata 0 shape_type]"
puts $holesfile "center = [hm_holedetectiongetholedetailsdata 0 center]"
puts $holesfile "radius = [hm_holedetectiongetholedetails 0 radius]"
puts $holesfile "entities list = [hm_holedetectiongetholedetails 0 entities_list]"
} 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

2021