I am wondering if someone has encountered a similar problem.
I am using Packing.PackRectangles node of the Refinery package to pack rectangles in 3 containers as shown below:
I have a list of rectangles as rooms and they were packed in containers. It works well for the second container, however, rectangles from the first and third containers are outside the perimeter:
I cannot find the logic of why it’s happening.
I found a discussion about this topic:
I am using the GREAT node from Refinery package Packing.PackRectangles node. It works fine for the packing part, but place all the packed rectangles in the wrong position, with a kind of offset… I have been looking for a reason but I can’t find one!
Does anyone has an idea or has already faced the issue? Maybe
@JacobSmall, pro of Generative design might be a savior? (Thanks for the AU course btw !! great !)
Containers (6 rectangles)
The solution was to translate rectangles. I think it is not my case, but maybe I am wrong.
Do you have any suggestions on what I should adjust?
November 13, 2022, 7:07pm
Where’s your code?
If I recall (not done it for a while) you have to get the translations right for your visualisations or it messes up.
here is my code:
packing 2d.dyn (85.1 KB)
Tomorrow I will try to do some translation…we will see:)
The bin packing nodes in the refinery toolkit require the container be oriented and located in a particular fashion. Try rebuilding your containers at the origin with no rotation, and translate the rooms after placement.
I followed your instruction and it works:) Thank you!
From my initial containers (rectangles created from points), I got dimensions and created new rectangles, which I translated to the centre point of my initial containers.
Thanks and have a nice day!