leomcelroy / svg-pcb

Design PCBs in the Browser
https://www.leomcelroy.com/svg-pcb-website
GNU General Public License v3.0
68 stars 9 forks source link

Gerber Export #31

Closed kr15h closed 1 year ago

kr15h commented 1 year ago

This is not ready yet, but has a demo that can show better what I mean.

  1. Click on Download > Gerber
  2. Modal should appear. Layers are listed from a map in global state.
  3. Click Download and it will use old code to export Gerber.
kr15h commented 1 year ago

So at this point I have F.Cu, B.CU, Edge.Cuts and Drills export with an option to have Edge.Cuts on all layers. It seems that I see the way how I could make use of apertures and draw pads as pads and traces as lines. This is also needed to be able to produce F.Mask and B.Mask layers accordingly. So that is next on my list here.

kr15h commented 1 year ago

OK, now that I successfully managed to separate the wires from pads, it will be possible to automatically generate solder mask layers. The drills seems to be fine for now, but I want to look into ways how Gerber format can be used for drills. That would potentially simplify code. The last thing then would be the silkscreen layer. But I believe that you could send the boards off even without that if in hurry.

kr15h commented 1 year ago

OK, a few adjustments to the solder mask functionality and then the silkscreen + reviewing drills.

kr15h commented 1 year ago

Almost there!

kr15h commented 1 year ago

I realized that a default SVG font for SvgPcb could be useful. That would make it easier to create the silkscreen layers. Also language features for drawing and positioning elements on the silk layer are needed.

So for now I stopped just before fixing the drills. Will make it work (again?) and it will basically mean that one should be able to order PCBs online with this.

kr15h commented 1 year ago

OK, I think it is ready (excluding the silkscreen layers) now. You tell me if this is good to merge.

kr15h commented 1 year ago

I tried with the Crown example and got weird results, that I think come from hackish use of existing functionality and layers to achieve something. Take a look.

Screenshot from 2023-03-24 17-23-39

Screenshot from 2023-03-24 17-23-52

kr15h commented 1 year ago

As for regular double-sided board, things work just fine.

Screenshot from 2023-03-24 17-27-51