How to create rectangular face or curve from special face or curve

Hi

How to create rectangular face or curve from special face or curve
result is the biggest rectangular

Thank!!!

I can help you with logics, maybe it helps you…

  1. You need to calculate the farthest points of your face (2 points). For this you need to calculate:
    1.1) min X
    1.2) min Y
    1.3) max X
    1.4) max Y
    I would do next - parsing list with all points of border of your face and extract X and Y, next - calculate min X/Y and max X/Y
  2. Create rectangular with two points (minX,minY;maxX,maxY)
1 Like

Hi
I think rectangular need 4 points

I mean that you can calculate 2 main points (red circles), than you can create other two points (green) taking coords from main (red) points.
image

2 Likes

If your original rectangles are axis aligned you could use the BoundingBox nodes. If they are not axis aligned you will have to align them first to be able to use BoundingBoxes.

2 Likes

Hi! boundingBox is so good, but element slanted angle: α
boundingbox not folow element
How to get boundingbox folow element direction?

There are multiple approaches, but I think this one is very suitable for you:

1 Like

Hi! Thank you
Solved this

1 Like