Archive for May 23rd, 2011

OpenSCAD Intermediates: Extruding 2D Objects

OpenSCAD tut by BoriSpider

OpenSCAD tut by BoriSpider

In this OpenSCAD tutorial series so far we’ve covered the basics of the OpenSCAD interface, how to make 2D forms, how to make some basic 3D forms, how to position those forms in 3D space, the different ways to combine forms, how to create mashups of one or more existing STL’s and OpenSCAD forms, and how to use modules to reuse your code to make your life easier.  Although I described the last three tutorials as “intermediate” levels, that’s really only because you learned the basics so quickly from the first few tutorials.  With just the basics you can literally design anything you can imagine.  The “intermediate” lessons will let you do a little more and make your life a lot easier.

Before we get started, the image is from BoriSpider‘s OpenSCAD tutorial homework.  I’d like to include a picture of your homework next time.  So, please practice making something in OpenSCAD, upload it to Thingiverse with an open license, and tag it with “openscadtutorial.”

  • You may remember one of the first tutorials was about creating flat 2D forms using some simple commands.  Once you learned how to make 3D objects, it probably didn’t seem very interesting to play with the square, circle, and polygon commands.  However, there are still a lot of uses for these flat objects.   OpenSCAD gives us the ability to do some very interesting things with flat objects by giving them a third dimensional quality – thickness.
  • Linear_Extrude
    • The “linear_extrude” command will let us basically take a flat object and give it thickness.  First, let’s take a basic object like a rectangle.
      1. square([20,30]);
    • Now, let’s use the “linear_extrude” command to give this rectangle a thickness of 13mm.
      1. linear_extrude(height = 13) square([20,30]);
    • You can even use this on a pile of flat objects or a module of flat objects.
      1. module flatstuff()
      2. {
      3. square(20);
      4. translate([10,20,0]) circle(10);
      5. translate([20,10,0]) circle(10);
      6. }
      7. linear_extrude(height = 13) flatstuff();
  • DXF_Linear_Extrude
    • If you’ve mastered “linear_extrude”1 you’re ready for a pretty easy and useful way to extrude DXF files.  A DXF file is a digital file commonly used on Thingiverse and elsewhere for laser cutting.  A DXF is basically a flat 2D drawing where the path of the 2D lines would b ecut by a laser or some other cutting method.
    • Let’s imagine you have a 3D printer – but no laser cutter.  Perhaps you’ve just found something amazing on Thingiverse for laser cutting, but you just can’t live without it.  Or, perhaps you want to print a replacement laser cut part for your 3D printer.  You can use the OpenSCAD “dxf_linear_extrude” command to work in much the same way as the above “linear_extrude” command.
    • Assuming your DXF file is in the same folder as your OpenSCAD installation, the following should work for you too:2
      1. dxf_linear_extrude(file=”pandorica13.dxf”, height=2);
    • Now instead of just a 2D outline of the image in the DXF file, you should have a 2mm thick object in the shape of your DXF!
    • Just so you know, OpenSCAD can be little finicky about the DXF files it imports.  It will need to be in “DXF R12″ format, otherwise it might use certain DXF features that aren’t supported by OpenSCAD.
  • Rotate_Extrude
    • Since “rotate_extrude()” does something similar and has similar syntax, this would be a good time to cover it as well.  This command basically takes a flat object and spins in 360 degrees around the Z axis.  Let’s take a circle and see what happens when we spin it.
      1. rotate_extrude()
      2. circle(r = 10);
    • As you might expect, it turns a circle into a sphere.
    • Let’s see what happens when we offset that circle a little bit.
      1. rotate_extrude()
      2. translate([20,0,0])
      3. circle(r = 10);
    • You should now see a great big donut.  Since the circle is offset from the center of the Z axis, when it gets spun around the axis, it will leave a hole in the middle.

Homework assignment

Now that you’ve learned how to use three different kinds of extrusion in OpenSCAD, how about showing everyone what you can do?  See if you can find a DXF file on Thingiverse and extrude it into a part you could actually print.  When you’re done, upload your OpenSCAD file and the STL to Thingiverse.  As always, to make me extra proud be sure and tag it with “openscadtutorial.”  As if basking in my affection wasn’t enough, I’ll pick one someone’s OpenSCAD homework and use their designs as part of the next tutorial.

Bonus Section 1:  The Tutorials So Far

[simple_series title="OpenSCAD Tutorial Series"]

 

Bonus Section 2:  Other sources

If you like reading ahead or want more information about OpenSCAD, I’ve found these websites to be very helpful.

  1. Official OpenSCAD website
  2. OpenSCAD User’s Manual
  3. OpenSCAD beginner’s tutorial
  4. OpenSCAD tutorial roundup on the Thingiverse blog
  5. Inkscape to OpenSCAD DXF tutorial

Bonus Section 3:  What’s next???

The topic of the next tutorial is up to you.  What would you like to learn next?  Is there something you’d like to learn how to make?  Is there something more you’d like to learn about some of the topics we’ve covered?

  1. I knew it wouldn’t take you long! []
  2. Say, for instance, you’re a fan of Doctor Who. []
Tagged with , , , , , , , , , Leave a comment
 

Chainmail by Zomboe

Chainmail by Zomboe

Wait…did this really just happen? Did I just see my colleague Charles Pax printing out chainmail on the other side of the BotCave? This day has arrived, my friends.

As Isaac pointed out a few minutes ago, while the Steampunk contingent regularly contributes to Thingiverse, MakerBots have not yet been fully exploited by the larger reenactment and Cosplay communities to the furthest extents possible. With some digital calipers and jar of paint, oh the blunderbusses and sword hilts that could be within your grasp!

Printed Parametric Chainmail I've been wanting to try this for a while. This is a sheet of interlocking rings, printed in place. The rings are basically square, with cut off corners. Two sets of diagonals cross each other at different heights, with four posts at the corners. Well, it makes sense when you see the pictures! This is the first thing I've designed in OpenSCAD, so the code is probably pretty sloppy. The major parameters that can be changed are the layer thickness and line width, along with ring size and number. I searched for "chainmail" on Thingiverse and the only result was a post by Vik on the Interlocking Rings thing: "Next, chainmail. Right?" So I hope you like this, Vik!
This thing brought to you by Thingiverse.com
Tagged with , , , , , , , One comment
 

Modding a MakerBot for PCB Milling

PCB Milling Using A MakerBot Cupcake

MakerBot Operator Keith wanted to use his MakerBot CupCake to perform PCB milling. His MakerBot kit doesn’t come with a dremel mount — but when you are a MakerBot Operator, this is no obstacle. (Take a look at all of the incredible “dremel” related mods and toolholders up on Thingiverse.com here!)

One of the great benefits to buying a user-assembled, user-modifiable product from an Open Hardware company is that where other companies might seal up their cases with tamper-resistant torx screws, with a MakerBot you are welcome to roll up your sleeves and get hacking.

Keith has spent several weekends exploring how to mill PCBs with his CupCake (from first attempt, to first mod, to build surface tweak), figuring out what modifications he needed at each stage and then printing and/or building the solution. His project is gets closer and closer with each round of experimentation.

Many of our CupCake MakerBot Operators have now purchased our leveled-up, second generation printer, the MakerBot Thing-O-Matic, for their primary 3D printer. But rather than neglecting their hardy CupCakes they are willing to experiment with them, shift them into a number of new roles – from pen-plotting stations to ceramic printers to milling tools. The MakerBot Operators are an enterprising bunch who tend to share what they create and heap praise on the incredible innovation from their peers. Keep your eyes on the Thingiverse “Newest” category for an endless procession of interesting projects like Keith’s for ideas for what else you might do with your MakerBot. Beyond having a 3D printer on your desk to create anything you can dream of, that is.

 

Tagged with , , , , , , , 2 comments