Posts Tagged ‘openscad tutorial’

OpenSCAD Design Tips

Posted by on Thursday, November 8, 2012 in Uncategorized
Voltron, victorious

Voltron, victorious

As you may know, I’ve mentioned wanting to print a Voltron several times before.  I even tried to design one once.  Even after uploading a shoddy version, I kept on jabbering on about it.

Finally I’ve designed a printable Voltron of which I can be proud. It’s designed totally in OpenSCAD using just about every single OpenSCAD trick I know.  Additionally, I designed a hinge connector system that, I think, compliments Tony Buser’s Pin Connectors v2 system nicely. In fact, some of the connector pieces for this model are basically a Buser pin connector on one side and a hinge/joint connector on the other. The result is a snap-fit highly articulated/poseable model.

I wanted to share some of these design tricks with you over the next few posts.  Here’s a quick preview:

  • How to sketch an object with OpenSCAD
  • How to easily make regular solids – other than cubes and cylinders, like hexagons, pentagons, octagons, etc
  • How to easily make symmetrical solids
  • How to easily make irregular, but symmetrical solids

Stay tuned for these ideas!

Tagged with , , , , , , , , One comment

MakerBot Teacher Highlight: Jean Adams’ Honors Geometry class at Castilleja School

Posted by on Tuesday, May 8, 2012 in Uncategorized
Jean Adams' Honors Geometry class at Castilleja School in Palo Alto

Jean Adams' Honors Geometry class at Castilleja School in Palo Alto

A few months ago Jean Adams, a teacher from Castilleja School in Palo Alto, wrote to me about the OpenSCAD tutorials on our blog so she could use them in her classroom. 1  Obviously, this got me interested, so I asked her to share more about her class:

I teach Honors Geometry at Castilleja, an independent girls’ school for grades 6-12 in the heart of Silicon Valley.  This year our school opened an “Idea Lab” in connection with Stanford’s Fab Lab and trained a group of teachers on several digital fabrication machines.  Among those machines was a cute, wooden MakerBot Thing-o-Matic.  I was immediately drawn to the homebrew feel of the community around MakerBot and frankly the machine reminded me of the Apple I.  A parent volunteer, Diego Fonstad, showed me the openSCAD program and I saw how wonderfully this software could help teach several concepts in my Geometry class.  I began to play with OpenSCAD by following MakerBlock’s tutorials on the MakerBot blog.  Eventually I adapted his tutorials for my classroom and my student’s learned OpenSCAD during two 50-minute class sessions.  They were then given time  outside of class to work on a final project which was printed on our school’s Thing-o-Matic.

The list of concepts that this project helped teach or reinforce is actually quite extensive.  During the year long course my students learn about union and intersection of geometrical objects, vectors, rigid transformations such as translation, rotation, dilation (scale in OpenSCAD), and the z-axis.  All of these ideas came together in the design of their OpenSCAD object.  Futhermore I teach a small amount of programming in the python language and their skills in that language transferred over directly into OpenSCAD.

Beyond any specific content learned through this project, I intended my students to practice using spatial reasoning.  A 2010 research report by AAUW entiled “Why So Few? Women in Science, Technology, Engineering, and Mathematics” presents research that shows women can dramatically improve spatial reasoning skills in a short amount of time in order to close the gap with men.  “If girls grow up in an environment with opportunities  to develop their spatial skills, they are more likely to consider a future in a science or engineering field.”  I found that students struggled with thinking and rotating in 3 dimensions, but by the end of the project had developed a robust ability to rotate their OpenSCAD objects in their mind.

A nice (and accidental) side effect was the chance for students to express themselves creatively in math class.  Diego Fonstad wrote, “The detail and breadth of their output exceeded what was required of them to complete the project. This underscores their latent creativity and desire to build and also demonstrates how this exercise tapped their intrinsic motivation and truly engaged the students.”

Jean’s class have shared their designs on Thingiverse, including the cutest and pinkest R2D2 I’ve ever seen.

Error - could not find Thing 22332.
Error - could not find Thing 22331.
Error - could not find Thing 22330.
Error - could not find Thing 22329.
Error - could not find Thing 22328.
Error - could not find Thing 22323.
Error - could not find Thing 22317.
  1. Seriously – what kind of class is teaching OpenSCAD?!  Are there any open seats left?! []
Tagged with , , , , , , , , , , , , , One comment

OpenSCAD Intermediates: How to Make Organic Shapes

Posted by on Monday, April 30, 2012 in Uncategorized

In this OpenSCAD tutorial series 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, how to use modules to reuse your code to make your life easier, how to extrude flat 2D forms into 3D forms, and how to fix design problems.  Although I described a few of the last tutorials as “intermediate” levels, that’s really only because you learned the basics so quickly from the first few tutorials.

Today I’d like to show you how easy it is to make some neat organic looking forms with OpenSCAD.  The secret behind doing so are two functions, “hull” and “minkowski.”  Let’s learn a little bit about what each of these functions do and try out some code.  More, after the break!

Read the rest of this entry »

Tagged with , , , , , , , , , , , , , 3 comments

OpenSCAD: What would you like to learn next?

Posted by on Monday, January 30, 2012 in Uncategorized
Parametric Boltless Hook for keyhole shelving units by Timmytool

Parametric Boltless Hook for keyhole shelving units by Timmytool

As I’m gearing up for Thing-A-Day this year, I thought others might be interested in more OpenSCAD tutorials1  Is there something you would like me to cover in another tutorial?  What would you like to learn?

While I’ve more or less written these tutorials right up to my level of competency, there are a few additional things that we could cover – some of the additional variables for previously covered functions, hull, Minkowski, and for loops.

OpenSCAD Tutorial Series

  1. OpenSCAD Basics: The Setup
  2. OpenSCAD Basics: 2D Forms
  3. OpenSCAD Basics: 3D Forms
  4. OpenSCAD Basics: Manipulating Forms
  5. OpenSCAD Intermediates: Combining Forms
  6. OpenSCAD Intermediates: Mashups
  7. OpenSCAD Intermediates: Modularity
  8. OpenSCAD Intermediates: Extruding 2D Objects
  9. OpenSCAD Intermediates: Fixing Design Problems
Error - could not find Thing 15515.
  1. As always, if you go through these tutorials and publish something on Thingiverse, I’d love to feature your designs in my OpenSCAD tutorial posts! []
Tagged with , , , , , Leave a comment

Parametric TARDIS

Posted by on Tuesday, November 1, 2011 in Uncategorized
Parametric Tardis by Gossamer

Parametric Tardis by Gossamer

If there’s something that’s even better than a regular TARDIS, it’s a parametric OpenSCAD TARDIS1  In the true spirit of Thingiverse, the designer Gossamer, shared their designs and source code.  Doing so allowed other users to join in, offer suggestions, and Gossamer immediately updated the TARDIS code to incorporate these improvements.

Here are two OpenSCAD pro-tips:

  • Best Programming Practices.  OpenSCAD for Windows tends to freak out when you don’t add a leading “0” to a decimal.  By adding writing “0.5” rather than “.5” you can ensure compatibility across platforms.  Thanks Bluemetal!
  • Too Many Elements.  Sometimes OpenSCAD will complain that there are too many elements.  You’ll see this happen a lot more when you’ve got some “for loops” or lots of nested functions. By adding “render()” before a group of code, you force OpenSCAD to render and cache that group of code.  Each successive render will be a lot quicker. Thanks Tbuser!

What other OpenSCAD tips do you have to share?

Error - could not find Thing 13109.
  1. And, goodness knows, I feel compelled to blog anything Doctor Who related. []
Tagged with , , , , , , , Leave a comment

Designing for Parametrics in OpenSCAD

Posted by on Tuesday, October 25, 2011 in Uncategorized
Part Catch Basket for Thing-O-Matic by dustinandrews

Part Catch Basket for Thing-O-Matic by dustinandrews

Designing 3D objects in OpenSCAD can be very quick and simple. 1  You can create some really amazing designs by just combining cubes and cylinders in a variety of ways.  However, making a design “parametric” isn’t always intuitive.  As an FYI, a parametric design in OpenSCAD is a design that accepts parameters.

There are a lot of OpenSCAD designs on Thingiverse where the author admits their design isn’t very “parametric.”  With a little effort and a few tips, it is possible to incorporate the power of OpenSCAD parameters into your own designs.  Since I learned some of these lessons when designing an OpenSCAD pirate ship, I’ll refer back to it for examples.

  1. Parameters first.  It is so much easier to make your designs parametric from the start.  Going back and making a design parametric can be as easy as find-and-replacing, but typically it is much more work than that.  If there’s any chance you might want to have a parametric version of your designs later – just design that way from the beginning.
  2. Prioritize.  Decide on the most important parameters first.  Most designs only have a few parameters that are really important.  For example, the two most critical features of the pirate ship were the ship’s scale, as in size, and the thickness of parts.  Once these two were known, most of the other features of the design needed to be modified to fit them.
  3. Dependents.  Try to make as many of the features of your designs dependent upon the initial parameters as possible.  The easiest way to do this is to design as much as possible in terms of the original parameters.  I like to do this by setting dependent objects as fractions of the original parameters.  In the example of the pirate ship, I made the largest sail on each of the masts equal to 1/2 the size of the masts themselves.  The other sails were even smaller fractions.  By making these features defined in relation to one another by fractions, they will always end up in the same appropriate locations with respect to one another.  Thus, the three sails on each mast should always line up together.  Throughout the design, I tended to design things in terms of 1/2, 1/4, 1/8, 1/16, 1/32, and 1/64.  These fractions are easier for me to manage than decimals.
  4. Mix it up.  While you’re designing, change some of the major parameters.  If your model suddenly goes haywire, you know you made a mistake somewhere – either by including a feature that doesn’t rely on your parameters or by a feature that is changed by your parameters in unexpected ways.
  5. Modularize.  Start by designing just one aspect of your idea at a time as a module.  Doing so will let you define whole regions of your designs in relation to one another.  For example, one of the modules I wrote for the pirate ship was for a single sail.  I wrote another module that would put together three sales of decreasing sizes and another module that added the large triangular sail and mast itself.  Yet another module collected all three sails.  Once the three sails could be created by a single module, I could move all of the sails around as a single piece.
  6. Cheat.  One of the parameters for the cylinder function is “$fn”.  This basically dictates how many facets the circumference of your cylinder will have.  A cylinder with 8 facets will look like an octagon and a cylinder with 128 facets would probably look almost perfectly circular.  I cheated by making triangles by creating cylinders with “$fn=3” or just three facets.  There are a lot of shape libraries for OpenSCAD, but this was a quick and simple way to get an equilateral triangle.  Each of the sails is actually a cylinder, turned on its side, with just three facets along the circumference.

What other suggestions do you have for someone who wants to make their designs parametric?

  1. Thanks to dustinandrews for tagging their Part Catch Basket for Thing-O-Matic as with “openscadtutorial” on Thingiverse! []
Tagged with , , , , , 2 comments

Script for Rounded Corners for OpenSCAD by WarrantyVoider

Round corners for Openscad - Library by WarrantyVoider

Round corners for Openscad - Library by WarrantyVoider

Long ago, before “Web 2.0” and the Dot Com crash, the world wide web was kinda ugly.  Most pages were built in HTML using tables, which necessarily meant everything was blocky and boxy looking. 1  Sure, they were functional, but they weren’t exactly pretty.  After a time new scripts in javascript and cascading stylesheet techniques came into use that allowed web developers to round the corners off square boxes.  Eventually these complicated scripts and piles of nested CSS gave way to more simple and elegant ways to create rounded corners.

That’s what it feels like today, with the release of the OpenSCAD library for rounded corners by WarrantyVoider.  WarrantyVoider has made making a box with rounded corners almost as easy as making a regular box.  Remember this little tidbit from a certain blogger:

  1. cube([4,8,16]);

Well, making a rounded cube using this library is as easy as:

  1. include <roundCornersCube.scad>
  2. roundCornersCube(4,8,16,1);

I think WarrantyVoider has actually gone a long way to helping people make better looking objects that use less plastic.  What’s not to like?!

  1. Kinda like a Volvo. []
Tagged with , , , , , , 2 comments

OpenSCAD Intermediates: Extruding 2D Objects

Posted by on Monday, May 23, 2011 in Uncategorized

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


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 , , , , , , , , , , , 2 comments

MakeALot OpenSCAD Models


Spiral Pencil/Candle/Toothbrush Cup by MakeALot, printed by Charles Pax

If you have been watching the Thingiverse Newest Things list as actively as I have,1 then you will have noticed Mark Durbin (“MakeALot“) releasing a series of gorgeous parametric models developed using OpenSCAD.2

We have been printing a few of these objects in the BotCave and I wanted to share both that image and a bunch of links to interesting things Mark has released so far.

Mark, keep going — your work is gorgeous and that you continue to release your OpenSCAD files provides yet another masterclass for other designers learning that software right now.

Error - could not find Thing 6923.
Error - could not find Thing 6917.
Error - could not find Thing 6949.
  1. and check out the Thingiverse Blog coverage of this work []
  2. Yet another incentive to follow MakerBlock’s incredibly helpful tutorials on OpenSCAD and other resources gathered here. []
Tagged with , , , , , , , , , 3 comments

OpenSCAD Tutorial Madness!

Posted by on Monday, February 14, 2011 in Uncategorized

OpenSCAD Tip: Round 1 of 3 - Basic Rounding

OpenSCAD Tip: Round 1 of 3 - Basic Rounding

The guys over at IHeartRobotics just posted the first in a trilogy of tutorials on OpenSCAD.  Their tutorial teaches how to round off the edges on a structure where two flat edges meet at a 90 degree angle.  What I really like about the IHeartRobotics tutorial is that they uploaded their examples to Thingiverse so that it’s easier to follow along at home. 1

There’s been a renaissance in OpenSCAD in the last few months with people posting more and more OpenSCAD tutorials.  With more resources and places to look for inspiration and illumination, people are going to be better suited to get started designing in OpenSCAD.

Some people have mentioned that they’re put off by the “programming” used in OpenSCAD.  To those people I would point out that although my tutorial series uses “code,” that’s really just shorthand for describing to the program what you want it to do.  There’s actually a big difference here.  I’ve made an effort to keep the “programming stuff” completely out of my tutorial series.  If you can type “cube” you’re about 90% of the way to designing anything you want in OpenSCAD.  I used to be a die-hard fan of Google’s Sketchup.  The reason I made the switch to OpenSCAD is that I no longer have to fight with Sketchup to get an object that has no holes, that converts neatly to an STL every time, and can easily conform to the exact measurements I specify.

But!  Enough of my preaching!  Here’s a list of the tutorials you can find out on the interwebs to get you started:

OpenSCAD tutorials:

  1. OpenSCAD beginner’s tutorial by Daniel K. Schneider
  2. Getting Started by The Masked Retriever
  3. Modules and Loops by The Masked Retriever
  4. Include and Import by The Masked Retriever
  5. MCAD Library by The Masked Retriever
  6. Loops and Constants by The Masked Retriever
  7. OpenSCAD Tip: Round 1 of 3 – Basic Rounding by IHeartRobotics

Then, there’s my own series:

  1. OpenSCAD Basics: The Setup
  2. OpenSCAD Basics: 2D Forms
  3. OpenSCAD Basics: 3D forms
  4. OpenSCAD Basics:  Manipulating Forms
  5. OpenSCAD Intermediates:  Combining Forms
  6. OpenSCAD Intermediates:  Mashups

OpenSCAD learning resources:

  1. Official OpenSCAD website
  2. OpenSCAD User’s Manual

Am I leaving out your tutorial or your favorite tutorial?  Please leave a comment and let everyone know about it!

  1. Or, if you’re lucky, at work. []
Tagged with , , , , 6 comments
What can we help you with today?
I want to chat with Sales.
I have a question about an existing order.
I have a technical question about my device.
Existing Orders
For faster service, enter your order number
(found in your confirmation e-mail)