From: Bernhard K. <ber...@gm...> - 2010-11-16 11:24:14
|
Hi, i just updated my git, and some features i added is already in the git. I will merge my stuff with the current git, and then try to upload it.. sorry... On Mon, Nov 15, 2010 at 10:39 AM, Bernhard Kubicek < ber...@gm...> wrote: > Hi Crysn! > Hi Patric, hi everybody else! > > a short status update after a couple of night working on PCB2Gcode: > > * there is now a switch -metric. A variable double unit=1 will be > overwritten by 1/25.4 for that, and used for lenghts. dpi and output are > unchanged > > * You can specify preamble und postamble files, with individual start > up/end commands for your mill. > > * path-optimisation One routine calculates the distance betwwen a punkt and > a linie. The rastered path is an array of x-y coordinaten. For each point of > this array x_n is is evaluated if its already on the line between > neighboring pixels: If the point x_n' distance to the line x_{n-1}x_{n+1} > is smaller than a threshold,it is deleted.This is done until there no more > change. The deletion is done using std::list... > First, I wanted to delete longer tracks at once, however it was slow as > hell: > (int from=0;from<n-2;from++) > (int to=from+2;to<n;to++) > (int testpoint=from+1;testpoint<to;testpoint++) > if all testpoints obsolet->delete > > Result: duplicated paths are not 100% equal. The simplification depends of > the rotational direction. But the deviations are in the range of one pixel.. > > * The floodfill needs "components", groups of pixels with same colors, > based on the black/white rendered gerber. Outlines have 1 pixel width. If > this line is not arranged vertical/horizontal, the floodfill needs to > respect diagonal pixels. Otherwise one outline=multiple components. > > * -drilmilll mills holes by using the same tool as for the outline milling. > E.g. the depth-steps and diameter. Larger holes are done by circle > movements.. > > * debug-images have useful names, partially > "callingfunction_layername.png". > > * metaboard2.sh is a bash script that exports the layers from a eagle brd > file per command line option, and calls pcb2gcode with some settings. > > * output gcode now uses variables for z values, emc style #1, #2,... > > Open problems: > * Outline does not work for me. My testing-pcb has a large interior hole ( > eagle puts it both in outline and drill/wtf?). In this case, the outline > calculation is faulty or creates an endless loop. One problem was the > nondiagonal floodfill, sadly not the only one. > > * I would like that the exporter-classes return a string to the main, > instead of writing files by them selfs. Thereby one can create combined > files, for drilling+milling, and drilling+milling+outline, to check the > output in e.g. EMC. > This is not so easy, as ngc-exporter exists only once, and i need multiple > layers individually. > > * offset und mill-diameter should be differentiated, otherwise the outline > milling is corrupted while creating large offsets. > > * Style... I am used to tabs and other braket rules. > > * I need a way of making my changes available to you. Imho a patch is not > the best solution, and I am not confident enough with git to just upload it. > Maybe chrysn can help me there. > > If somebody could solve some of these problems, it would be awesome. > > I would propose that chrysn and me will combine our changes, and the bring > them back to the community. > Otherwise, if somebody wants my current code, i can send it by mail... > I am a bit helpless with version-management... > > Bernhard Kubicek > Metalab/Vienna/Austria > 0664 620 7748 > > |