All Projects → JarrettR → Stretch

JarrettR / Stretch

Licence: GPL-3.0 license
KiCad to SVG and then back again

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Stretch

Qucs-RFlayout
Export Qucs RF schematics to KiCad layouts & OpenEMS scripts
Stars: ✭ 78 (+39.29%)
Mutual labels:  pcb, kicad, pcbnew
splendida
256 WS2812B LEDs arranged in Fermat's Spiral Shape
Stars: ✭ 28 (-50%)
Mutual labels:  pcb, kicad, pcbnew
WolfieMouse
IEEE Reion 1 Micromouse competition.
Stars: ✭ 29 (-48.21%)
Mutual labels:  pcb, kicad
Dji Hardware Schematics
Community made schematics for the DJI drones and devices.
Stars: ✭ 72 (+28.57%)
Mutual labels:  pcb, kicad
snackymini-keyboard
Snackymini Keyboard
Stars: ✭ 28 (-50%)
Mutual labels:  pcb, kicad
Panelize Plugin
Automatic KiCad panelization plugin
Stars: ✭ 33 (-41.07%)
Mutual labels:  pcb, kicad
Electron
A mixed signal netlist language (pre-alpha)
Stars: ✭ 52 (-7.14%)
Mutual labels:  pcb, kicad
mightyscape-1.X
A maintained extension collection for Inkscape 1.0+, working on Windows and Linux
Stars: ✭ 23 (-58.93%)
Mutual labels:  vector, inkscape
Awesome Electronics
A curated list of awesome resources for electronic engineers and hobbyists
Stars: ✭ 3,782 (+6653.57%)
Mutual labels:  pcb, kicad
DoorsignEPD-pcb
ESP-WROOM-32 breakout board to connect it to a Waveshare E-Ink display
Stars: ✭ 16 (-71.43%)
Mutual labels:  pcb, kicad
svg2mod
Convert Inkscape SVG drawings to KiCad footprint modules
Stars: ✭ 72 (+28.57%)
Mutual labels:  inkscape, kicad
Altium2kicad
Altium to KiCad converter for PCB and schematics
Stars: ✭ 490 (+775%)
Mutual labels:  pcb, kicad
Espressif
all espressif stuff will committed here
Stars: ✭ 477 (+751.79%)
Mutual labels:  pcb, kicad
Qeda
The tool for easy creating electronic component libraries
Stars: ✭ 66 (+17.86%)
Mutual labels:  pcb, kicad
Pcbdraw
Convert your KiCAD board into a nice looking 2D drawing suitable for pinout diagrams
Stars: ✭ 426 (+660.71%)
Mutual labels:  pcb, kicad
Kicad footprints
A collection of all the KiCad footprints on the internet
Stars: ✭ 216 (+285.71%)
Mutual labels:  pcb, kicad
djinn
Djinn Split Keyboard
Stars: ✭ 685 (+1123.21%)
Mutual labels:  pcb, kicad
keyswitch-kicad-library
Footprints for popular keyboard switches
Stars: ✭ 163 (+191.07%)
Mutual labels:  pcb, kicad
Pcb
PCB and PCB related bits
Stars: ✭ 325 (+480.36%)
Mutual labels:  pcb, kicad
samoklava
Generated keyboard
Stars: ✭ 241 (+330.36%)
Mutual labels:  pcb, kicad

Stretch

Allow your PCBs to stretch!

The Process

In KiCad:

kicad1

In Inkscape:

inkscape1

Modify:

inkscape2

Back to KiCad:

kicad2

Why?

This was written to address some frustrations with other "artistic" PCB workflows. KiCad and other traditional ECAD software has poor support for curved lines, importing and processing of images/drawings, and many other features that can be expected in proper vector software.

Tools intended to bridge the gap are also lacking. PCBmodE is the probably the best tool out there from a pure PCB art standpoint, but there is no schematic tool, and with that, no ability to handle extremely complex, functional PCBs.

KiCad has a tool to export to SVG. SVG-To-Shenzen is a tool to convert SVG files into KiCad files. Both of these are single-direction tools.

Stretch goes both ways. Much as the ideal schematic->PCB capture workflow does not exist, the PCB layout aspect must go hand-in-hand with the art aspect.

Users can start by laying out a PCB, then bring it into Inkscape to arrange a thousand LEDs into a flower arrangement, then bring it back into KiCad to lay out traces, back into Inkscape to curve the traces, back into KiCad to change their microcontroller and few pin assignments, back into Inkscape to draw out some silkscreem patterns, back into KiCad to run DRC, and so on. The workflow is intended to be seamless and painless to go back and forth.

Installation

  • Copy the Stretch folder into your KiCad plugin folder
  • Install dependencies:
    • On Windows using D:\Programs\KiCad\bin\python.exe -m pip install bs4 as administrator (but substituting your own KiCad\bin path)
    • On Linux using sudo python3 -m pip install bs4
  • Open up a PCB and then in Pcbnew, got to Tools->External Plugins...->Refresh Plugins
  • This has been tested on KiCad 6. For a KiCad 5 legacy version, check the releases.

Workflow

  • In Kicad: Open up your KiCad project, and then your PCB in Pcbnew
  • Hit the "UP" arrow in your plugin bar stretch-to-svg (Stretch up to SVG)
  • In Inkscape: There is now a file in your PCB directory called "out.svg". Open it in Inkscape, or your preferred vector software
  • Make your modifications. Bend some lines, draw some pictures, rotate some footprints
  • Save your SVG
  • In KiCad/Pcbnew: Hit the "DOWN" arrrow stretch-to-pcb (Stretch down to PCB)
  • Close Pcbnew and then re-open the PCB in the main KiCad window
  • Continue tweaking. Change some nets, add more components
  • Hit the "UP" arrow again to go right back to SVG
  • In Inkscape: File->Revert to quickly reload the SVG. Alt-F and then V works as well
  • Do it all again.

In Inkscape, go to Layer->Layers... to display a window that will allow you to show/hide/view specific PCB layers. Edit->XML Editor... is also a good tool to debug why something isn't working, or see what's happening under the hood. Each object has some metadata that is associated with the KiCad PCB data, so objects without this data won't work properly. It's better to copy an existing trace/zone/via/text than to try to create one from scratch.

Limitations

Fonts will look different in your vector software than in KiCad. This includes positioning, sizing, and fonts. It will import back into the PCB editor undamaged, however.

Closing the PCB window and opening it again is annoying - There is no way to programmatically reload it from disk, as of KiCad 5. Perhaps rebuilding the existing PCB from file using the API is possible, or KiCad 6 has added some other method.

Metadata that doesn't need to be processed, or do not yet have processors written are still stored. They are unchanged and hidden in the SVG so they can be imported properly back into the PCB.

Most data is processed properly! Diffs on some mildly complicated 4-layer boards are coming back clean.

This is still kind of a hack. Obviously, save and backup everything before using this, and check check check your gerbers before purchasing anything.

I am happy to accept issues, or pull requests, and example PCBs that break the software. I may be slow to fix issues on myself, so feel free to dive in yourself!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].