Milling PCBs with the Shaper Origin

published 02/02/2025 • 4m reading time • 13 views
The bottom side of a milled copper PCB

The Shaper Origin is a handheld CNC router designed for woodworking. You can create vector-based designs, then move the router generally along each path, and it will correct for any inaccuracies to cut the exact shape you designed.

It’s a really cool device, although absolutely not the right tool for milling circuit boards… But if you don’t have a CNC machine and have access to a Shaper Origin router or use a more sane method for milling or etching your PCBs but need an easy way to precisely drill hundreds of through holes and vias, then keep reading.

The Shaper Origin Router

Contents

Example PCB

I have recently been interested in using relays for creating binary logic circuits. For this reason, I’ll use a relay-based hexadecimal seven-segment display driver that I designed as an example for the reminder of this article.

Its function is not super important, but it takes in a four-bit binary number and displays it on a seven-segment display, with the help of forty-three relays and eighty-four diodes.

Board Design
The design for the seven-segment display driver in LibrePcb

Why It’s Not So Simple

Although you could create your PCB designs directly in a vector editor like Illustrator or Inkscape and upload that to the Shaper, that is not really feasible for more complicated designs. For this reason, I used the EDA software LibrePCB to design my board layouts.

Most EDA software lets you export board designs as Gerber and drill files. Gerber files define the size and paths of the traces as well as the size and placement of ‘apertures’ which can be component pads or vias. Drill files, as you might expect, define the size and positions of the holes that need to be drilled.

Gerber to SVG Converters

The first thing I tried was using a ‘gerber to svg’ converter like Tracespace, then importing the SVG to the Shaper software. This kind of worked, but there were a lot of issues.

The output of Tracespace opened in the Shaper software

The apertures on their own look ok, but the traces are just lines. This is an issue because we need the traces to be an area of copper disconnected from their soundings, not just a single grove. The other big issue is that not all components of each trace are combined. You can see this on each through hole, where the trace and aperture are just on top of each other, instead of being combined into a single shape.

My Solution

There is probably some procedure you could do in a vector editor to fix the output from Tracespace, but I opted to write a program, shaper_pcb, to directly convert Gerber files into valid Shaper SVGs.

It’s a command-line tool that you will run once for each layer of traces and once for the drill holes.

Usage: shaper_pcb [OPTIONS] <INPUT> <OUTPUT>

Arguments:
  <INPUT>   Gerber / Drill file to process
  <OUTPUT>  SVG file to output

Options:
  -o, --outline <OUTLINE>                        Optional outline layer
  -a, --aperture-thickness <APERTURE_THICKNESS>  Aperture radius multiplier [default: 1]
  -t, --trace-thickness <TRACE_THICKNESS>        Trace thickness multiplier [default: 1]
  -p, --pads-only                                Ignore traces, only export apertures
  -h, --help                                     Print help
  -V, --version                                  Print version

Using the Software

If you want to use it yourself, first download a binary from the releases page on GitHub. Then open the directory with the needed Gerber and drill files (top / bottom traces, outlines, drill) with a terminal and run the following commands.

shaper_pcb -o OUTLINES.gbr COPPER-BOTTOM.gbr -a 1.3 traces-bottom.svg
shaper_pcb -o OUTLINES.gbr COPPER-TOP.gbr -a 1.3 traces-top.svg
shaper_pcb -o OUTLINES.gbr DRILLS-PTH.drl -a 1.3 drill.svg

The -o flag adds the board outline as a guide, which can be useful for alignment and positioning, and -a adds a multiplier to the size of apertures. You probably won’t need to change the aperture size here, but LibrePCB doesn’t allow you to adjust the size of component through holes in the board editor, so I do it externally.

Now, for each of the generated SVGs, upload them to Shaper Studio and configure the paths.

How It Works

I used NemoAndrea/gerber-parser to, well, parse the Gerber files. Then a polygon approximation of a circle is added to the list of shapes for each aperture, and a rectangle with circular ends is added for each trace segment. I then use the iOverlay crate to merge all overlapping shapes into singular paths. Finally, the svg crate is used to save all the polygons to a SVG file.

Support for drill files was more complicated to implement, as I couldn’t find any libraries for parsing them, so I had to make my own parser. But overall, the whole thing is relatively simple.

Milling

I found that setting a 0.79 mm bit diameter with a 90° engraving bit works pretty well for milling the traces. Also, it’s crucial to get your copper clad board as flat as possible, because even being just a few millimeters off in some areas can cause problems.

On the router, I first create a grid to align the bottom trace layer with the drill layer later. Then I place the bottom traces, which must be flipped to line up with the top layer.

The bottom copper layer in Shaper Studio

After finishing milling the bottom traces, I add the drill layer, which must also be flipped, and deleted the trace layer.

The drill layer in Shaper Studio

After finishing drilling, flip the copper clad board over and add the top traces, using the holes to visually align it. Then after milling, you can use a Dremel or something to cut that segment of the board free.

Conclusion

I was actually quite surprised to see how precise the Shaper Origin was for milling such small details, especially because it is designed for woodworking.

The seven-segment display driver took about eight hours to mill, and another few hours to hand solder all those vias… Anyway, here are some pictures of the finished product:

Top of the finished Seven Segment Display Driver
Bottom of the finished Seven Segment Display Driver