Jump to content

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
Link to comment
  • Vectorworks, Inc Employee

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])

Link to comment

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
Link to comment

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.

×
×
  • Create New...