Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Wanted to draw maximum area rectangle inside a polygon

Message 1 of 3
1393 Views, 2 Replies

Wanted to draw maximum area rectangle inside a polygon

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..!

Message 2 of 3
in reply to: Anonymous

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':


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


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


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


I hope this helps.


Best regards,




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

Message 3 of 3
in reply to: jeremytammik

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 

Any suggestions from your side will be really helpful !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups

Rail Community