Introduction: Convert 2D Images to 3D STL Objects With Fusion 360 for Pen Plotting, Laser Engraving, and More!
Since I first built my 3D printer, I've seen the possibilities for modifying and adding to it in order to increase its capabilities. For starters, I've added a pen plotter, which is mostly a novelty since anything a pen can draw could also be printed on a traditional computer printer. However, my thought is that with this up and running, the methods used can be easily extended to allow for laser engraving, CNC milling, PCB prototyping, and more.
The overall goal of this Instructable is to take a picture from the internet and convert it into gcode that is usable by your printer. There are many instructions online to do so, however all of the ones I found used Inkscape with the J Tech Photonics Laser Tool Plug-In to create gcode for tracing just the outline of your object. Knowing that I would want solid infill for future engravings and such, I found a way to use Fusion 360 to turn the whole image into a 1 layer thick 3D object so that I can slice it and export the gcode just like if I were 3D printing.
This Instructable will cover the following (represented in images above)
- How to use Inkscape to convert any image type into an SVG (Scalable Vector Graphic) image type
- How to import that SVG image into Fusion 360 as a sketch and use a plug-in to repair any open loops that may result from complex geometry
- How to extrude and export that object as an STL ready for slicing
- Slic3r settings to consider changing to get good plots
Step 1: Converting an Image to SVG File Type With Inkscape
First, download Inkscape from their website. You will also need XQuartz if running on Mac, there are instructions on Inkscape's website and many other websites on the internet on how to perform installation successfully for your given operating system. FYI, I had to restart my Mac before Inkscape would launch successfully.
Go to File>Open... and choose the file image you wish to plot, such as this tree clip art I got from the internet, which I will be using for this Instructable. Open the image and import with the default settings. In this case my image is B&W, or technically grayscale, but also note that the image may be color. It will be converted later.
Change the pallet units to mm (or inches if you prefer) and select the lock icon to lock the aspect ratio. Then scale the image to an appropriate size for your print bed.
With the image selected, go to Path>Trace Bitmap...
In the Trace Bitmap window, select Live Preview. Then modify the Brightness cutoff threshold value to get the desired appearance of your image. Click Apply to insert this vector image into your document. The vector image and the bitmap image will now be overlaid on each other.
Close the Trace Bitmap dialogue and delete the original bitmap image (you will need to drag one image out of the way first, since they will be exactly on top of one another).
Select the vector image and choose File>Save As... and save the image as a .svg file type (this is the default for Inkscape). Note you may need to delete the original file extension that was first imported with this file name.
Step 2: Converting 2D SVG Image to 3D STL Object Using Fusion 360
Download Autodesk's Fusion 360 if you don't already have it. It is free to students, hobbyists, and more and is available on their website as well as on the Mac App store.
Open a new Fusion document and click Sketch to start a new sketch. Then choose the XY plane from the origin representation to start your sketch on.
Choose Insert>Insert SVG from the ribbon menu and select the SVG we recently saved from Inkscape.
Select OK from the Insert SVG dialogue and then choose Stop Sketch from the Sketch dialogue to finish inserting your SVG image to the sketch.
From the ribbon menu, choose Create>Extrude and select the ***closed profile(s)*** you wish to plot. Enter an extrusion height, I used 0.2mm since that is my default printing layer height. You can choose any height you like, but you may need to make modifications in your slicing software later to get it to plot properly.
Right click the top level component in your Fusion design and choose Save As STL. Click OK on the follow up dialogue and choose your save location.
***A Note on Closed Profiles***
Occasionally when importing an SVG (especially with complex geometry such as this one) a loop that is supposed to be closed may not actually close itself. This will become apparent when you try to extrude your sketch and it either extrudes areas it shouldn't or won't extrude anything at all (if the profile is fully open to the outside). The opening in your sketch may also be very hard to find, often less than a micrometer of a gap.
For this, I recommend downloading the Fusion 360 Add-On Sketch Checker. You will need to restart Fusion 360 to use it. After restarting, choose Inspect>Check Sketch and it will analyze your sketch and show you where any loop openings are. Zoom in to the opening and simply draw a line to close the loop.
Step 3: Preparing Your STL for Plotting With Slic3r
If you don't have Slic3r, download it from their website and open the program. Add the STL file you created in Fusion 360.
For this I will assume you are familiar with Slic3r's settings. I will upload images of settings pages and call out areas that need special attention for you making your pen plotter profile. Your settings do not need to exactly match mine, many of the settings will have no effect on the plot since they are for 3D printing generally.
I have uploaded my Slic3r config file which you can load into Slic3r by choosing File>Load Config... however I recommend starting with your printer profile and modifying select values as needed, since our printers are likely very different.
Settings not pictured
I used the same speeds for pen plotting as I do for 3D printing. YMMV as this is printer dependent. I turned off any skirt and brim operations since they are not needed for a pen. All fan cooling was set to off.
If you have any questions, I do respond to comments so don't hesitate to ask.
Step 4: Final Results and Closing Thoughts
The final results look pretty good! It would be pretty easy to set up Slic3r to only to an outline if that's what I wanted.
I've added my SVG, STL and STEP (easier to modify in 3D modeling software) files of the tree to my Thingiverse here. I plan to add this spring loaded pen holder to my Thingiverse soon as well.
I've also added the design for my spring loaded pen mount on Thingiverse. It is designed to mount to my 3D printer gantry plate, however I uploaded STEP files so the mounting can be easily modified to suit your needs.
Some thoughts for the future
I can't wait to get a laser on this for cutting/engraving. With a PWM laser, it would be possible to have different intensities for engraving. The method here does not take any PWM values into account, so I will have to figure out how to do that when the time comes. Using that same technique I may be able to adjust the pressure of the pen (since it is spring loaded) to make some interesting design effects when plotting.
This same 2D to 3D technique could also be used for 3D modeling complex geometries (such as logos) without having to manually trace all of the lines in a modeling program. This would make it much easier to 3D print things like I did with my Detroit Tigers Magnet Logo and my Michigan Wolverines Magnet Logo (which took a while to trace before extruding).
We have a be nice policy.
Please be positive and constructive.