leomcelroy / svg-pcb

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

Add KiCad download #39

Closed kr15h closed 1 year ago

kr15h commented 1 year ago

Adding KiCad download. This is still work in progress, just adding it here for collab purposes.

kr15h commented 1 year ago

Soon... The coordinates seem to be flipped in KiCad though. Screenshot from 2023-04-06 21-15-47 Screenshot from 2023-04-06 21-15-30

kr15h commented 1 year ago

Allright! image Just the outline left I guess.

leomcelroy commented 1 year ago

Beautiful!

kr15h commented 1 year ago

Ok, outlines are there. image Next some tests and some offsetting along y axis as flipping moves the board out of the page. Not a big issue, but would look nicer if it would be within page bounds.

kr15h commented 1 year ago

So now with access to footprints, I need to know how much the initial footprint was rotated to make it right.

kr15h commented 1 year ago

I think the last thing missing is the footprint name and some optimizations.

As for the footprint name, what I mean is this.

const footprintName = 'Undefined'; // TODO: Fill this in with footprint name such as "regulator_SOT23" or "C_1206"

As for optimizations, I think I will move all the separate plotThis and plotThat calls into one plot(state) or similar call. The KiCad board is floating outside the page at the moment, I want to move it back in.

kr15h commented 1 year ago

OK, I figured how to add the component to footprint mapping. Take a look at 41dea6c3c6fb30b89ac6f87ef8e65e741ecec96a as given my current understanding of how the whole system works, there might be a more optimal way of doing it.