Need help with ideas for finding a rectangle inside a polygon using Generative Design

I’m looking for a suitable rectangle inside a polygon to build a building from.
The algorithm I’m currently using creates 4 edges (vertical1, vertical2, horizontal1, horizontal2) that run on the polygon to find the rectangle. It seems to be working poorly with concave polygons that have large indentations.

I really need ideas on how to keep the rectangle edges inside the polygon. Thank you so much!

This is an image of it not working well.

This is the image of normal operation.

Inset the boundary by half of the max width/depth of the building envelope, that way the worst case scenario is the edges will set along the edge if you place that box at its centrepoint.

1 Like

This is how I discovered all the rectangular shapes within the land plot.

FindRectangle

When running Generative Design with this polygon, it does not generate any rectangle inside the polygon. I set the Population Size to 40 and Generations to 100.

You need an evaluation to confirm the polygon fits inside the shape. If you have that and you optimize the value then the genetic algorithm will find one which fits.

This task used to be one of my primary demos when introducing generative design to uses - there is a YouTube recording up here for review, though I use a different method of generation which allows rotation of the building on the site. The demo is also for two shapes not one (which could be used to allow for a single mass on a L shaped site if you really wanted)

1 Like

In your example, what are the ways to prevent Generative Design from creating buildings outside the land area?. Because my problem is that the building needs to be within the land area.

Surface testing. Watch the video closely around the 1 hour mark.

2 Likes