OpenSCAD, ReplicatorG, why can’t we all just get along?

I need to bolt some shelving to the wall.  Yes, I know the shelves came with some hardware for doing that – but I own a 3D printer and I can design BETTER hardware.  I whipped something up in Sketchup and printed off some brackets.  Next, I needed a slight variation in order to bolt two shelving units to each other.  (Something for which their hardware wasn’t designed).

Unfortunately, ReplicatorG just puked all over itself as soon as I tried to slice the bracket.  I had been tinkering with OpenSCAD for the last week or so, so I figured I’d give that a shot.  Here’s what I tried:

  • First, I tried building the bracket up out of just rectangular boxes.  This was okay, but cumbersome.
  • Next, I tried to design a really really complex polyhedron in the shape of my bracket.  This was a nightmare.  To do it properly, you need to design your object such that you’re defining each of the triangles that make up the object.  If you get set up the triangles by putting the numbers for each corner in the wrong order, in a less-right order, or did some other benign thing, it would make a mess.
  • After chatting with Clothbot, I tried to define a cross section of my bracket as a flat image in Sketchup (again), then tried to expert it to a DXF through a plugin.  I just couldn’t manage to extrude that flat DXF into a 3D image.
  • So, I went back to Sketchup and tried to tinker with the file again, fixed it in CADSpan, exported to STL again, fixed it up with NetFabb again, and ReplicatorG still barfed it up.
  • Back to OpenSCAD (again).  This time I tried to assemble a 2D cross section of other shapes.  This didn’t work as I tried to tinker with the “linear_extrude” function.
  • THEN, finally, I tried to define a polygon (not a polyhedron) based upon the coordinates I had used originally to describe the bracket when I was attempting to build it out of triangles.  This worked to describe a flat 2D section of the bracket.  I tried the “linear_extrude” function again and it worked well.  I then punched a few holes into the bracket with some small cylinders and exported to an STL again.  It’s my understanding that OpenSCAD makes quality STL files – without holes or other cleanup required.  While that may be the case, you guessed it, ReplicatorG tossed its cookies when it saw this bracket.

So, what is it? Is it the bracket?  Sketchup and ReplicatorG?  Is it OpenSCAD?  Suggestions?

Playing with OpenSCAD / CloudSCAD

Inspired by MaskedRetriever‘s last few Thingiverse blog posts on OpenSCAD I tried it out again.  Well, to be fair, I’ve been trying Tony Buser’s CloudSCAD.  I’ll get around to actually installing OpenSCAD, but playing with CloudSCAD is so dang easy.  It is limited by the power1 of my netbook.

I have always enjoyed the ease and immediacy of Sketchup.  Complex objects and forms are easy.  Amusingly, sometimes the smaller simpler bits can be more difficult to tame. 2  But, CloudSCAD does appeal to my programmer/hacker nature.

In any case, I’ve managed to conjure simple forms – spheres, cubes, boxes, cylinders, and cones.  I can assemble and subtract forms from one another.  But, it appears that more complex or irregular polygons are more difficult.

What CAD program do you use and why?

  1. Or, lack thereof []
  2. Wouldn’t you agree Chris? []

ADD and TLDR

This post could easily have been titled “inverse relationship.”1

I tend to think I’ve got a form of ADD.  It’s better than saying I’m impulsive, excitable, or impatient, right?  In any case, I read and blogged about Capolight’s post on creating models from images without reading the entire thing.

The Google Sketchup instructional video he included in his post was great.  Basically, it helps one create an object from a photo with some kinda fancy Google UI stuff.  I wish I had known about that a lot earlier. :)  What a cool feature!

I suppose I could have titled this “RTFM” too…

  1. As in when you have ADD you won’t read anything and everything is TLDR… []

Creating models from photos

I thought this recent post from my new favorite materials science and RepRap/MakerBot blog, Capolight, was great.  He summed up in one succinct post what I wanted to convey and probably didn’t convey with my verbose diatribe about my process for approximating facsimiles of props by tracing photographs in Sketchup.1234

((I’ve mentioned the Case of The Purloined Pig before, one of my favorite origami anecdotes.  Basically, contemporaneous invention is the result of funny little quirks in the universe.))

Capolight’s method is essentially the same as the one I described recently (only, as I mention, he does a much better job of it):

  1. Import a photo into Sketchup
  2. Trace image
  3. I spun my tracery and Capolight extruded5
  4. Scale newly created object to measurements
  5. ???
  6. Profit!
  1. You may officially now refer to me as an “insufferable word stretcher.” []
  2. To quote River Song, “Spoilers!” []
  3. Hey!  Remember that one post where I didn’t make any references to Doctor Who at all???  Yeah.  Me neither. []
  4. Crap.  One of my favorite actors, Maury Chaykin just passed away.  I really liked that guy. []
  5. Which is OH so much more appropriate, given our intended media. []

3D design constraints, problems, considerations, potential solutions

In the comments of a recent post Tony and I were discussing how we were each thinking about how to design and print an 11th Doctor sonic screwdriver. 1 2  Let’s set aside the nature of the object in question for a moment and consider the constraints, problems, considerations, and potential design solutions.3

There are a number of challenges facing one wishing to print this particular object.  Although the discussion4 pertains to the design challenges and decisions in this project, I’m hopeful it will be helpful to myself or another when it comes to some other design.  Thus, let us think only of the design challenges, problems, and potential solutions.

Sketch of Screwdriver

Sketch of Screwdriver

  1. This newest one is too large to be printed as one single piece.
  2. It has a number of overhangs.
  3. It has a number of moving pieces.
  4. It lights up.
  5. It is a comprised of a number of different colors.
  6. I don’t know the exact measurements.

Even if you want to print the non-extending, non-spring loaded, non-LED, non-swiveling bits there’s a fair number of considerations.  Often my most successful way of solving a problem is to just get started and figure things out as I go.

In this case I got started by examining the pictures Tony and I had located.  Quite separately we had both pulled the images out of the animated GIF.  I created a new smaller image of the open and closed versions side by side, for comparison’s sake.  Then, I reoriented both of them so they were vertical rather than on a slant.  Then I resized the picture of the screwdriver in someone’s hand5 6 so that it was roughly the same scale as the other two images.  This was placed next to the first two.  I traced the images in Sketchup and spun the parts around and ended up with a reasonable facsimile of a portion of the screwdriver.

The problem with designing and printing in segments is figuring out how to assemble it.

  1. Snap-fit?
  2. Glue together?
  3. Bolt together?
  4. Friction fit?
  5. Do we design it so that it can be disassembled easily?

And, what about other considerations?  If we want to install any electronics, lights, etc we probably want it to be easy to disassemble.  Ideally, the entire assembly7 would be hollow in order to incorporate electronic parts.  Besides, “if you can’t open it, you don’t own it,” right?  That means no easy glue or snap fit solution.  Bolting together means non-printable parts.  I generally have a preference for 100% printable designs when I can manage.  Here are some of the ideas I considered and dismissed:

  1. At first I was thinking of printing it in a series of tubes that fit over one another.  This approach has several problems.
    1. I considered a screw thread approach.  Basically a series of tubes which were screwed together.  I wasn’t crazy about the idea of generating a number of helices, but would do so if a good design required.  Although, I did like the idea of being able to just unscrew the entire thing when I wanted to take it apart.  There’s also the very visceral act of assembly by taking all the bits off the platform, cleaning them, and screwing them together in about 15 seconds without any additional tools.
    2. A variation on the above.  A system where the parts have a knob/groove connection similar to those very cool cylinder containers on Thingiverse.  Twist, lock.  It can be undone, and requires creating grooves instead of a helix, which is significantly easier.
    3. I considered a system where I create a long tube with a knob at one end.  Then, create all the other parts so they can slide on.  Affix something to the other end when done, glue/bolt, done.
    4. A variation on the above where all the parts are printed as tube, but press fit together.  Designing them to the correct tolerances would be tough.
  2. Then I thought about printing it in vertical halves.  Again, problems.  Again, none are insurmountable, just problematic.
    1. Cosmetically, I’m not crazy about the nut/bolt holes which would be required to assemble two vertical halves.
    2. Alternatively, a snap-fit would be great – but a good one would not be easily un-snap-able.
    3. Press fit using circular tabs going into circular holes like every Happy Meal toy you’ve ever seen.  There’s no real problem with this except that printing small nubs and circular holes is difficult.  Then again, I could print larger holes/nubs.  However, this means less room for a hollow interior.
Napkin sketch

Napkin sketch

While sketching up the above in Sketchup8 I hit upon an idea.  I could print the assembly in sections9 – but not necessarily similarly constructed sections.  In this I was inspired by some of the design ideas I saw/recreated while creating a derivative 3x2x1 Rubik’s cube from TomZ’s 1x2x3 Rubik’s cube.  If you look at the design of this style of Rubik’s cube (either of these will do) you’ll notice the two cubes at either end have little bits that stick out into half-cylinders which widen into half-disks.  When you take two of these end cubes and set them together you end up with a full cylinder terminating in a full disk.  These two are then captured in the two center cubes which have half-cylinder, half-disk grooves – which allow the two end pieces to rotate freely.

So, what if I printed large sections of the screwdriver as pieces that fit together vertically – but had a groove around the edge?  You could leave the inside mostly hollow.  Then, you could slide a ring or thin cylinder around it.  If so, the ring would keep the two halves in place.  The ring could be kept in place either by friction or a notch/groove system.  The point is this design would:

  • Allow the interior to be hollow
  • Require only printed parts for assembly
  • Not be overly complicated to design
  • Be easily assembled and disassembled

Napkin sketch on right.

Amusingly, this only gets me 1/3 of the way.  I still need to figure out how to design the bits that slide and the bits that swivel the claw like bits at the end.  So, Tony, what you got?

Update:  Cyrozap – sory fore mispellnig yoru mane.

  1. Tony Buser, are you listening? []
  2. In case anyone from the BBC cares – I’m not doing this for pecuniary gain.  I’m just a nerdy American Doctor Who fan who enjoys making things. []
  3. FYI, this unbelievably long post has been brought to you by Cryozap Cyrozap, Schmarty, and Cameron.  I wanted to serve up truncated RSS feeds, but nooooooooo…  they just wanted you to have to endure more than a thousand words of my rambling nonsense. []
  4. Well, this is just me babbling, so it’s more rambling musings than discussion.  Then again, if there’s a single comment it becomes a discussion.  Single non-spam comment. []
  5. No doubt the hand of some snooty fancy hand model. []
  6. What bastards. []
  7. And it would have to be an assembly since I can’t print it as a single piece []
  8. OMG!!! I get it!!!  SKETCH-UP!!!  Ha! []
  9. Obv []

New Design: Dalek Cookie Cutter

I’ve uploaded my designs for a Dalek cookie cutter to Thingiverse.

I don’t even eat that many cookies.  It’s just that these are just fun to design.  I realize there’s an SCAD Thing on Thingiverse for creating cookie cutters.  However, I’m just not familiar with SCAD and Sketchup with a few key STL plugins is SOOO easy to use.

My design process is essentially:

  1. Draw silhouette of object in Sketchup
  2. Use the “Offset” feature to create an outline of the object around the flat silhouette of the object
  3. Delete the interior outline
  4. Use the “Push/Pull” feature to raise the outline to about 2cm
  5. Export as an STL
  6. Run through NetFabb STL automatic repair
  7. Upload to Thingiverse with a witty description
  8. Write a blog post about it

I’ve posted a few times about useful Sketchup plugins, so if you’re getting started with Sketchup and MakerBot that’s a good place to start.

Sketchup STL Importer Plugins

As I’ve mentioned before, I do all of my 3D modeling in Sketchup.  It’s not open source, but it is free.1

Well, I’ve been monitoring the Capolight Electronics Blog lately – and it’s a good thing too.  Besides having some seriously amazing information about the thermal properties of plastic, he’s just posted about some useful importing/exporting plugins for Sketchup.  As easy as Sketchup is to use, it’s just not very good at exporting to STL.  I haven’t tried these plugins out – but I’m hopeful they will do the job.

If you try them out, please let me know how it goes!

  1. I suppose it’s really a “freemium” business model… []