Get our free book (in Spanish or English) on rainwater now - To Catch the Rain.

Converting 2D images to 3D with Inkscape

From Appropedia
Jump to: navigation, search
Hotend.JPG This page is part of a Principia course ENGR242: 3-D Printing Technology

Please leave comments using the discussion tab. The course runs in the Spring semester. It is not open edit.

If any one knows an easier way of doing this - please add in below:

Software needed[edit]

  • Inkscape - An open source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format.
  • OpenSCAD -The programmers solid 3D CAD modeller


  1. Get a 2D image and open it in Inkscape (or draw it in Inkscape)
  2. Convert it to a path (if it worked you should see a bunch of grey squares)
    1. If it is a found image go to Path --> Trace bitmap - shift+Alt+B
    2. (if you drew it Path--> Object to path or click Shift+Ctrl+C)
  3. Select every node -- go to Edit --> Select all or Ctrl+A
  4. If you want a high resolution (curved lines) then click the far left button "insert new nodes into selected segments" (do this as many times as you like 2 or 3 times gets pretty smooth curves on most images
  5. Then click the "Make selected segments lines" button - see screenshot (if you can not see the buttons click F2.) Inkscape-mtu.jpg
  6. File -->Save as a dxf file
  7. Either save the file into your OpenSCAD directory or move it after you save it
  8. Start OpenSCAD
  9. Use the import command in the directory you saved it in. If not on your own computer (e.g. Principia computer use:

import(file="\\\\\\home\\My Pictures\\filename.dxf", convexity=3);

  1. then you can use linear_extrude () ;
  2. Compile and Render it (F6)
  3. Save as STL for printing: Click Design --> Save as STL (this could take some time depending on how complex your object is)
  4. Open in your favorite 3D printing software and have a go at printing it

If you want to import an stl into OpenSCAD:



For a real world item, such as a photograph, an alternative is to use a group of images/photographs taken at slightly different angle and with different focus points.

Using the open source software VisualFSM you can convert the collection of images into 3d cloud of point data - which can then be edited by Meshlab for printing. See for a tutorial on how to do it.

Free cost but not open source: Upload your file and it is converted to STL following 3 steps, without need to download any software.

Another free cost, but not open source alternative is