Boundingbox.width (height, depth) related to global axes?
-
Hello people!
In atempt to get a component's dimension I used:... z = bbox.depth x = bbox.width y = bbox.height ...
But I've seen that depth, width and height are not related to component's axes, but to global axes!
see the links: http://bayimg.com/FAlhMaAbk and http://bayimg.com/fAlHoAABk
Same component, rotated in drawing space returned different dimensions. (see result in Ruby Console)
I want to get axes-based dimendions of the component (component's axes). If blue is on 50mm edge, I want to have z=50mm, and so on.
Does somebody have some ideas about how can be this done?Thanks!
-
Use the bounding box from the definition
componentinstance.definition.bounds
Note: if your component instance is scaled you will need to scale the bounds the same amount.
-
@cphillips said:
Use the bounding box from the definition
componentinstance.definition.bounds
Note: if your component instance is scaled you will need to scale the bounds the same amount.
Thanks a lot ! You made my day
Advertisement