I am trying to think of a method which offsets a surface until a desired area is met?
Say 25% of the area needs to be free - offset the surface until 75% surface is covered?
230419_quantification tool_test geometry_help.gh (17.4 KB)
I am trying to think of a method which offsets a surface until a desired area is met?
Say 25% of the area needs to be free - offset the surface until 75% surface is covered?
This is a good question. I wonder what is the most efficient way of doing it.
I think the fastest approach is a script that uses
nested intervals
in short - two values are narrowed until the solution is within a interval, and the interval is within the needed tolerance.
the attached solution uses a c# script component as a startingpoint.
the script still will need some fine-tuning regarding error-management, handling clockwise / counter-clockwise curves / start with more flexibility regarding the “init” of the first Interval…
curves that are not on World XY, …
but hopefully a starting point.
just for readability i use a custom class “OffsetData” to store Curve, OffsetCurve, Area, Offset-Distance…
230419_quantification tool_test geometry_help_03_tp.gh (26.5 KB)
If you need a per-building solution: Interpolation!
Thank you!!!
In the end I came up with this solution, slightly adjusted from another thread I found:
Using scale rather than offset …
Just be aware if it matters that the shape using scale will be (slightly) different than the shape using offset.
hey, i couldnt get it to work in this file, it appears that the input for the interpolate component is null
Script Ocupação Gramado.3dm (343.4 KB)
Script Ocupação Gramado.gh (7.6 KB)
I don’t see an interpolate component in this GH file? The “Poligono Area Geral” is far to the left of the other two areas? And the Multiplication output needs to be grafted.