Line of bounding Box

Dear Dynamo Specialists,

I have a question. I have a bounding box.
I would like to get the lines/curves of the bounding box.

And how could I see if the Line is the North or West side?

How can I get it?

hi
start by convert the boundingBox ToploySurface or Tocuboid and get the curves or surfaces needed after that

Thanks!!

Next question:

How can I get the North, South (orientation) of the lines (of the scope box)?
Or with upside, downside, left and right of the scope box?

Check the normalized vectors of your curves.

They should show you their direction and therefore their orientation. As the bbox is never rotated and always in X/Y, the curves will also represent X/Y.

if your project aligned with true north then
from each boundingbox curves, max X value means east, least values means west, also Y values for north and south … etc

I have another question,

image
How could I detect if the scopebox (and the house) is rotated?
Because I need the front, left, right and the back side of the scopebox. Also when the house and scope box is rotated.

Can anyone help me?

Get the BB.min and BB.max points. Look at the differences between the X and Y values, that should tell you if the rectangle is in portrait or landscape.

Nice Thanks!


I made a copy of the scope box and rotate it.
But the min and max point is at the same place (blue circles)

How can i fix it?

You cannot.

You should extract the X and Y values and compare those. If the difference between MinX - MaxX > minY - MaxY then the orientation is landscape otherwise it’s portrait.