Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All

I am working on a project wherein i have to place rectangle, square, polygon in such a way so that area requirement will be minimum. Kindly suggest, is it possible in winform/WPF. If so, pl advice how to proceed ?

What I have tried:

Tried in excel solver, but drawing a picture of each items with fix dimension(length, breadth, height) and then minimizing the area requirement seems not possible in excel
Posted
Updated 19-Aug-20 7:58am
Comments
[no name] 19-Aug-20 12:45pm    
Stack them.

1 solution

Quote:
Minimizing the area requirement by placing different polygon

This look like a 2D cutting stock problem, a problem very common in industry, but the problem is complicated enough to have companies selling specialized products for this problem. So don't expect a simple solution to fit in a couple hundred lines of code.
Cutting stock problem - Wikipedia[^]

In the 2D cutting stock problem, squares and rectangles are the easiest to deal with, after that, convex polygon are next, and then concave polygons are the hardest.
Not all programs can deal with every polygon, so first you need to be precise with the kind of polygons you have to deal with.
You need to give more details to give us an idea of your real problem.
 
Share this answer
 
Comments
gmanishg 20-Aug-20 3:23am    
Thankyou for the reply.
There will be number of Polygon mainly square, rectangle and circle but varying area. I have to fit all these in a box(may be rectangle or square) in such a way so that box area will be minimum. Pl advice
Patrice T 20-Aug-20 4:38am    
Use Improve question to update your question.
So that everyone can pay attention to this information.
You need to give even more details
like number of pieces, size of available boxes, sample input.
Patrice T 20-Aug-20 5:01am    
if box can have infinite size, this is another kind of problem.
You need to give realistic description of the problem because everything matters.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900