Hello, I have three rectangles scaled in the x direction incrementally. How do I use kangaroo to evenly distribute rectangular areas moving only the interior partition lines.
I know it’s very much a beginner’s problem as I have just started using kangaroo. Any ideas? Would be very much appreciated.
KANGAROO EQUAL ARES.3dm (31.0 KB)
Hi and welcome @noelnarciso95
Since (if I follow your description correctly) the x dimension of each rectangle is fixed, and also the total y of all the rectangles, I don’t see a way to do this with the built in area goal (since the total area can’t stay fixed, and the current goal takes target area as an input).
So I wrote a new ‘EqualArea’ goal for this purpose. Here’s the definition:
EqualAreas.gh (16.3 KB)
(you might need to update the assembly reference location for the script component when you open it)
2 Likes
“since the total area can’t stay fixed, and the current goal takes target area as an input” – Something I did not consider! I actually tried your solution over here from 2017 [https://www.grasshopper3d.com/forum/topics/i-need-an-algorithm-how-to-divide-an-area-with-into-same-size-but] but I was bounding the solver within the boundary of the referenced rectangles. The C# Script helped a lot. Makes me look forward to developing more C# foundation.
Thank you Daniel, this solved my problem.
1 Like