Two dimensional bin packing using BCX

Started by djsb, April 28, 2024, 02:40:00 AM

Previous topic - Next topic

djsb

I have practical application for wondering if BCX can demonstrate how to implement 2d bin packing algorithms. I often have to place several rectangular printed circuit board designs of different sizes onto a rectangular page of fixed size. I have often wondered how I would sort and fit these designs using some kind of algorithm or program. Most of the examples I have seen are using python (in particular GERBMERGE) and as I am not familiar with python (at least not python proper-mainly MicroPython for microcontrollers) I struggle trying to understand how this would work.

Here is a survey of the different algorithms

https://www.csc.liv.ac.uk/~epa/surveyhtml.html

How could a quick demo be made of one of these 2d bin packing algorithms? Thanks.

MrBcx

David,

This is a recurring question.  You first asked for help in 2012 in the Yahoo forum
from which you received some replies and even a bit of BCX code for processing a a Gerber file
that you provided.

More recently in 2022, you started this thread:
https://bcxbasiccoders.com/smf/index.php?topic=701.msg3359#msg3359

Fast forward to 2024 ...
Asking "How could a quick demo be made of one of these 2d bin packing algorithms?"
reminds me of the old engineering jab, "Cheap. Fast. Correct.  Pick any two."

There was a time when I might have been interested in your coding challenge but, sorry to say,
I have no need for such a tool and too many other things vying for my time and attention.


djsb

Yes, I remember asking it a while back, but wasn't sure how many of the old posts made it across to this newer forum. I understand you have to set your priorities as we all do. Thanks for replying anyway.