Segmented Material optimisation?

I’m trying to find the best way to create a Grasshopper definition to do some automatic Segmented Material Optimisation.

Basically I want to automatically find the length of the rectangle material pieces needed (the blue rectangles) from the image bellow knowing the height of the material, which will be constant on the middle, variable at top and bottom. The other variable will be the length of the material and the number of rectangles needed.

Hope it is of some help…

SegmentedMaterial_re.gh (18.2 KB)

1 Like

Thank you for replay. I didn’t had time to test your solution but I will do this days.

You could probably measure the area of the rectangles and use Galapagos to find out which is the minimum area(blue area) configuration, this an integration problem, so the best solution is always going to be the one with the “infinite” amount of rectangles. A solution could be to define the amount of rect you start, for example 2, and try to fit them to the shape, if the solution is not possible you transform the original rect a bit, and try again, so and optimization inside a for loop, that checks the result.

I tried using Goat and Heteroptera, it works, but not every time, sometimes it breaks parts in multiple rectangles instead of finding a one rectangle solution. This is not “fitting”. Maybe with a physical simulation(Kangaroo)(Collision) would be better, you can get a better solutions if you permit rotation on the rectangles. I believe David Rutten and others…, have written algorithms to split surfaces that may work for this, in fact in this forum and in the Grasshopper one.You can control the height of the material by substituting one of the gene pools for a range.GOAT _ SegmentedMaterial_re.gh (19.4 KB)