You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an easy way to consider the shapes in the sheets as allowed areas instead of holes? Basically allowing packing only inside the polygons described in the sheets
The text was updated successfully, but these errors were encountered:
I believe that its algorithmically easy, because it sounds like you could just treat all of the shapes as individual sheets (which do not themselves contain holes). However, it would require a lot of changes to the code since it is not currently designed to do that (it only currently supports rectangular sheets).
You might be able do it with fewer modifications to the current code by just making one big hole that covers the non-shape area. Essentially just make a single hole that is the size of the sheet with your shapes cut out of it. I think that mathematically still works and could be done with small changes to the code. Some things that I think you would need to do:
In bindings.cpp you would need to convert the holes into Polygon_with_holes_2 instead of into Polygon_2 (this allows the holes to have holes!)
Then, in packaide.py, you would want to change extract_polygons and extract_shapely_polygons to essentially invert the input so that you turn the list of holes into one big hole with those shapes as holes instead.
Something like this should work in theory. Will it actually work in practice? Not sure, but please give it a try if you have time. I don't have time to do it myself, but let me know if you try it.
Is there an easy way to consider the shapes in the sheets as allowed areas instead of holes? Basically allowing packing only inside the polygons described in the sheets
The text was updated successfully, but these errors were encountered: