
Pcb-stackup: Generate beautiful and accurate SVG renders of printed circuit boards - based2
https://github.com/tracespace/pcb-stackup
======
aylons
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](https://github.com/mcous/gerber-to-
svg)

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

~~~
desdiv
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.

~~~
aylons
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](https://github.com/MacroFab/SVG-
Stacker)

~~~
drone
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.

------
mmosta
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](http://www.boldport.com/blog/2015/11/25/haute-circuits)

[1] [http://pcbmode.com/](http://pcbmode.com/)

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

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

~~~
sja
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>">](http://cdn.rawgit.com/<username>/<path>/<to>/<image.svg>">)

[1]: [https://github.com/samjabrahams/tensorflow-white-paper-
notes...](https://github.com/samjabrahams/tensorflow-white-paper-
notes/blob/master/README.md) [2]:
[https://github.com/isaacs/github/issues/316#issuecomment-113...](https://github.com/isaacs/github/issues/316#issuecomment-113790202)

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

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

~~~
kasbah
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](http://viewer.tracespace.io) for the
updated svgerber style viewer.

------
duhast
What about component models?

~~~
svens_
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).

