Obtain components dimensions with hm_getboundingbox
- Admin
- Sep 29, 2024
- 1 min read
In hypermesh getting the values of the panel dimension are important for hand calculations or reporting the comps properties.
*createmarkpanel comps 1 "Select panels"set complist [hm_getmark comps 1]foreach comp $complist {*createmark elems 1 "by component" $comp foreach {x_min y_min z_min x_max y_max z_max } [hm_getboundingbox elems 1 0 0 0] {}set Xmin $x_minset Ymin $y_minset Zmin $z_minset Xmax $x_maxset Ymax $y_maxset Zmax $z_maxset dimx [expr $Xmax - $Xmin]set dimy [expr $Ymax - $Ymin]set dimz [expr $Zmax - $Zmin]puts "$comp X=$dimx Y=$dimy Z=$dimz"}


Thanks for useful tips