2D Packing

galapagos
unhandled

(Jonathan) #1

Hi, i know this has been an old-ish topic but i havent found a solution on the forums so far. My problem is really simple, i have shape that i want to panel. Each panel has a maximum dimension (for material limitations) and i want to find what is the most efficient rectangular panel layout. I have used packrat to pack the boxes and galapagos to control the length of each box while minimising the ‘unpacked’ area.

My issue is that i am trying it out on a simple surface now and it is roughly easy to figure out the most efficient. however using galapagos, for some reason there is extra space that i know i can extend the box but when i do it manually, packrat messes up and thinks there is no space.

Hence, my question is, i have attached the rhino and gh files i am working with, is it possible to help me figure out if i am using packrat and galapagos properly OR is there a better way to optimise packing of 2D rectangles?

ThanksGh1.gh (17.0 KB)
Rn1.3dm (58.6 KB)


(Laurent Delrieu) #2

Hello
I am not sure many people have PackRat. I don’t. But as your problem seems rather simple. But a sketch could be welcomed.
For 2D packing that is not packing I suppose. Packing for me is more useful when you have a set f shapes and you want to optimise…
So did you look at that ?




(Jonathan) #3

hi, yes youre absolutely right in 2 things. 1) since we are visual creatures here is a simple sketch of my simple problem. 2) its not really packing, but i was trying to use packing to solve my issue.

the difference i think is, i have a fixed boundary, but variable sized elements. also, i am not dealing with alot of packing elements, just about 5/6 within a boundary. And i want to know, what is the optimal arrangement of these elements within a boundary given the maximum a) dimension of elements and b) number of elements.

So in the sketch, for example that T shaped boundary is fixed. what is the best way i can fit 5 rectangles into it given the maximum dimension each rectangle can be. and yes i have looked at some tiling or paneling solutions but the biggest problem i have is that i do not need my 5 rectangles to be the same size nor do i need to solve it at such a large scale.

I was actually trying out galapagos by itself, by allowing it to draw 5 rectangles at any point and asking it to minimise the left over area. but it kept crashing on me. any luck?01.05.gh (28.6 KB)
01.05.3dm (2.4 MB)


(Laurent Delrieu) #4

It is not an answer because I thing it will be better to make a custom program to solve this problem. But here is a way to split the surface. The problem is that it split in too many rectangle, it will be better to use iterative way. Hope it could help. The idea here is to cut using the “walls”.


split planar surface.gh (13.7 KB)


(Jonathan) #5

Hmm thanks! i was also considering plotting points on the edge of the boundary, since logically that would cover the most area, but i was wondering about the centre point. i think your solution helps alot! i will give it a try. thanks!