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

Need link to footprint for each component placed #43

Closed kr15h closed 1 year ago

kr15h commented 1 year ago

There is data lost when components are made out of footprints and some of that data is useful when exporting to KiCad, for example. How about adding a reference to footprint in each board.pcb.components item? One of the things that is getting lost is the pin numbering. Pin labels are fine, but the numbering is more important in KiCad.

leomcelroy commented 1 year ago

I actually added this yesterday on my dev branch. It's got a few more changes we may not want to merge yet but I can push that one.

kr15h commented 1 year ago

I figured it out somehow, but the numbering of the pads could be off the way I did it. I can rebase and adjust when you merge that later.

kr15h commented 1 year ago

I noticed the RefDes, but what would be VERY useful is a reference to the original footprint from each component placed. It would be also perfect if vias would point to an object similar to footprint definition so there would be no need for special case handling. I could try to add this myself unless you have something cooking in your dev branch.

kr15h commented 1 year ago

I figured it out somehow, but the numbering of the pads could be off the way I did it. I can rebase and adjust when you merge that later.

And this solution breaks as soon I open up a design with vias.

kr15h commented 1 year ago

I will try with the new padShapes. Maybe it will work.

kr15h commented 1 year ago

Ah, no, I still would need the pad numbering from the original footprint.

leomcelroy commented 1 year ago

I'm including this in the component now. It's a bit messy but shouldn't lose anything.

Screen Shot 2023-04-08 at 4 48 49 PM