Wanted to draw maximum area rectangle inside a polygon

Anonymous

Wanted to draw maximum area rectangle inside a polygon

Anonymous
Not applicable

We are working on a project related to an construction industry, for them we are building an iPad application. Where we need to find a MAXIMUM POSSIBLE RECTANGLE INSIDE THE GIVEN POLYGON lines. And we are totally approached around 100's of ways, but till now we are not getting a right solution. Any suggestions will be really helpful..!

0 Likes
Reply
Accepted solutions (1)
1,799 Views
2 Replies
Replies (2)

jeremytammik
Autodesk
Autodesk
Accepted solution

Thank you for your interesting query.

 

Unfortunately, it has nothing whatsoever to do with the Revit API, so this is not an appropriate place to discuss this in more depth.

 

You will probably have more luck searching for an answer elsewhere.

 

I searched the Internet myself for 'maximum inscribed area rectangle in polygon':

 

https://duckduckgo.com/?q=maximum+inscribed+area+rectangle+in+polygon

 

The first hit I found was this very question of yours in a different forum with several very helpful suggestions for solving hit:

 

https://gis.stackexchange.com/questions/59215/how-to-find-the-maximum-area-rectangle-inside-a-convex...

 

Another hit shares a proven working solution, an approximation algorithm for finding the largest rectangle inside a non-convex polygon:

 

https://d3plus.org/blog/behind-the-scenes/2014/07/08/largest-rect/

 

This solution also includes several references to scientific papers on the topic.

 

I hope this helps.

 

Best regards,

  

Jeremy

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Anonymous
Not applicable

Thanks for your suggestions Mr Jeremy. I was also going through this links. But I thought if any one is going through this same approach then it'll be helpful.

Right now, I am working on a Revit API project, Where I needed that algorithm to place the cubical families such that the maximum rectangle will be achieved (For a Automated Building Development Project). If you interested to look at my code just let me know or mail me at 88ajpatil@gmail.com 

Any suggestions from your side will be really helpful !

0 Likes