GerbMerge -- Automatic Placement
Padnos College of Engineering and Computing
Grand Valley State University
|Top-Level | The Configuration File | The Layout File | Automatic Placement|
|Introduction | Randomized Search | Exhaustive Search | Multiple Instances | Usage Notes|
This may not sound like a very efficient approach but experience shows that it can lead to nearly-optimal results fairly quickly. The reason is that although there can be a huge number of possible placements for a given set of jobs, many of them are equivalent with respect to total panel area.
The randomized search approach is the default automatic placement method. It is invoked simply by not specifying any layout file:
The configuration file must still be specified, of course. After GerbMerge starts, you may press Ctrl-C at any time to stop the process. In fact, you must press Ctrl-C at some point as GerbMerge will try random placements forever.
The best layout found when Ctrl-C is pressed will be used for panelization. Note that the layout is also saved in the file specified by the Placement assignment in the [MergeOutputFiles] section of the configuration file. Thus, if you want to experiment, you can run different trials, save the best placements from each, then use the best one by using the saved placement file as the input to GerbMerge with the --place-file option.
You can change the number of jobs to exhaustively search for a given random placement with the --rs-fsjobs command-line option. For example,
The above example is the default behavior, i.e., exhaustively place 2 jobs and randomly place N-2 jobs. By using a number higher than 2, there is less randomness but fewer starting placements are tested per second.
gerbmerge --rs-fsjobs=2 file.cfg
The exhaustive search mode is invoked as follows:
You can stop the search at any time by pressing Ctrl-C. The best placement found so far will be used for panelization and saved in the placement file specified by the Placement value in the [MergeOutputFiles] section of the configuration file.
gerbmerge --full-search file.cfg
[irtx] Prefix=%(projdir)s/IRTransmitter/irtx *TopLayer=%(prefix)s.cmp *BottomLayer=%(prefix)s.sol Drills=%(prefix)s.xln BoardOutline=%(prefix)s.bor *SolderMaskTop=%(prefix)s.stc *SolderMaskBottom=%(prefix)s.sts Repeat=5This job specifies all the layers as usual, then the last line indicates that 5 such jobs are to appear on the final panel. They may appear in various positions and states of rotation, however.
In summary, it is pointless to wait for a random search for hours to hit an estimated area utilization of 91% because, unless the dimensions of all boards line up just so, that utilization is not achievable.
Similarly, by choosing panels that are slightly wider than taller, or vice versa, different placements can be considered and may lead to different results. Consider these two configuration file options as a source of experimentation.
If you've achieved 85% utilization for a 30 sq. in. board, what will you save by waiting and hoping for 90% (i.e., 28.3 sq. in.)? Assuming 64 cents/sq. in. (BareBonesPCB.com cost), you will save $1.09.