hm_flangedetectioninit
Initializes the flange detection module.
Syntax
hm_flangedetectioninit entity_type mark_id ?consider_geom=<mode>?
Type
HyperMesh Tcl Query
Description
Initializes the flange detection module. This must precede any calls to other hm_flangedetection* APIs, and must be followed by a call to hm_flangedetectionend.
"Major" database changes made while inside of the flange detection module will invalidate and delete any results.
Inputs
- entity_type
- The type of entities to find flanges for. Valid values are comps, surfs, and elems.
- mark_id
- The ID of the mark containing the entities. Valid values are 1 and 2.
- consider_geom=<mode>
- Used when entity_type is comps:
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_flangedetectiongetmidline $i 0]"
}
hm_flangedetectionfindmates
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