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..!
Solved! Go to Solution.
Solved by jeremytammik. Go to 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:
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
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 !
Can't find what you're looking for? Ask the community or share your knowledge.