hm_flangedetectiongetflangedetails
Returns details about a specific flange.
Syntax
hm_flangedetectiongetflangedetails index
Type
HyperMesh Tcl Query Command
Description
Returns details about a specific flange. This must be preceded by a call to hm_flangedetectionfindflanges.
The details are output
as:
entity_type dimension detection_type {entities list elements/surfaces} {ordered free boundary nodes/lines} {ordered connected boundary nodes/lines} min_width max_width length has_holes is_infinite
entity_type
0 - FE
1 - Geometry
dimension
0 - 2D
1 - 3D
detection_type
0 - By shape
1 - By proximity
has_holes
0 - Does not have holes
1 - Has holes
is_infinite
0 - Is not infinite
1 - Is infinite (no feature at connected side)
Inputs
- index
- The index of the flange to get details for, starting from 0.
Examples
To find 2D flanges from elements in all components, using a min width of 2, a max width of 20 and a feature angle of 20, and write out all flange details to a file named C:/temp/flanges.txt:
set flangesfile [open "C:/temp/flanges.txt" "w"]
*createmark comps 1 all
hm_flangedetectioninit comps 1
hm_flangedetectionsetparams min_width=2.0 max_width=20 feature_angle=20
hm_flangedetectionfindflanges 1
set n [hm_flangedetectiongetnumberofflanges]
if { $n > 0 } {
puts $flangesfile "Number of flanges = $n"
puts $flangesfile "Flanges details"
for {set i 0} {$i < $n} {incr i} {
puts $flangesfile "$i details = [hm_flangedetectiongetflangedetails $i]"
puts $flangesfile "$i midline = [hm_flangedetectiongetflangemidline $i offset_dist=0]"
}
hm_flangedetectionfindmates min_search_dist=0 max_search_dist=10
set m [hm_flangedetectiongetnumberofmatinggroups]
if { $m > 0 } {
for {set i 0} {$i < $m} {incr i} {
puts $flangesfile "$i = [hm_flangedetectiongetmatinggroupdetails $i]"
}
} else {
puts $flangesfile "Flange mates not detected."
}
} else {
puts $flangesfile "Flanges not detected."
}
hm_flangedetectionend
close $flangesfile
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
2019