From Photo to Inkscape to DXF to OpenSCAD to MakerBot to Costume Jewelry

There is a similar tutorial to this one that uses Adobe Illustrator. However, Inkscape is a great, free, opensource vector graphics editor. Yesterday I learned how to use it to go from a photo to a 2D drawing and from that to a 3D extruded version of that drawing and finally to a real live object.

Laura is going as Rachel from Glee this year for Halloween. To complete the outfit, she wanted a "Finn" necklace like the one Rachel is apparently wearing this season


I opened the picture of the necklace in Inkscape, traced it with the Bezier curve tool, cleaned it up a bit, then selected and deleted the image I traced over. The next step was exporting a DXF.

The DXFs exported by Inkscape don't seem to work with OpenSCAD. Instead, I had to install an extension called Better Better DXF Output. Download the zip and extract it into the extensions folder for Inkscape. On Ubuntu Lucid, the extension should be extracted to /usr/share/inkscape/extensions.

Naturally, the fun didn't stop there. After installing the extension on Ubuntu Lucid, it started raising Python exceptions. To make it work, you'll need to replace xpath(path, inkex.NSS) with xpath(path, namespaces=inkex.NSS) in b2_dxf_outlines.py. Finally, by selecting Save As > Format > Better Better DXF, I was able to export a DXF that worked with OpenSCAD.

In OpenSCAD, the code is pretty simple. Unfortunately, the extruded DXF doesn't show up in the center. I had to zoom out and orbit around a bit to find it. Then I added a translate to move it to the center:
translate([-25, 270, 0]) {
  dxf_linear_extrude(file="finn.dxf", height=3, convexity=1, center=true);
}
To finish up, just click Design > Compile and Render followed by Design > Export as STL.

Finally, I printed it up. Since I have a heated build platform, the bottom of my prints have a smooth, glossy finish. So, I mirrored the text in ReplicatorG (Mirror > Reflect in Y) to make the front of the necklace glossy. We don't have any gold paint yet, so here's the almost-final product:


All of the files are available on Thingiverse.

2 comments:

  1. Excellent post, thanks! I am wanting to output to a modela mill, I will see how well this works

    ReplyDelete
  2. Thanks a lot for the post. I found out that you hav to replace every occurrence of

    inkex.NSS

    with

    namespaces=inkex.NSS

    So also replace

    xpath('@height',inkex.NSS)[0])

    with

    xpath('@height',namespaces=inkex.NSS)[0])

    ReplyDelete