new tool: generate silkscreen#370
Conversation
|
With commit 9eb521d, the tool is interactive and both offsets (pad/polygon) can be adjusted. Also, if there are multiple package polygons, the tool selects the first one and the user can change this selection. |
4a3d4bf to
9eb521d
Compare
|
This is a great addition! A minor nitpick: The default pad/package expansion should probably be 0.2 mm, in accordance with the current pool convention. |
|
Thanks for the reminder. 0.15mm was in there because I used the same value for line width and expansion in the very first version. I'll update it once I get time to implement proper handling of settings. |
…ce with horizon-pool-convention
|
@fruchti here you go. Settings are now properly implemented and default is 0.2 mm. |
|
Works great, thank you! |
|
Very cool to see someone who isn't me implement a nontrivial tool without any hand holding! The current way of adjusting the expansion parameters is a bit too clunky IMO, and I think there's a better way: For not all that long we have a way for tools to show a non modal dialog to adjust more complex parameters on the fly, see the renumber pads tool for an example. In our case a window with just two spinbuttons (use When it comes to pin 1 markings, keep in mind that there are two styles for pin 1 markings:
|
d799fd1 to
631f74e
Compare
|
@endofexclusive That's a bug that seems to be caused by a rounding error. I checked the points that I'm feeding into ClipperLib and they are correct. So the root cause seems to be within Clipper. Until someone figures out what is going wrong, I added an extra .000001 mm offset to the pad expansion. @carrotIndustries pin 1 markers are not implemented at the moment. For now, the user would have to take care of that manually. But I believe that is rather trivial. Especially on packages with curved packages, I find drawing a correct outline with cutouts for pads most challenging (and annoying). Right now, I'm looking into the modal dialog you mentioned and will probably implement it relatively soon. Longer term, I'm planning to add other styles (e.g. corners only), pin 1 markers (I'm planning to have the options none, extended/omitted line, arrow, dot) and silkscreen text. For these, a dialog is likely the best interface. But since the current status is enough to satisfy my immediate need, I first wanted to get some feedback on the current status to make sure I don't waste time on features no one will ever use. |
No worries, with the non modal dialog in place, this PR is ready to be merged. |
|
Sometimes my hands are faster than my head 😄 |
|
Works perfectly! Some nitpicking:
|
|
Thanks for the thorough review!
|
Okay, I'll try to add the proper interface once the PR is merged. |
|
The dialog is a nice improvement. Some comments (minor):
|
This is intentional, so the user can see the silkscreen. Of course - like for the package layer - I could store the current working layer and then return to it after the silkscreen is done. Is that preferred?
The code for both escape and enter is in the tool, so it would work if you select the main window. I haven't yet implemented it for the dialog, but I also feel like this should be done on a higher level (i.e. as part of |
No real preference from my side. I am fine with how it works now.
Aaah, that explains it. Indeed the keys work when the window does not have focus. I previously had the dialog focused while trying out the hot keys. The window manager here (i3) always gives the window focus as it opens (did not try with other managers). To be continued in #375 then :-). |
|
Sorry for not catching anything at first sight, these should be trivial to fix. The layout of the "Default" button still needs some improvement as the window is a bit left-heavy right now:
|
…(), fix default restore
a6c3929 to
3f8dc05
Compare
|
29b9174 fixes the layer display inconsistencies |
|
Great! Thank you! |

As suggested by @endofexclusive, I moved the silkscreen generator from #367 into a tool. Right now it creates an outline by offsetting the package polygon and subtracting all pads from it. I will next turn this into a tool that allows for dynamic changes of the offset. This tool does not yet take care of adding a reference designator.