Jump to content
Sign in to follow this  
AlanW

Bounding box 4 corners

Recommended Posts

Hi,

Been hacking away and i think this node gets the 4 corners now.

Thanks to advice from Patrick and his node that I messed with.

This only works for rectangles but get top R and bottom L is only a few clicks away.

Edited by Alan Woodwell

Share this post


Link to post

The VS:GetBBox function only call the top left and bottom right.

Can you write a new function to call top right and bottom left and use it in a marionette node?

Or can you only use whats available in the VS:Function Reference?

Share this post


Link to post

Hey Alan,

I know it can be frustrating to have a function that does close to what you want but not exactly. There is no other function to use, but the values of the BotL and TopR can always be derived from the TopL and BotR.

TL, BR = vs.GetBBox(obj)

TR = (BR[0], TL[1])

BL = (TL[0], BR[1])

Share this post


Link to post

Thanks Sarah,

With Particks help I could understand

PROCEDURE GetBBox(

h :HANDLE;

VAR p1X,p1Y :REAL;

VAR p2X,p2Y :REAL);

With my Noob expertise I did this and it worked.

botL2D = topL2D[0], botR2D[1]

topR2D = botR2D[0], topL2D[1]

So all this helps in understanding it all.

I also now understand that this gets the corners (extremities) of a bounding box, not the actual corners of the object in the case of a non regular shape like a non rectangular polygon.

Thanks again for all the assistance.

Edited by Alan Woodwell

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...