PCB Outline plugin for tin boxes

Hi Everyone,

I just wanted share my first plugin with the KiCad community, and I hope this is the appropriate place for such a post.

I’ve developed a plugin designed to simplify the creation of PCB outlines specifically for tin boxes with rounded corners, like Altoid tins. This tool automatically calculates the size and rounding radius of the PCB using easily measurable parameters: length, width, and diagonal.

Additionally, the plugin can generate a 3D printable mounting pad insert to fix the PCB in the box. This feature is depending on the availability of OpenSCAD.

I would really appreciate any feedback on this plugin. Is this something that could be useful for your projects, or does it cater more to niche requirements? Additionally, any suggestions for improvements or enhancements would be welcomed.

You can find the plugin in my GitHub repository here: GitHub - molnarkares/kicad-tinbox

Also, I’ve prepared a release that can be installed using KiCad’s Plugin Manager: https://github.com/molnarkares/kicad-tinbox/releases/download/r0.3/kicad-tinbox_r0.3.zip

Looking forward to your thoughts and insights!
Thanks,
Karoly

5 Likes

I like it.
Two possible enhancement ideas:

  • support inches
  • cache last input values so there is no need to re-enter all when re-launched

Thanks. Inches are already supported. You shall just change the KiCad base units to inch or mil and the plugin will request the data in imperial units. See:

I will think about the caching, too…

1 Like

I’ve checked the possibilities for caching and it is not looking good. Or, let’s say I did not find any solution to my taste. It is really not about storing the last configuration in a file, then reading it back when the plugin opens. The challenge is more independent of the plugin itself: how to store plugin specific data in a project folder?
As much as I checked the forums and the documentation, this is not really handled in a uniform way.
I know about a local project specific JSON file .kicad_prl that would be an ideal candidate to store such settings. However, this file is re-generated by KiCad from an internal schema and any additional data placed there by the plugins will be lost. (I have tried it).
So the option would be to create a new settings file for the sake of this mere plugin, which, in my opinion, would just pollute the project folder.
So I leave this topic open until the handling of plugin specific project data storage/caching is not solved in general…

I ported the idea of project-scoped plugin-config files from the ibom plugin to the board2pdf plugin (Some visual and functional optimizations (6516adf4) · Commits · Albin Dennevi / Board2Pdf · GitLab).
I like the idea of portable config snippets within the project folder to move them around between projects…

Doesn’t look like the ultimate idea to just cache some perhaps temporary settings in your case but it works without changing code on the kicad side. When there is an official guideline this would be easily replaced.

BTW the KiBuzzard plugin decodes the settings within the output. Look at the pcb file source:

    (descr "Generated with KiBuzzard")
    (tags "kb_params=eyJBbGlnXXXXXxxSomeDecodedParams==")

These are reloaded if the generated object (footprint) is selected before triggering the action button.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.