Categories
Uncategorized

Inkscape to OpenSCAD

Gear!

Oh yeah! You can totally draw gears in Inkscape… In fact “draw” isn’t even the right term, as you can “render” them using one of Inkscape’s extensions. Here’s a nice post about laser cutting some gears that explains it quite well.

Gear Rendered!

Normally for 3D printing I’d export something like this as a DXF file and extrude it into a 2.5 dimensional object, like I outlined here, but there is another way… by using the Inkscape to OpenSCAD converter! (Here’s a nice blog post about it as well.)

Gear in OpenSCAD

It may not generate code that’s easy to edit, but it’s fast, and seems to do the job, which is often exactly what you want. I’m also quite pleased that Inkscape is becoming such a valuable tool not just for 2D work, but for 3D work as well. I might consider teaching an Inkscape class at Milwaukee Makerspace once we get our classroom up and running.

3D Printed Plastic Gear

Categories
Uncategorized

Mold Making

I’ve been digging into OpenSCAD lately and managed to come across this Flickr photo with the most minimal of explanation of how to do a reverse object in OpenSCAD, but it was all I needed…

Space Invader SVG

I started with the SVG file of the classic Space Invader character, sized to the width and height I wanted, and then exported it from Inkscape as a DXF file.

Space Invader STL

Once we’ve got the DXF we can pull that into OpenSCAD and extrude it into a 2.5 dimensional object. (It might be 3 dimensional, but I’m not going to argue 2.5D versus 3D right now.)


linear_extrude(height = 10, center = false) import("spaceinvader.dxf");

After we compile the code we can then export our object as an STL file. We can then pull that STL file into OpenSCAD again for the next step…

Space Invader STL (reversed)


difference() {
	translate([40,42,2.5]){
		cube([90,70,14.5], center=true);
	}
	# import("spaceinvader.stl", center=true);
}

You’ll need to tweak those numbers of course, and as for the # at the start of the import line, that’s to show us the object even when we can’t see it, as it were… sort of. It’s an OpenSCAD trick I learned from Mark Finn at BarCampMilwaukee.

So now that we’ve got the object dropped into a block (at the proper height) we can then export it as an STL file, which could be cut on a CNC machine, or 3D printed.

Space Invader G-code

I’ve not yet attempted to 3D print this, and I’ve had not much luck in printing things that are water-tight. I might try getting some silicone to coat the piece which would make it water-tight, and food-safe.

Categories
Uncategorized

Laser. Cut. Files. (Part III)

NOTE: See the latest post on this subject: Laser. Cut. Files. (Part IV)

SVG file in Inkscape
SVG file in Inkscape

After my last post on the subject, Laser. Cut. Files. (Part II), I figured that I had something that worked… but then something came along that worked better!

Thanks to a comment from old pal Thomas Edwards on the Part II post:

Have you tried Inkscape Save as EPS, then Preview EPS to save PDF? (Inkscape Save as PDF might work as well, but I find Corel Draw gets messed up by fonts unless I start as EPS and then go to PDF)

I decided to give PDF files from Inkscape a try. They didn’t work. CorelDraw gets some crazy error trying to open PDF files I create in Inkscape on Mac OS X… but what did work was a two-step process!

Again, my goal is to do all of my design work on Mac OS X, typically using Inkscape, and then moving my files to the Laser Cutter PC running CorelDraw on Windows (yuk!)

PDF file in Preview
PDF file in Preview

So for now, my process is the following:

  1. Create vector art in Inkscape
  2. Save (original) file as an SVG
  3. Save (a copy of the file) as a PDF from Inkscape
  4. Open the PDF from Inkscape in Preview and Save as a PDF
  5. Copy the new PDF file to Laser Cutter PC
  6. Open a new document in CorelDraw and import PDF file

Save as a PDF (again!)
Save as a PDF (again!)

Windows and Linux users, your mileage may vary, and obviously you don’t have Preview.app, but on Mac OS X this process works for me. And as for the note in the comment from Thomas about fonts, I’d be sure to convert any fonts into outlines after I save my SVG file, but before I save my PDF file. (It’s an old print design trick.)

Categories
Uncategorized

Laser. Cut. Wood. (Part II)

Laser Cut Box

In our last adventure cutting wood we had success! And it was good… So I decided to try the awesome BoxMaker again and I’m pleased with the result as compared to the previous attempt.

Above you’ll see the template I created from BoxMaker with a light bulb on one of the faces. I got the original bulb from OpenClipArt and tweaked the SVG file in Inkscape until I was pleased with it. (I may still need to adjust a few of the thinner areas, but I definitely like it.)

Bulb Box

In the next image you can see the results of the cut. This is using 3mm Baltic Birch plywood, which I highly recommend for the 25 Watt Laser Cutter that Milwaukee Makerspace has.

There’s actually one extra piece in the lower center which you’ll notice has straight lines, and is not part of the box, but this is the interesting part…

One thing about using the laser cutter is determining what settings to use. For this cut I used 100% power with 3.2% speed. It takes a few passes to complete the cut (maybe 4 or 5) but it works. I found that at slower speeds there is a higher risk of flames (which are bad!) and you can char the wood a bit too much. I actually didn’t care about the charring as I will be painting this box, but if you want less charring, up the speed a little bit, and know that you will need more passes.

Burninator

Oh yeah, the interesting part! In the image above, I’ve highlighted two areas. In the bottom red rectangle you’ll see a lot more charring. This is due to the long straight line that the laser cutter follows when cutting. I noticed that the notched areas, with lots of small short lines, had much less flame, while the long continuous lines had a lot more flame. (It was still within an acceptable amount of flame, but this is why I didn’t want to go lower than 3.2% for the speed.)

So I’m definitely calling this one a success, if only due to the fact that I’m pretty certain I’ve got good settings to use when cutting 3mm Baltic Birch plywood.

Also, lasers are awesome!

Categories
Uncategorized

Laser. Cut. Files. (Part II)

NOTE: See the latest post on this subject: Laser. Cut. Files. (Part III)

In our last adventure, Laser. Cut. Files. I thought I had it down… sadly, I was wrong, and I’ve actually updated that post, and here’s a Part II to share more of what I’ve learned.

Inkscape DXF

This time I once again started with Inkscape, which creates SVG files. From there I export to a DXF file. This is, I guess, not ideal, but it sort of (mostly) works, so I’m still trying to perfect it. Mostly.

The issue I mentioned last time involved exporting a DXF file from Inkscape and then not being able to re-open or import that DXF back into Inkscape. I’d get some weird error, which I thought might be due to too much extension madness in Inkscape. Anyway, I ended up re-installing Inkscape and now I can open DXF files, but they just show up blank, so that’s not much better.

I did however finally find an application for OS X that allows me to easily open and view DXF files: SolidWorks eDrawings. This should help me see what crazy stuff happens to my DXF files between Inkscape on the Mac, and CorelDraw (yuk) on the Laser Cutter.

Here’s my most recent file loaded into SolidWorks eDrawings.

DXF File

Hey, look at that! I can view a DXF file on my Mac! And it was much easier than last time, where I screwed around with OpenSCAD to do it.

DXF File

But wait… as we zoom in, we can see that when the original Inkscape SVG file was exported as a DXF, it did that crazy thing again where it changes curves into lines! (Argh! I know that there are times when you want this for CNC things, but this isn’t one of them… and if I wanted them, I could do it myself. In fact… maybe I’ll just start doing it myself if I have to.)

For this control panel, it didn’t really matter, since the front of the button will be covering up the hole, but I’m still not happy with the results… And just so we’re clear, the results I want involve me doing the digital design in tools I can run on my Mac (that I like using) and then getting those files onto the laser cutter PC with minimal screwing around, and just doing my lazzoring.

A simple, clean, friction-free, non-annoying process that doesn’t involved having to mess around redrawing things in CorelDraw (yuk) because really, it seems like it shouldn’t be this hard.

Oh, and as for the Laser Cutter PC, Inkscape got installed, but I couldn’t get it to work with the Laser Cutter. Illustrator 8 was also installed, which can’t read SVG files, and couldn’t open my DXF files either. So sadly, for now, it’s that damn CorelDraw…. yuk.