Newbie help - getting dimensions of a simple object
-
Hi there!
I have a write a big code and I am a ruby newbie.. i have done some fair amount of c++..i have drawn up a cuboid, i have to do some calculations on it..
basically i have programmed it so far, i right click on the group and i should get dimensions of the object.. i just want to know what class to use..to honest i've spent the last week on the google sketchup api website.. i have no clue what to use..
thanks for your help
Cheers! -
That is because there is no built in dimensioning class or method.
You will probably need to be looking at all edges and then find their lengths. You can write those lengths to a UI.messagebox, or to the screen, or to text entities in the model, or back to a webdialog box. So displaying the info will require choosing what works best for you.
But start by iterating over all the edges and finding their lengths. That would be the Edge class
Chris
-
Try the BoundingBox Class.
A bounding box contains the dimensions of an object.
-
wow bounding box is such a neat thing.. thanks for pointing it out!!
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