Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Pcb-stackup: Generate beautiful and accurate SVG renders of printed circuit boards (github.com/tracespace)
66 points by based2 on July 25, 2016 | hide | past | favorite | 14 comments


This is very interesting and something that I can really apply at work?

Does anyone knows how this compares to Gerber-to-svg? https://github.com/mcous/gerber-to-svg


It has gerber-to-svg as an dependency, so I'm curious what it actually adds to this.


A PCB consists of multiple layers, each one of which is described by a gerber file. gerber-to-svg renders each individual layer to svg; this project aggregates all the layers and stacks them up (hence the name) in the proper order.


Thank you!

Macrofab does this for their web tool, from their Github I guess they merge gerber-to-svg with this SVG Stacker:

https://github.com/MacroFab/SVG-Stacker


You're right, sort of! =)

We use gerber-to-svg (it is the best we've ever worked with) server-side, but we use svg-stacker to generate images for the cases where we need them (thumbnails, printouts, etc.)

On the front-end, we use html5 canvas rather than a pre-stacked SVG.


Somewhat related and in reverse, generate beautiful [0] gerbers for manufacture from SVG/JSON definitions using PCBmodE. [1]

[0] http://www.boldport.com/blog/2015/11/25/haute-circuits

[1] http://pcbmode.com/


This is a great project but why is the example image a raster png rather than an svg?


SVGs don't work in Github READMEs. I believe this is for security reasons.


This is true, though there is a workaround by using cdn.saw fit.com domain. I use the trick to display SVG figures in these white paper notes[1], and I found out about it in this issue thread[2]

Example:

<img src="http://cdn.rawgit.com/<username>/<path>/<to>/<image.svg>">

[1]: https://github.com/samjabrahams/tensorflow-white-paper-notes... [2]: https://github.com/isaacs/github/issues/316#issuecomment-113...


Really like projects like these. Nice building block that'll make like easier for people to share information about boards in the future. Awesome.


As @aylons mentioned this is just a thin wrapper onmcous/gerber-to-svg; Moreover mcous has written http://svgerber.cousins.io/ himself.


This is in fact a thin wrapper, that I mostly wrote, around a fat wrapper that mcous wrote (pcb-stackup-core).

Check out http://viewer.tracespace.io for the updated svgerber style viewer.


What about component models?


This is only a Gerber file renderer. Gerber files only contain manufacturing data (it's basically a vector image format).

So 3D models would be very hard to add. It would only work if you export a BOM with position data and references to STEP files for your board. This is not currently supported by most commercial software (no idea if it's possible with KiCad), positions are easy to get, but then you'd still need the 3D models (including position offsets and rotation).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: