Issues with Refinery Packing.pack Rectangles

Hello,

I am running into some strange issue with Refinery Packing.PackRecatnagles. The packing method does not seem to recognize the different rotations of the containers…?!!

What am I doing wrong here :roll_eyes:… I appreciate any help… :pray: @Radu_Gidei @JacobSmall

PackRectangleForumSample.dyn (46.4 KB)

Rotated packages cause it issues - I have an animation somewhere showing how the resulting packing goes further off the rails as soon as you surpass a few angles, mirror the container, or otherwise alter the base geometry.

I recommend getting the primary axis of the container and rotating it to the X or Y global axis, running the packing algorithm on the oriented rectangle, and then rotating the packed objects back into the correct location. Coordinate systems may also be more effective than rotation, to allow for resolution of mirrored containers as well.

1 Like

Thanks @JacobSmall for your explanation… so that is very tricky…! But at least now I can try to explore your suggested solution. :pray:
… if by any chance you find the animation then please share link to it when you can.

I appear to have archived it on a HDD back home (or perhaps just deleted after making the post). This may help you get some insight should an update come along: Packing requires rectangles to have been created in a specific way · Issue #153 · DynamoDS/RefineryToolkits · GitHub

Thanks @JacobSmall - this is very useful info. I truly wonder if the GD development team will look into this issue to overcome such limitation. The pack rectangles routine node is very helpful in many application.
Thanks again for your help.