Shaper Origin SVG Export

I’ve been working on a plug-in to support the Shaper Origin handheld CNC router from within Rhino 7. Shaper Origin reads specifically formatted SVG files to do the cutting.

Because naming things is hard, and fun, the ShaperSVG command is in my TunaHalf plug-in. TunaHalf may someday include more tools for Two-and-a-half-D fabrication.

Downloading TunaHalf

  1. Install Rhino 7 (a non-expired eval will work)
  2. Click rhino://package/search?name=tunahalf
  3. Rhino will start, open the PackageManager, and show you the TunaHalf plug-in.
  4. Select TunaHalf, then click Install
  5. Restart Rhino

Using ShaperSVG export

  1. Model a part that you want to cut.
  2. Run the ShaperSVG command in Rhino
  3. Select the top surface of the part you want to cut. The top surface will be the un-cut surface of your workpiece.
  4. (Optional) Select curves to engrave. Use curves to path trace for engraving.
  5. Enter the SVG filename.
  6. Upload the SVG file to https://hub.shapertools.com/, then download to your router.

Features

ShaperSVG export detects holes, pockets, part outlines, and engraving curves. Pocket depths are added as non-cutting annotation geometry in the SVG file, and as attributes in the XML, in case Shaper Origin supports them in the future.

Examples

  1. Gnocchi/Cavatelli Pasta Texture Plate
    image

    Engrave these curves into a piece of wood, then make tasty, fun-shaped pasta (pasta recipe not included).
    plate3.svg.zip (9.0 KB)
  2. 2003 Subaru Forester Camshaft Tool
    image
    camshaft removal tools.zip (133.3 KB) was useful in Dec 2021 when replacing the cylinder head gaskets on my son’s car. Why buy specialty tools from Subaru when you can cut them out of a 2x4? 3DM file and SVG files included in the zip archive.

Share your work!

Please post in the gallery and use the tag #ShaperSVG

What? A bug?

Please tell me about it. Reply in this thread, or create a new one. Please attach your 3DM file, the SVG file, and a description of what didn’t work. I won’t be able to debug much from screen shots.

10 Likes

Hey @brian

I have been working with the Shaper Origin since early 2019 and have been using Rhino since early 2021. So, I’m really happy that an .svg export from Rhino optimized for the Origin is now possible!

Keep up the good work. I really enjoy working with Rhino!

At the moment I have some difficulties:
After the ShaperSVG export, a duplicate of the exported object is created and several points are positioned at random on the object.


The cutting depths shown as guide lines (which is a great feature by the way) are shown in the .svg illegibly small.

Even after several attempts with different objects, the .svg could not be detected by the origin.
It is possible, of course, that the mistake is my fault. Still, I hope to be able to help. Attached is the 3DM file, SVG, and the error message of the Origin.


“design could not be placed. Check the file format. Contact support@shapertools. com if you still have problems”

Kind regards, Florian

TEST file
TEST file.3dm (433.8 KB)

1 Like

Thanks for the bug report; I’ll have a new build out shortly that uses a completely different pocket and hole detection algorithm, and won’t duplicate the objects and points.

Once I have the new algorithm in place, I’ll try your model and fix whatever bugs remain.

3 Likes

TunaHalf build 0.1.8043 is now released

To install:

  1. Click rhino://package/search?name=tunahalf
  2. Click Update (or Install, if you haven’t already installed)

New in 0.1.8043:

  • ShaperSVG outputs SVG files in either mm, cm, or inch units (scaling geometry as appropriate if your Rhino model is in feet or meters or some other unit system.) @FlorianMeigel I believe this is what caused problems with your model (your model was in millimeters but the SVG was written with units of inches. This made your model way too big for Origin, and resulted in microscopic pocket depth text.)
  • ShaperSVG does a better job finding holes in non-planar surface geometry. The last version missed one of these three holes:
  • ShaperSVG incorrectly duplicated geometry at the model origin, and created extra point objects. This was the result of debugging code being left in during export.
1 Like

Florian, it’s great to have you helping try out this early, early prototype of an exporter. I just watched this YouTube video describing your Shaper in Residence. How exciting! It’s cool to see that you’re the person behind this joint, which I’ve seen several times and adored - I can’t wait to give it a try :smiley:

I look forward to seeing what kind of challenges you can throw at this! This part still doesn’t export properly. It’s amazing how easy it is for humans to see what’s supposed to happen here, but so much harder to detect with code! From the top, this is a pocket - either half way or 3/4 of the way through the stock.

2 Likes

TunaHalf build 0.1.8052 is now released

To install:

  1. Click rhino://package/search?name=tunahalf
  2. Click Update (or Install, if you haven’t already installed)

New in TunaHalf 0.1.8052:

  1. Updated SVG formatting, including:
    1. Comment at the top of the file indicating the software that wrote the SVG.
    2. Stroke removed from black perimeter areas.
    3. Blue annotation showing depth of cut are grouped together to aid manual editing of files.
    4. Pockets are grouped with blue annotation text to aid manual editing of files.
  2. New algorithm for detecting pockets. This does a good job in all the cases I’ve tried, except when there are chamfers on the sides of objects. I have an idea about how to fix this for the next version. The example in my previous post works well now.

Please give it a shot, and let me know if you see problems.

Hello Brian,
I just came across the SVG export plugin for Shaper Origin.

I have the problem that I get to the save dialog but no SVG file is generated?

What am I doing wrong?

Thanks in advance.
Many greetings
Peter

It might be that the geometry is causing an exception in Rhino, and the file isn’t being written. Can you please send me the 3dm file you’re trying to save? If you can’t post it publicly, please send me a DM here.

Here I am sending you the file.
Units are in millimeters
Deckplatte.3dm (335.3 KB)

Many thanks for your help.

1 Like

TunaHalf build 0.2.1 is now released

To install:

  1. Click rhino://package/search?name=tunahalf
  2. Click Update (or Install, if you haven’t already installed)

New in TunaHalf 0.2.1

  1. Fixed a bug that @Peter_v_Stackelberg reported that caused an an infinite loop, and therefore no SVG file.

Please give it a shot, and let me know if you see problems.

Hi Brian, thank you for the message.

Unfortunately, I still can’t save an SVG file.

I am sending you a new very simple test file here.

Maybe I’m just doing the wrong preparation?

  1. I run the “ShaperSvg” command

  2. I choose the zero plane (support plane for the milling machine)

  3. I pick the edges to cut one by one.

  4. In the save dialog I specify the path and the file name.

  5. No corresponding file can then be found in the folder!?

Best regards, Peter

Testdatei.3dm (110 KB)

Thanks for the description. What happens if you just press Enter when asked for curves? The intention (though this may be unclear) is that the curves are for engraving. If you press Enter instead of selecting curves, it might just work.

I wonder if I’m also being bitten by writing code that isn’t working in German when formatting strings. I’ll look.

Ich habe es gerade genau so durchgeführt, wie Sie beschrieben haben.
Leider wird immer noch keine SVG-Datei generiert.

Danke schön. My German is terrible, so I’m going to rely on Google Translate, and reply in English :smiley:

Let me publish a new version that has better error handling in it. It’ll pop up a big unhelpful (to you) error message that will likely be helpful to me when fixing this.

TunaHalf build 0.2.2 is available

To install:

  1. Click rhino://package/search?name=tunahalf
  2. Click Update (or Install, if you haven’t already installed)

New in TunaHalf 0.2.2

  1. Better error reporting when something goes wrong.

@Peter_v_Stackelberg please give this build a try and send me the stack trace that should appear in a dialog box when things go wrong.

I installed the update.
The procedure:
1.) “shaper svg” command
2) Selection of the object surface
3) save dialog
4) No file is generated again.

Text from the new report field:
" at TunaHalf.FeatureDetection.DetectOuterBoundary(Brep brep)
at TunaHalf.FeatureDetection.DetectFeatures(Brep b, List1& boundaries, List1& pockets, List1& holes, List1& pocket_depths)
at TunaHalf.ShaperOriginCommand.RunCommand(RhinoDoc doc, RunMode mode)"

2 posts were split to a new topic: SVG Export of Circles is Distorted

@Peter_v_Stackelberg is that all of the message? It seems like there’s perhaps something immediately before that that may help me understand the problem.

I repeated the process:

"Please copy and paste the text below, and post the error and your model at
https://discourse.mcneel.com/t/shaper-origin-svg-export/

bei TunaHalf.FeatureDetection.DetectOuterBoundary(Brep brep)
bei TunaHalf.FeatureDetection.DetectFeatures(Brep b, List1& boundaries, List1& pockets, List1& holes, List1& pocket_depths)
bei TunaHalf.ShaperOriginCommand.RunCommand(RhinoDoc doc, RunMode mode)"
shapersvg_screenshots.pdf (1.4 MB)

Hey, I just downloaded the plugin but keep getting this bug report. Thanks!

at TunaHalf.FeatureDetection.DetectOuterBoundary(Brep brep)
at TunaHalf.FeatureDetection.DetectFeatures(Brep b, List1& boundaries, List1& pockets, List1& holes, List1& pocket_depths)
at TunaHalf.ShaperOriginCommand.RunCommand(RhinoDoc doc, RunMode mode)