posts tagged with the keyword ‘openscad’

2012.12.31

GoPro Hero3 Frame

I like the acrylic housing that comes with the GoPro Hero3, but I tend to run some pretty long time lapses, and the battery doesn’t last long enough, so I made a lightweight frame, and it’s over on Thingiverse.

GoPro Hero3 Frame

I’m (slowly) getting better at OpenSCAD, thanks to projects like this. I’m sure I’ll get even better in 2013.

GoPro Hero3 Frame

I’ve got plenty of long USB cables and USB power supplies, as well as a Minty Boost from Adafruit to provide power for shooting hours and days at a time.

Here’s a quick time-lapse test I shot before I had the frame. I ended up balancing the GoPro on a book on top of two water bottles, which was silly, and just one more reason for this thing.

GoPro Hero3 Frame

The frame has a bit of flex to it so you can easily wrap it around the camera. I may play around with some thicker housings, but for now, it does the job.

I ended up printing about 6 versions before I got one that was good. I should probably do more paper prototyping, but with how easy it is to 3D print things, sometimes you just hit “print” and hope for the best. If it doesn’t work out, you tweak things and try again. It’s just the way it works.

(Note: I guess GoPro also sells a frame for the Hero3. Go buy it from them if you want a really nice one and have $40.00 to spend. If you just want this cheap plastic one, print it yourself.)

2012.11.27

Tennis Man

Here’s a thing I’m calling (for lack of a better name) “Snowflakey”. The idea came from the Kimotion Arts store on Shapeways.

Kimotion Arts

Kimotion Arts has these neat 3D printed ornaments with an object arranged in a circle to make a snowflake-like thing. I dig it, so I decided to dig into it.

Bad Man

The first thing I did was fire up Inkscape and draw a really simple figure. It’s terrible, really, but I did it in less time than it took Inkscape to launch of Mac OS X. I created an SVG file, and then exported it as a DXF file, making sure I converted all the line segments into straight lines first. (Of course there were no curves in this drawing, but if there were, I’d convert them!)

Bad Man Flake

Once I had my DXF file, it was easy to pull that into OpenSCAD, and place six of them in a circle with the following code.


objheight = 4;
objcenterspacing = 20;
objrotate = -70;

for (i = [0:5]) {
  rotate(i*360/6, [0,0,1])
    translate([0, objcenterspacing, 0])
      rotate([0, 0, objrotate])
        linear_extrude(height = objheight, center = true)
          import( "figure.dxf" );
}

The code is not the greatest… in fact there is probably much room for improvement, but it’s the first thing I got working, so I ran with it. My idea for the 3 variables at the top were so you could easily tweak them for different art. Sadly, as you change objcenterspacing and objrotate, they affect each other, so it’s a lot of back and forth between those two values. I also could not find a way to assign a filename to a variable, so your DXF will need to be named “figure.dxf” or you’ll need to edit the import line.

Tennis Man

Since my drawing was so terrible I wanted to try something else, so what better than Land recreation symbols 27, better known as “Tennis Man” by most people.

Tennis Man Flake

A few quick edits and I had this nice Tennis Man Snowflake for that special ball smasher on your list… (Notice the canvas size of 25mm wide by 35mm high. You can do what you want, but the OpenSCAD code will be expecting something close to that. Otherwise you’ll just have to tweak the numbers even more.)

Blobby Man Flake

I decided to try once again to draw something. This one too a little longer than a minute, but turned out just as terrible as the first one I did. Still, maybe you like “Blobby Man” as a snowflake.

Ant Flake

How about ants? This one is interesting. Maybe spiders would have been a better choice. (And yes, I know I could probably do the entire “6 items rotated” think right in Inkscape, but that wasn’t the goal here.)

Horse Flake

What about the old nag? No, I’m not taking about your mother-in-law (kidding!) but this fine old horse from OpenClipArt.org, where I get many of the SVG files I use. Export this as an STL file and you’re ready to print it on your RepRap!

If you’ve got an improvement to this OpenSCAD code, by all means, let me know. I’m still very much in the learning phase with OpenSCAD, so I do these things to learn, and because of that I’m open to any suggestions.

2012.11.01

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

2012.10.16

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.

2011.12.09

Convert all the files!
Thanks Tom!

It seemed like a simple enough request… While at Milwaukee Makerspace we were discussing creating snowflakes on the Laser Cutter, and I mentioned that there should be some existing art on OpenClipArt.org, but it was down that night, so I jumped over to Thingiverse and found this snowflake.

As a bit of background, I’ve been pretty damn good at file conversions in the past. Audio, video, markup, raster images, anything 2D has been pretty simple. I mean, I’ve been using Photoshop since version 1.0.7. I know how to deal with that stuff… but 3D? It’s a whole new nightmare world!

Snowflake

The file was an STL, which is meant for 3D printing, but we needed more of a 2D vector file. I know how to load a DXF file into the Laser Cutter, so I figured I’m import this STL into Google Sketchup (via a plugin) and then export as a DXF (via another plugin) and that would be it.

Well, that didn’t work. (Oh, and by “didn’t work” I mean I was unable to open the DXF file in Inkscape. At this point I was still waiting to use the Laser Cutter so I didn’t get to try importing it on that machine. I figured that as long as I was waiting, I’d try to get a format I knew would work.) On to the next idea.

I exported the STL from Google Sketchup as a DAE file, and was able to open that in MeshLab. Once again I tried a DXF export, but that one wouldn’t open in Inkscape either. Argh!

Snowflake

So I made a radical decision… Since I could view the file in MeshLab, I just did a screen shot so I could get a nice, clean 2D version of it.

Snowflake

Of course if I had known I was going to do this, I probably could have just done it in Google Sketchup by altering the view… Still, the MeshLab method seemed solid.

Snowflake

I then took the screen shot and opened it in Photoshop, did a little editing, and converted it to black and white. (I considered creating paths, and exporting them, but at this point I wanted to go with what I knew (or thought) would work, and that meant getting a clean PNG file into Inkscape to convert it from a raster to a vector file via trace bitmap.

Snowflake

So finally, I had my SVG file! A vector file I could open in Inkscape and export as a clean DXF file that I was reasonable sure would open and work on the Laser Cutter…

Snowflake

Oh wait, at some point along the way I had created an OpenSCAD file, to test the other DXF files. They wouldn’t render due to some weirdness, but the new one I exported from Inkscape did. This made me feel a little more secure that this file would work.

So how did it turn out? I don’t know!

The Laser Cutter was in use making ornaments, and I couldn’t stay late enough to get a chance to use it.

And just to be clear… while there were many steps in the process above, the whole thing took about 20 minutes from the first file export to getting what seemed to be a good DXF file.

I’ve converted a lot of files in my time, but doing so for these CNC machine is proving to be a new challenge.

Of course half the fun is seeing if it will work, you know, on the machine… which I hope to test at some point. :)

« Older Entries |

buy the button:

But The Button

recently at:


top recent artists: