bennymeg / Fabrication-Toolkit

An JLC PCB Fabrication Plugin for KiCad
Apache License 2.0
300 stars 52 forks source link

Add Top and Bottom override on footprints #104

Closed MajorArkwolf closed 9 months ago

MajorArkwolf commented 9 months ago

What is the problem?

Some footprints can be "double-sided" but in reality once broken into individual parts may need to be strictly on one. An example of a footprint that is used for the top, but a component on the bottom is Kaihl V2 Hotswap key where the bus bar is mounted through the bottom and faces the top.

Currently, there is no way to produce a placement file that accounts for, therefor manual editing of the positions file needs to be done to correct the side.

How does this PR fix this?

By implementing a layer override function, similar to what is already done for rotation and position, we can override the kicad footprint and instead have the positions file reflect the expected output that JLCPCB is expecting.

To apply an override open the schematic, then click on a symbol and add the following field 'JLCPCB Layer Override' followed by either top or bottom.

What testing has been done?

Before

Untitled

After (Not offset)

Untitled Untitled2

After (Post offset)

after_offset2 after_offset

MajorArkwolf commented 9 months ago

@bennymeg I ran into the bug with the other implementation causing the plugin to crash. I then tried to implement it on main but was getting weird bomRowLimit error. So I ended up branching of the last release and implemented my own solution.

I have tested it and it appears to be working well :)

bennymeg commented 9 months ago

Closes #64, #69.

bennymeg commented 9 months ago

@MajorArkwolf What was the error you got?