Mendel User Manual/Converting a simple 2D image into a printed object
- 1 Preparation
- 2 Inkscape: 2D bitmap image to .dxf vector image conversion
- 3 OpenSCAD: 2D vector image to .stl 3D cad model conversion
- 4 Pronterface: from .stl 3d object to .gcode printing instructions to a printed object
This short guide assumes you are running a free software *nix operation system and free software tools only. It was tested on Ubuntu 11.04. If you are using a different free OS, I assume you know what you are doing when it comes to installation. Most of this will probably work on Mac OS. You might even be able to limp by on a Windows system.
In addition to your raster image, you will need the following software tools:
- Inkscape vector drawing program
- OpenSCAD 3d cad modeller
- skeinforge 3d model slicer
- pronterface reprap printer graphical interface
TODO: You will also need a skeinforge profile for your printer. I got mine directly from Kliment at the 2011/07/01-04 Bath Repap Masterclass, but I'm unsure where you could get yours.
sudo apt-get install inkscape
Ubuntu packages are available at https://launchpad.net/~chrysn/+archive/openscad . That page also contains detailed installation instructions.
Installing pronterface and skeinforge
Installing required libraries
Before installing pronterface and skeinforge, make sure to install a few required libraries. On Ubuntu, open a terminal and type:
sudo apt-get install python python-psycopg2 python-serial python-tk python-wxgtk2.8
Installing the actual program
You should install pronterface first, then skeinforge inside your pronterface installation directory. The following dirty little script does that for you:
#! /bin/bash PRINTRUNDIR="$HOME/Printrun" SKEINFORGEDIR="$PRINTRUNDIR/skeinforge" cd $HOME echo "Removing existing Printrun directory..." rm -rf $PRINTRUNDIR echo "Cloning Printrun..." git clone https://github.com/kliment/Printrun.git echo "Grabbing skeinforge..." wget -P /tmp http://fabmetheus.crsndoo.com/files/45_reprap_python_beanshell.zip echo "Unzipping skeinforge into Printrun directory..." unzip -d $SKEINFORGEDIR /tmp/45_reprap_python_beanshell.zip echo "Symlinking skeinforge inside Printrun directory..." ln -s $SKEINFORGEDIR/* $PRINTRUNDIR/ echo "Cleaning up temporary installation files..." rm -rf /tmp/45_reprap_python_beanshell.zip
HINT: If you want to follow the instructions below in English even though your language environment is different, you can force a program to start in English. With inkscape for example, open a terminal and type:
Inkscape: 2D bitmap image to .dxf vector image conversion
- Start inkscape.
- "File" -> "Open". Open the bitmap image you want to convert. When asked if you want to embed or link the image, choose "embed".
- Select the bitmap image by clicking it.
- "Path" -> "Trace bitmap". Fiddle with the options until you get things approximately right.
The trace preview doesn't seem to work perfectly yet in Inkscape 0.48! A detailed tutorial on tracing in Inkscape
- Move the vector image overlay you just created out of the way a little.
- Select the original bitmap image and delete it.
- Move the vector image overlay back in place.
- It's only the object itself we are after, not the surrounding rectangle, so delete the nodes that make up the rectangle surrounding the image.
Straight line segments beteen vector nodes will export cleanly, curved ones will not.
- Select the nodes that belong to curved lines (either drag or CTRL-click). Click "Insert new nodes into selected segments." multiple times until enough straight line segments more or less follow the curved line.
- "File" -> "Save as". Set the file type to save as to
Desktop Cutting Plotter (R13) (*.dxf). Save it directly to your home directory as
OpenSCAD: 2D vector image to .stl 3D cad model conversion
- Start OpenSCAD.
- Paste the following code into the text area:
linear_extrude(file = "test.dxf", height = 10, center = true);
- "Design" -> "Compile and render" (shortcut: <F6>) renders your design.
- Adjusting your 3d object thickness is easy. Just change the height parameter. Example:
linear_extrude(file = "test.dxf", height = 8, center = true);
- After you're satisfied with how your 3d object looks, "Design" -> "Export as STL...". Save it directly to your home directory as
Pronterface: from .stl 3d object to .gcode printing instructions to a printed object
- Start pronterface. If you've run the dirty little installation script above, that's a question of opening a terminal and running:
- "Load file". Choose
test.stlfrom your home directory. Pronterface will now use skeinforge to convert your .stl 3d object to a set of .gcode your printer understands.
- "Connect". If everything goes right, the text area on the right will now tell you you are connected to your printer.
- "Heater". Set the heater to 210°C for PLA filament.
- "Bed". Set the bed to 60°C for PLA filament.
- Now wait. Either check "Monitor printer", or click "Check temp" from time to time until you see the requested temperatures have been reached for both extruder and bed.
- "Home". Move the extruder to its start position.
- "Print". If all is well, your reprap now starts printing.