hm_flangedetectionsetparams
Defines parameters for finding flanges in both geometry and FE.
Syntax
hm_flangedetectionsetparams max_width=<width> ?min_width=<width>? ?feature_angle?
Type
HyperMesh Tcl Query Command
Description
Defines parameters for finding flanges in both geometry and FE. Multiple calls to this command can be made to override or redefine the parameters. Settings are cleared on any call to hm_flangedetectioninit/hm_flangedetectionend.
This must be preceded by a call to hm_flangedetectioninit.
Only max_width is mandatory. All other parameters are optional and have default values. Parameters can be specified in any order.
Inputs
- max_width=<width>
- The maximum width of flanges to be detected.
- min_width=<width>
- The minimum width of flanges to be detected. Default is 0.0 if not specified.
- feature_angle=<width>
- The expected deviation at inner boundaries of flanges, in degrees. Default is the global meshing feature angle if not specified.
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
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2019