Find polygon from lines and area

Hi, I need to find the exactly polygon of a terrain.
For it, I have the measure of each line of this and the total area, but not the angle between them.
For example, I have 4 lines, but not the angle between then and I need to know the exactly polygon.

Here a quick way, there are still lot work to do to make it work better.
Put the length of line (n number)
Make a GenPool with n-3 angles from say 10° to 170° (but could be more if you want concave polygon)

Start the solver.

I just take one of the circle/circle intersection => I must output the point which is the more close to the area wanted …
It could be solved by pure geometry …


line lengthn area to polygon.gh (13.1 KB)

1 Like

polygon_constraints.gh (12.3 KB)

6 Likes

Given any List of lines (or Curves) with fixed directions (the blue pipes below) … for the general case (that requires the nasty thing: a robust offset etc etc) you’ll need a classic up-down recursive search/approximation (for each inversed search the stepD becomes half stepD). See some results.

a vanilla GH versionre_area.gh (6.7 KB)