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.boundsNote: 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.boundsNote: if your component instance is scaled you will need to scale the bounds the same amount.
Thanks a lot ! You made my day

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement