Negative/Positive printing support

Issue #173 resolved
Marius Stanciu created an issue

I was thinking what a great thing should be to see printing support in FlatCAM.

The reason for this feature request is that for those of us that we use the dry film UV exposure method of doing PCB's (the negative dry film is very cheap on Aliexpress and give a high quality PCB), having a way to get an transparent film with the pattern (negative or positive depending of the used photosensitive film) printed on it, is a must.

I like how the Gerber look in FlatCAM and I will be very happy to see that I can obtain a PDF file with the pattern on it, along the G-Code for drilling the holes (which is already in FlatCAM).

In FlatCAM, we should be able to create a "special" rectangle around all the pattern that needs to printed (negative or positive) and then print that as it is (in PDF directly or using a PDF virtual printer) for the positive print or printing an color inverted version for the negative print.

That rectangle is useful for negative printing since we don't want to end up with an A4 (letter) page full of black outside the pattern. I marked the rectangle as "special" because it should be ignored in the geometry processing and should be used only for printing. Maybe a good name should be a "Print Select Geometry" rectangle.

The trick is to get the print as close to the real distances found in the Gerber file, and not actually what is on the screen (this may be zoomed). Of course the physical printer add some error on the print and an option to scale on the X axis and/or Y axis is even better. But one step at the time.

JP, given how FlatCAM is working, do you think it is possible to add such a feature? Negative printing is what I am mostly after ... but there could be other usages e g printing a template before the actual router work (in case of a FlatCAM made geometry).

Again, thank you very much for your work!

Best, Marius

Comments (8)

  1. Marius Stanciu reporter

    Maybe this could be integrated by creating a bounding box for the GERBER file then selecting the ._bbox file in Project TAB, after that going to Selected TAB, a new type of job should be there besides the Plot, Paint, Scale and Offset. The Scale job could be redesigned to have options to scale on X-axis and/or Y-axis.

    This new type of job could be Printing, with an option to select Negative/Positive, and printing only what's inside the bounding box.

  2. Juan Pablo Caram repo owner

    I think this is possible. It's about exporting the geometry in the right format. I've wanted to be able to import/export SVG for a while, but it's a somewhat large project. Conversion from SVG to PDF would then be very simple.

    It's doable, but probably not any time soon unless I get some coding help.

  3. Marius Stanciu reporter

    I think I found a way to make a negative out of a Gerber in FlatCAM using the new SVG export function but I don't know how it can be done in FlatCAM. Maybe scripting but I don't have the required knowledge for that.

    How I managed to get a negative SVG file like in the picture:

    2.JPG

    from a GERBER file like this:

    3.JPG

    1. Load the GERBER in FlatCAM
    2. Export the GERBER as SVG. Create file a.svg
    3. Create a bounding box of the GERBER with rounded corners and "Boundary margin" of 0.1mm
    4. Export the bounding box geometry as SVG. Create file b.svg
    5. Edit file a.svg and change all the fill="#C ...." to fill="#FFFFFF" and all entries like stroke="#C ...." to stroke="#FFFFFF" and opacity="0.6" to opacity="1.0"
    6. Edit file b.svg and change all the fill="#C ...." to fill="#000000" and all entries like stroke="#C ...." to stroke="#000000" and opacity="0.6" to opacity="1.0". Then copy the element <path d= ......../>.
    7. Edit the file a.svg and paste as the first element the previously copied element from file b.svg.
    8. Save the a.svg file. The END.

    Can this be automatized by FlatCAM? As there are a lot of operations ...

    Thank you!

    LE: Unfortunately exporting the GERBER file as SVG adds some artifacts on the small elements like the pads from the FPGA.

    LLE: making stroke-width="0.0" from the default stroke-width="0.1" solved the artifact issue. Also, now the traces are the right width.

  4. Log in to comment