Closed gregdavill closed 3 years ago
From the Github view, I saw a few bits of the original code that fell through the cracks when I was formatting the commits. Hence those force pushes.
@gregdavill it should be relatively easy to turn this into an action plugin (so it would be as easy to use as the normal text tool); I'm happy to do so if you don't plan to.
@WardBenjamin I've have already made an initial mock up: https://github.com/gregdavill/KiBuzzard
Here is a demo: https://twitter.com/GregDavill/status/1349689955694465031 I wanted to avoid adding the ActionPlugin code directly to the Buzzard code base.
@gregdavill makes sense - looks great! Let me know if I can lend a hand.
This doesn't seem to break EAGLE functionality so I'm merging! Awesome work! I'll add a few lines to the README documenting the added arguments
This pull request adds support for exporting these beautiful labels into KiCad.
This is designed to work with KiCad Nightly (and v6 when it is released in the coming months) I've separated the changes out into 3 commits
Commit 1
KiCad does not support "self-intersecting" polygons, which it appears Eagle does. So the first commit addresses this. I have not tested this in Eagle, and currently it only works when 3 polygons are nested, this is the common case seen with a block background. Note: this code currently wouldn't handle a case where 4 polygons are nested, but I don't think that occurs with standard letters. Let me know if you know of a counter example.
Example:
Without any changes, 3 nested contours get combined. You can see that polygon outlines are present but are incorrect.![Screenshot from 2021-01-14 01-13-52](https://user-images.githubusercontent.com/344310/104467056-cd0df000-5605-11eb-9f9e-2e28130728fa.png)
With this commits changes, note the center polygon is now treated as a separate entity in the footprint.![Screenshot from 2021-01-14 01-02-34](https://user-images.githubusercontent.com/344310/104465875-7227c900-5604-11eb-9c96-7e91a8b6630f.png)
Commit 2
Added stdout output mode. The easiest way to drop these labels into KiCad will be through the clipboard. Enabling output via stdout enables running a script like this:
Then simply pasting
Ctrl+V
the generated label onto a board layout.Commit 3
Added KiCad output support, KiCad footprints appears to be the best option to create a container around multiple polygons. polygons are defined with a small header/footer and a list of x/y points.
The KiCad output option is enabled with the
-o ki
argument. If writing to a file we use the.kicad_mod
extension.