Use 3D Printer As a Plotter/cutter

70,296

151

56

Introduction: Use 3D Printer As a Plotter/cutter

I got an XYZ DaVinci 1.0a, hacked to have Repetier 0.92mod firmware, and wanted to use it as a plotter / cutter as well as a 3D printer. Some use cases:

  • plotting with fabric markers on T-shirts; the main point is to make coloring-sheet T-shirts our 4-year-old can color with fabric markers
  • drawing traces on circuit boards for etching
  • cutting gum paste for cake decorating
  • cutting paper or vinyl with a drag-knife.

It was important to me that the printer mod be easily and quickly installable and uninstallable, so one can quickly switch between plotting, cutting and 3D printing.

The software side of this is a Python script / Inkscape plugin that I wrote to convert SVG / HPGL path files into gcode that the printer can print.

Materials:

  • M3 screws and nuts
  • ABS filament
  • pen or marker (for plotter)
  • pins, plywood, screws and bungee cord (for extended print platform)
  • cutter holder and blades (I used this one) (for cutter)
  • Cricut adhesive mat (for cutter)

My total cost was under $20, not counting the printer.

Step 1: Attachment Clip and Springy Tool Holder

For versatility and easy of printing, I went with a two-part approach:

  • attachment clip for the print head
  • springy tool holder for pen or cutter.

The attachment clip provides a mounting surface, with screw holes or gluable mounting holes, that clips onto the print head. The tool holder then screws or glues to it.

The attachment clip needs to be customized for your particular print head. Mine is for the XYZ DaVinci 1.0a. You may be able to use my OpenSCAD file to to customize for other printers. Experience shows that you'll have to measure, print, modify, print again.

I've used three tool holders. All of them need to be printed in ABS, and get their springiness from built-in ABS springs. The springiness is essential to compensate for imperfections in the surface (though you also may get some bonus springiness from your bed's leveling springs--but that may screw up your leveling).

  1. Two-piece very springy pen holder that I remixed from one that EGoe made for the ShapeOko.
  2. Low-profile pen holder that I designed from scratch.
  3. Roland-style blade mount holder that I also designed from scratch. The bird-shaped spring here is just designed to press on the blade mount's upper pin. You may need to change the dimensions slightly to fit your blade mount.

As long as the mounting screw/glue holes on your attachment clip has the same placement as on mine, you should be able to just print my tool holders without change. I used ABS juice (ABS dissolved in acetone) to attach the two piece holder to the attachment clip. The bond is surprisingly strong. The rest uses M3 screws and nuts.

The dimensions my pen holders are designed to hold up to a 15mm fabric marker, but you can use Thingiverse's Customizer to change the size. All of them are designed to use M3 screws and nuts to hold the tool in place. There are screw nut holes that are printed by the file. On my printer, these tend to come out very snug and I had to run a drill bit (sometimes just handheld) through the screw holes, and then use a screw to force a nut into the hole. The nice thing about that is that the nuts then tend to stay in the hole.

The two-piece pen holder is really cool looking, but takes up a lot of space, which limits your print area. Hence I designed my low-profile holder instead.

Step 2: Extended Print Platform

On my printer, because the tool is off to one side of the print bed, a large chunk of the print bed can't be used for drawing and cutting. However, there is also a chunk of space that could be used if the print bed were large. In my scrap collection, I had the remains of a plywood jigsaw puzzle, and I glued on some extra pieces of wood that made it into an extended print platform, which ties on with bungee cord. A bonus of this is that I can use thumbtacks to attach work to the wood. This is ugly and hackish, but worked.

I wouldn't use this for cutting, as it's going to be hard to make the plywood as level as a glass bed would be, and leveling is much more crucial for cutting.

Step 3: Calibrating

Level your printer bed. If you're going to be cutting, level it very carefully.

Attach your clip and tool holder, and insert the tool you will use. The calibration will be different for different combinations, and the Z-calibration will need to be done each time you level, as the heights will change slightly.

Make sure you can home your printer without the clip, holder or tool bumping into the bed. If not, you will need to do some careful hardware/software working around.

Now, use your printer panel or software (I used Repetier Host) in manual mode to move the printhead around.

First, move the printhead away from the bed for safety. Then locate the minimum and maximum XY coordinates of the available print area (make sure printer can move freely over it without bumping into any clips that you will use to hold the work in place). On my printer with the two-piece holder, the coordinates are minX=10, minY=8, maxX=192 and maxY=150, all in millimeters.

Now comes the crucial point. This is so crucial, I recommend doing it before every print. Find the Z coordinate that the tool will be in while drawing and cutting. To do this, attach whatever you want to draw on (paper, fabric, etc.) on the bed, or attach the cutting mat. Then very slowly lower the tool until it is at the desired height. To prevent marking the object when drawing, you can put a piece of aluminum foil between the pen/marker and the object.

For drawing, you want the pen to exert some pressure on the drawing surface. You'll need to experiment to get the right amount of pressure. For cutting, you want the very tip of the blade to slightly penetrate the cutting mat.

Make a note of the Z coordinate.

Then check how many millimeters you need to lift the tool for movement. Typically two or three millimeters of lift will do. The less you lift, the faster the print will be.

Finally, if you're cutting, measure the "tool offset". This is the distance from the swiveling knife pivot to the far edge of the knife. Typically, this will just be the width of the knife.

You will now have this data, all in millimeters:

  • minimum and maximum X and Y coordinates
  • work Z coordinate
  • distance to lift tool
  • tool offset (if cutting)

Step 4: Preparing Gcode With Inkscape

There is a pretty good chance you can use the bundled gcodetools extension to drive your printer as a plotter, but I ended up writing my own python script and extension.

1. Make sure you have Inkscape installed.

2. Download the latest release of my gcodeplot scripts. Drag the contents of the zip file into your Inkscape's extensions directory. E.g., C:\Program Files\Inkscape\share\extensions in a typical Windows installation (you will get a UAC prompt in Windows, and will need to use an account with admin privileges; if you don't have such an account, do a single-user install of Inkscape).

3. Restart or start Inkscape.

4. Load the SVG file you want to draw or cut into Inskcape. The lower-left corner of the page in Inkscape corresponds to the minimum X and Y coordinates you measured in the previous step. Make sure your images fit into the print area.

5. Convert the drawing to a path: ctrl-A to select everything, then Path | Object to Path.

6. Save to gcode:

  • File | Save As...
  • Select: "3-axis gcode plotter" in the "Save as type" dropdown (if it doesn't show up, gcodeplot hasn't been installed properly)
  • After pressing "Save", you will have a complicated window with many settings.
  • General tab:
    • Tool mode: choose "drawing" or "cutting" to start off
    • Left x-coordinate, lower y-coordinate: the minimum X and Y coordinates from previous step
    • Right x-coordinate, upper y-coordinate: the maximum X and Y coordinates from previous step
    • Work z-coordinate, from previous step
    • Lift z-height: distance to lift tool relative to work for movement, from previous step
    • Parking z-height: a good safe lift distance relative to work, to miss all clips, etc. (20mm default should be fine)
    • Serial port: leave blank
  • Fitting and Extracting tab:
    • I recommend the defaults
  • Drawing Settings tab (if drawing):
    • Shading threshold: 0 if you don't want to shade colored areas; 1 if you want to shade all colored areas
  • Cutting Settings tab (if cutting):
    • Tool Offset: set as measured in previous step
    • Overcut: probably set to the same value as the Tool Offset
  • Press OK.

Step 5: Drawing or Cutting

Make sure your work is attached well enough to the print bed. Here are some hints:

  • if you use any clips, make sure that the print head or pen won't crash into them
  • make sure bed is not being heated
  • for drawing on fabric with a fabric marker, make sure the fabric is very strongly attached along the edges and well stretched; otherwise, the marker will pull the fabric
  • for drawing on paper, you can just clip the paper to the bed or tape it with painter's tape; with a ball-point pen, I've had good luck just drawing on a sticky note that was stuck to the bed (it was a bit off on the side not glued down, but it still worked)
  • I'd attach CDs or PCBs (I haven't tried PCBs) with painter's tape
  • for cutting, use a Cricut adhesive mat, cut to the correct size, and clipped to your bed; you can customize the clips that I used

Load the gcode file into your printer control program and print. I used Repetier Host. Kill the print (know what your printer's reset button sequence is) if anything goes wrong to avoid damage.

Step 6: More Software Stuff

While saving the gcode with my gcodeplot Inkscape extension, you can fill out a serial port name (e.g., "COM4") and have it simultaneously send the code to your printer. I don't recommend this when starting out as you have no control during sending, and the reliability is likely lower than using something like Repetier Host. But eventually you can try it.

If you have python installed, gcodeplot.py can also be used directly from the commandline, and applied to a path-only SVG file (i.e., an SVG file where objects were converted to paths with Select-All and then Path | Object-to-Path in Inkscape) or an HPGL file. Run python gcodeplot.py (assuming you have python in your path, and you're in the root gcodeplot directory) to list the options. One particularly useful option is adjusting the x/y/z coordinates right inside gcodeplot.py. To do that, include --pause-at-start --send=portname in the commandline, e.g.:

python gcodeplot.py --pause-at-start --send=COM4 mydrawing.svg

The printer will start up, but before any printing starts, you will get a gcodeplot commandline that lets you move the printhead around. Here are some pause-mode commands:

  • xn: here n is a number (e.g., x7, x0 or x-4.3) in millimeters; moves printhead to absolute x coordinate n. You can also replace n by left, center or right, as well as by more complicated formulas like (left+center)/2. In all commands, if you use formulas, there must be no spaces in them. Also, there must be no space between x and the number.
  • yn and zn: same but for y and z axes; the special coordinates bottom and top (for the y axis), and work and safe (for the z axis) will be recognized
  • x+n: increments the x position by n. E.g., x+0.7 moves the printhead by 0.7 mm in the positive direction, and x+-0.7 by 0.7 in the negative direction. (Don't confuse with x-0.7 which moves to absolute coordinate -0.7)
  • y+n and z+n: same but for y and z axes
  • left=x: set the left value (minimum x coordinate) for the drawing to the current x coordinate (you can also do more complicated formulas, like left=x-3 or left=left-0.1; again, no spaces)
  • bottom=y: set the bottom value (minimum x coordinate) for the drawing to the current y coordinate
  • work=z: set the work z-value
  • Gxxx: send any G-command to the printer
  • c: continue printing

After you set the left, bottom and work values, the drawing/cutting will be adjusted to use them.

Finally, you can do multicolor plotting by using a pen control file. Make a text file, e.g., named pens.txt, with contents like this:

1 (0,0) red Red marker
2 (0,0) #00FF00 Green marker
3 (0,0) black Black marker
4 (0,2) yellow Highlighter

The general format is penNumber (offsetX,offsetY) svgColor Description:

  • penNumber: an integer--drawing will be sorted in order of penNumber
  • (offsetX,offsetY): used in case the pen is a different thickness from the pen you used when calibrating; for instance, if your pen tip sticks out 2mm further in the y-direction than the one you used when calibrating, put (0,2). If all the pens are the same size, use (0,0) for them all. (There is no out-of-bounds checking when you use offsets. Be careful.)
  • svgColor: pen color, specified in SVG color format; there are many named colors; you can also use #RRGGBB hex color names, as well as rgb(r,g,b) color names where r,g,b are integers fromI y 0 to 255 or percentages (e.g., rgb(100%,100%,100%)).

If you then include --pens=pens.txt on your gcodeplot.py commandline, gcodeplot.py will match the colors in the drawing to the closest colors in your pens file, and insert a pause command in the gcode for pen changes. The challenge is either making sure that the pens all stick out the same distance (you'll have to do this if you are using a 3rd party program like Repetier Host to send the gcode to the printer) or else re-callibrating the z-coordinate using gcodeplot's pause-mode commands (i.e., move the printhead to the correct work position with zn or z+n commands--with aluminum foil to protect the work--and then do work=z).

I have yet to test the multiple color feature, as I haven't had a use for it.

Design Now: 3D Design Contest 2016

Participated in the
Design Now: 3D Design Contest 2016

CNC Contest 2016

Participated in the
CNC Contest 2016

Epilog Contest 8

Participated in the
Epilog Contest 8

Be the First to Share

    Recommendations

    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • First Time Author Contest

      First Time Author Contest
    • Lamps and Lighting Contest

      Lamps and Lighting Contest

    56 Comments

    0
    lordofthedum
    lordofthedum

    Question 5 weeks ago

    getting the dreaded NO POINTS error, can you please just give a step by step how to fix this? people just say goto fill and stroke but i have no clue what to input...

    thanks

    0
    arpruss
    arpruss

    Answer 5 weeks ago

    Your drawing needs to have outlines around the regions, rather than the regions just being filled. Click on a region in Inkscape and shift-click on the black color in the palette to add an outline.

    0
    lordofthedum
    lordofthedum

    Reply 5 weeks ago

    hey thanks, i figured it out, i had click on the image, click on flll and stroke, under fill hit X and under stroke hit flat color.


    any idea why the Gcode goes back over the drawing with sqigly lines? it seems to go over parts of the image 2x once nice like a vector others like bitmap , i made the image in AI

    Screen Shot 2021-08-08 at 6.14.02 PM.png
    0
    McClaryDesign
    McClaryDesign

    Question 2 months ago on Introduction

    I am using a Mac so I don't know if this is the issue.

    I am getting an error when I do the Save As.
    gcodeplot.py:429: SyntaxWarning: :"is not" with a literal. Did you mean "!="?
    if pen is not 1:
    Drawing out of range:


    Any idea what might be causing this? How to fix?

    Screen Shot 2021-07-15 at 4.56.20 PM.png
    0
    arpruss
    arpruss

    Answer 2 months ago

    I fixed the bug that was giving the warning. But the warning doesn't explain why you weren't getting any output. I am guessing this was because you didn't have any lines in your drawing, only filled regions.

    0
    Cashankha
    Cashankha

    4 months ago

    I'm struggling with "No points" error when trying to save gcode for cutter followed by info that fille cannot be saved. What's interesting the drawing mode works. I have Inkscape 0.92 with gcodeplot-0.10. Image size is within the range, all shapes with infill (I've tried with traced bitmaps and simple vector objects in Inkscape like circle).

    0
    Cashankha
    Cashankha

    Reply 4 months ago

    Resolved! The shape can't have any fill - only strokes allowed. So after tracing the bitmap go to Fill and Stroke to remove fill and set black stroke.
    Sometimes I have error about the image size. In that case copying image and pasting into the new file looks like the simplest workaround.

    0
    arpruss
    arpruss

    Reply 4 months ago

    You CAN have fill. It's just that by default, fill is not drawn, resulting in nothing happening.
    There is a crosshatch option for fill handling, too.

    0
    MonoPawel
    MonoPawel

    10 months ago

    Finally I got rid of the "No points."-error. I wanted to share my solution. First of all I used the 0.92.5 x64 portable app of inkscape and the gcodeplot-0.10. This was my initial problem not knowing if there could be a version problem - it's not by the way! As long you are using the .10 script and not the 1.x inkscape version or newer. To eliminate the no points error do only this additional step: "Use fill boned areas" (the bucket icon on the left tool bar) for all areas.
    But don't ask me why this helps... I've almost no experience with SVG and inkscape

    0
    Cashankha
    Cashankha

    Reply 4 months ago

    In ma case the opposite works for cutter - no fill for all the areas, just black 1pix wide stroke.

    0
    nramakers
    nramakers

    8 months ago

    Thanks for this nice tutorial, I didn't use your setup. But the inkscape plugin works like a charm. Just what I needed.

    0
    aaronlionheart
    aaronlionheart

    Question 1 year ago

    Hi , inskape version 1 show me :


    gcodeplot.py:429: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if pen is not 1:
    C:\Program Files\Inkscape\share\inkscape\extensions\svgpath\parser.py:593: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if link is None or link[0] is not '#':
    Drawing out of range: [4.523035120549281, 273.23017246722935] [39.887085312865, 296.3396930206236]
    No points.

    0
    arpruss
    arpruss

    Answer 8 months ago

    Your drawing is bigger than your print area. Try reducing your drawing.

    0
    arpruss
    arpruss

    Answer 1 year ago

    The script is not updated for Inkscape 1. You can run the python from the commandline or use an older Inkscape.

    0
    avinashk
    avinashk

    8 months ago

    THANK YOU FOR SUCH A GOOD INSTRUCTABLE...
    I AM AN ENTHUSIAST DIYr, RECENTLY MY SON BOUGHT ENDER3 PRINTER WHICH IS LYING AROUND HENCE WANT TO USE IT AS PEN PLOTTER OR SO. FOLLOWED ALL THE STEPS, AND REACHED UP TO THE STEP WHERE THE PARAMETER PAGE POPS UP, AND WHEN I TRY TO SAVE G CODES AS "3 AXIS PLOTTER" THE MESSAGE APPEARS "Drawing out of range: [4.523035120549281, 273.23017246722935] [39.887085312865, 296.3396930206236] AND G CODE DOESNT GET SAVED.
    I AM USING INKSCAPE V1.0.1, AND THE SOURCE CODE OF YOURS.. KINDLY HELP
    THANK YOU.
    KEEP POSTING NICE INSTRUCTABLES

    0
    gkhnaltn.1213
    gkhnaltn.1213

    Question 8 months ago on Step 4

    merhaba neden çizimim çift çizgili olarak çiziliyor ?

    0
    arpruss
    arpruss

    Answer 8 months ago

    Google translate says your question is "hello why my drawing is drawn with double lines?"
    It's hard to say without a picture and your svg file. My guess is that the svg has double lines in it.

    0
    anjoschu
    anjoschu

    1 year ago

    Thank you for the awesome tutorial and the (very hackable) Inkscape extension! This made it possible for me to cut some 0.3mm A4 PVC sheets for face shields on my CR-10. I still had a cheap Roland-style drag knife set lying around. In case my struggles help someone trying to achieve something similar:
    1. Adhesion is key. You can use non-permanent spray adhesive. I used a mixture of IPA and distilled water because I didn't want to smugde the transparent surface (it's not an adhesive, but it wicks under the sheet, displacing air and the air pressure helps keep the sheet in place). I also used clamps at the edges (but take care that the knife does nut run into them -- ask me how I know).
    2. Repeated cuts help. In "real" cutters, you can determine a pressure. 3D-printers don't have that. Pressure is a result in height of knife vs. height of the surface vs. the flexibility of surface and the knife holding part. You'll have some play/flexibility there, and can use that to your advantage. Particularly with cheap blunt knifes, the first cut just won't cut it (sorry). So I edited the exported gcode file and just copied/pasted the relevant part a couple of times.
    3. Gradually increase depth of cut. This is somewhat more involved. It means copy-pasting the cutting code like above, but search-replacing the lines containing "!!Zwork" with ones containing gradually lower and lower Z coordinates as repeated cuts go on. I needed to do this because trying increased pressure (lower height) just made everything imprecise, and repeated cuts did only get me so far. I chose to lower the Z coordinate by 0.05mm for every other repetition, which worked out fine. Don't overdo the plunge, or the knife will dig into some parts and you will lose steps.

    When having modified the gcode (also when not) it helps to visualize the cutting path before risking a cut. I just opened the gcode file in a slicer (show travel movements); you can use Repetier-Host for this, also: It shows a preview next to the gcode file, so you see exactly what each line does.

    0
    rkolibar
    rkolibar

    1 year ago

    I keep getting "No points" error from 3-axis gcode plotter/Inkscape when trying to save. Anyone please help!