One of the great things about 3D printing is you can print multiple parts that are printed interlocked in their proper spots so they come off the printer already assembled!
This past October, I tried my hand at "moving parts" to make a “Dial-O-Lantern” toy for my kids. The concept was a 3D printed Jack-O-Lantern with three sliding pieces that would allow you to “dial” and configure between 3 different sets of eyes, 3 sets of noses, and 3 sets of mouths-- a total of 27 different face combinations. The pumpkin printed completely assembled and has a removable lid so an LED light can be placed inside.
I modeled my pumpkin in Blender, which is free and open source. Since I do not own a 3D printer of my own, I had my pumpkin printed by Shapeways in their Strong & Flexible Plastics, the color orange of course! : )
In this Instructables article, I’ll go over the thought process behind some of my design decisions and then my modeling approach in Blender. Attached at the end is the final .STL file of my pumpkin which you can print for yourself. If you don’t have a printer or your printer isn’t capable of interlocking parts, you can also order one to be printed by Shapeways.
This model is licensed Creative Commons (With Attribution and No Commercial Use Without Permission)
Step 1: Design Decisions - Making the Moving Parts Move
With every 3D printing project I take on, I have found the crucial first step is to decide on my materials and familiarize myself with the material requirements. I knew right off the bat that I wanted to print in the Strong & Flexible Plastics from Shapeways. I hit up the material’s design requirements. I was specifically interested in the clearance between the separate parts. My pumpkin was going to be three separate pieces. I needed to know how close those pieces could be without getting fused together. In this case, I needed to make sure my parts were 0.5mm apart.
Now that I knew how far apart all the pieces needed to be, I had a trickier question. How to connect and make the three pieces of the pumpkin slide together? I did a lot of sketching and brainstorming on paper and I went through many revisions of ideas, some exceedingly complex. Sometimes it pays off to get an outside pair of eyes! A brainstorming session with my husband produced a nice simplified concept. I went with a tongue and groove approach. It would be similar to how Pergo flooring connects together, only in a sphere. The top and the bottom pieces would form grooves and the middle piece would have tongues that would fit inside.
Using the minimum clearances and settling on a minimum wall thickness of 1 mm, I had an idea of how large my connections were going to be.
Believe it or not, the connection sizes dictated the size of the final pumpkin. Anywhere there were connection rails, I wouldn’t be able to cut out any of the facial features. I didn’t want to end up with a pumpkin where the eyes were oddly spaced from the nose. I wanted to make sure the distance between facial features appeared right. Once I knew how much “uncarvable” space I was going to have on all my pieces, I made some mock cylinders in Blender the same height and then I experimented with some dummy triangles to get a feel for how big a pumpkin I would need for the proportions to look right.
Step 2: Design Decisions - How Many Faces Could the Pumpkin Support?
In the movie Ronin, there is a scene where a team is trying to plan out an ambush of a car. One guy suggests two shooters, one of each side of the street. That actually didn’t impress one of the more seasoned gunmen.
“Two shooters. Car comes through here. Shooters across each other. Kill each other dead.”
Similar to Ronin, I wanted to be careful that I didn't have two faces directly across from each other. Since my pumpkin was going to be hollow I didn’t want to look right through one face to another on the other side.
To determine how many faces my pumpkin could support, I went with a very low budget experiment. I cut some holes in an empty toilet paper roll and decided to go with three faces. There may be some exposure between faces, but it was minor.
As far as determining my various options for the eyes, nose, and mouth, I did another low budget experiment. I got out some index cards and a Sharpie and toyed around with some combinations.
Step 3: Modeling - the Outside of the Pumpkin
When you are modeling a pumpkin, you don’t want it to be a perfect sphere. Jonathan Williamson’s “Modeling a Pumpkin in Blender” video was an excellent place for me to learn what was needed to make a sphere look like a pumpkin. BUT--- I had some special considerations I needed to tackle. Since my three sets of faces were going to rotate, all those nice bulges and groves that would make my pumpkin look pumpkin-like—I needed to make sure they lined up. I wanted every pair of eyes to look like it matched up with each nose and each mouth and I didn't want shape differences in the pumpkin to do me in. As a result, I wanted to make sure each third of the pumpkin (looking down on the X-Y plane) was shaped identically.
I started off with Add->Mesh->UV Sphere and then in the left toolbar I increased the Segments under Add UV Sphere to 48. It’s no coincidence that number is divisible by 3.
Just as Jonathan Williamson illustrates in his video, I did some proportional editing (as the video shows, you hit O to get into Proportional Editing mode) to shape the vertical profile of the pumpkin. Then with proportional editing still turned on, I highlighted one of the vertical segments going down the outside of the pumpkin. I hit S to scale it and typed in 0.9. Typing the numeric value was my way of making sure each scaling was consistent. The scaling shrunk that arch just a bit to make a dip and because proportional editing was on, the related vertices adjusted as well. I repeated that scaling for every 9th line of vertices. That gave me nine dips and nine bulges in my pumpkin. The end result was a very consistently shaped pumpkin.
To help make sure the pumpkin was very stable when it sat, I flattened the bottom of the pumpkin. This I did just by going to Edit mode, selecting groups of vertices and making their Z values identical.
Finally, to give the outside of the pumpkin a nice finished look, I went ahead and added and applied a Subdivision Surface Modifier (also discussed in Jonathan Williamson's video if you need more information).
Step 4: Modeling - the Inside of the Pumpkin
The first sphere I added was going to be the outside of my pumpkin. I wanted my pumpkin to be hollow, partly to save on material costs and partly to make sure I could put an LED light inside. To accomplish that, I did another Add->Mesh->UV Sphere to add a sphere that would serve as my inside of my pumpkin. This sphere wasn’t really going to be seen, so it didn’t have to be fancy. I didn’t have to worry about ridges and valleys. I didn’t have to worry about a Subdivision Surface modifier to make it smooth.
What I did have to worry about were two things:
Flipping Face Normals
First, I needed to flip the normal of my faces to tell this sphere it was going to be the inside of my pumpkin. To do that, I went into Edit mode. I selected all the faces and then I went to Mesh->Faces->Flip Normals.
Sizing the Inside Sphere (aka My Wall Thickness)
I also wanted to make sure this sphere was sized appropriately. Wall thickness is an important consideration when making a model for 3D printing. You want to make sure all your walls are thick enough for your object to remain stable during the printing process.
Reviewing the design requirements for the Shapeways Strong & Flexible Plastics I knew I needed to make my walls at least 0.7mm thick. In this case, my walls were going to be the distance of the outside sphere to my inside sphere. If my inside sphere was too large, then the walls would be too thin for my object to stay in tact during printing, cleaning, dyeing, and shipping.
Now if I was working with perfect spheres, all I would need to do is make sure my inside sphere was at least 1.4mm smaller in diameter (The 0.7 wall size multiplied by 2) of the outside of my pumpkin. But, the outside of my pumpkin isn't a perfect sphere. I needed my walls to be at least 0.7mm thick at the absolute thinnest point between the two spheres. That meant when determining the diameter of my inside sphere, I made sure to size it according to one of the scaled down dips.
Step 5: Modeling - Hollowing My Pumpkin and Slicing It Into Three Pieces
Now my pumpkin had a fancy, shaped sphere for the outside and a simple sphere with flipped normals for the inside. Back in Object Mode, I selected both my outside and my inside sphere and did Object->Join. This made them into a single object.
Next I wanted to cut my pumpkin into three parts. As you may recall, the Material Requirements from Shapeways indicated that separate parts have to be 0.5 mm apart. I did Add->Mesh->Cylinder which I sized to be larger than my pumpkin, diameter-wise and just 0.5 mm high. Since it was going to take two cuts to slice my pumpkin into three pieces, I did a Duplicate Object to make a second cylinder. I placed those cylinders where I wanted to cut the pumpkin.
To perform my cutting, I used Blender's Boolean Modifier. I selected my pumpkin in Object Mode, went to the Modifiers section in the right panel, clicked on Add Modifier, and selected the Boolean Modifier. In this case I wanted to use "Difference" Operation. That allows you to subtract one object from another. After I subtracted my little “cutter cylinders”, I ended up with pumpkin in three separate pieces.
Step 6: Modeling - Circular Tongue and Groove Connections
My circular tongue and groove connections are another great example of the Boolean Modifier. Both the hooked “groove” and my "tongue" were just a series of cylinders subtracted from each other.
The “tongue” part was easy—it was just a small cylinder subtracted from a larger one.
The "groove" was a very similar process, but with lots of subtractions. My base cylinder was subtracted by a number of discs (which themselves were cylinders subtracted from cylinders).
As far as sizing the cylinders, the toughest part was determining the diameter of the pieces that needed to connect with the inside of the pumpkin. Those sizes needed to be exact.
To determine those initial sizes, I selected my pumpkin object and switched into Edit Mode. I went inside my pumpkin (you might have to toggle View->View Persp/Ortho to see inside your objects) and I had these nice landmarks courtesy of those slices I already cut out of the pumpkin. Those slices are particularly fitting because I wanted my tongue and groove pieces to sit flush with those cuts. Since my pumpkin was centered on X=0, Y=0, Z=0, I could click on a vertex that was directly on the X or Y axis (aka X was 0 or Y was 0) and was flush with my slice through the pumpkin. Then the other value (Y for X and X for Y) would be the radius of what my connector piece needed to be. The diameter was simply twice that.
Early on in my design phase, I had already decided on my measurements of the connecting pieces, so once I knew those first two crucial diameters, everything else trickled down. For example, I knew I wanted my tongue insert to be 4 mm long. Once I determined the outside diameter of my tongue, I knew the cylinder that was going to be used to cut out the inside would be 8 mm smaller in diameter.
Step 7: Modeling - Cleaning Holes
There was one final thing I did for my part connections. Again, knowing the printing process and the specifics of the materials can really help with your design. In the case of my pumpkin, I was going to have it printed by Shapeways which uses Selective Laser Sintering. A layer of nylon powder is laid down, a laser comes through and solidifies just the powder that is going to be a part of your object. A new layer of powder is put down and the next layer is solidified. At the end of the printing process, there is a big block of powder which your object is "excavated" out of. Since the print is encased in powder (inside and out), it is then thoroughly cleaned to remove all the excess. With my pumpkin, I wanted to make sure it was easy to get the powder out of those tight crevices between my tongue and grooves. I didn't want the sliding movement of my parts to be hindered by trapped powder. I decided to add a series of 1 mm by 1 mm holes to my grove pieces to allow better access for the cleaning process.
Once again, I took advantage of the Boolean Modifier to subtract a group of cubes (rotated into their proper spots) from my groove pieces.
Step 8: Modeling - Facial Features
With my pumpkin settled, I now needed to model my various facial feature options. The skills I used are very similar to what’s illustrated in the “Blender 2.6 Modeling Curves” tutorial by Olson where he demonstrates how to trace a logo from an image and make it into a 3D object.
In my planning phases, I had done a mockup of my faces using index cards and a Sharpie. I simply scanned that handiwork in and then I used it as the background image of a new Blender project (Under the Background Images section of the right panel). After adding the background image, it is visible whenever you are in the Top Ortho view (which you can get to by going to View->Top and then View->Persp/Ortho).
I used a combination of Add->Curve->Bezier Curves to trace out my facial features. If aren't familiar with Bezier Curves, I do highly recommend Olson's video.
For some of my curves where I wanted symmetry, for example my mouth options, I only traced half of the object and used a Mirror Modifier to copy it.
For simple things, like the Classic Jack-O-Lantern triangle eyes and nose, I saved some time and used Add->Mesh->Circle. When you add a new circle, you can specify the number of Vertices in the left panel. A circle with 3 vertices—yup, triangle!
Bezier Curves do have an Extrude property built-in. It’s tempting to use it. However, I have found that tends to create duplicate vertices and the dreaded non-manifold edges (edges that don’t connect two faces) which means extra work to make your object printable.
I have had better luck with selecting the curve in Object Mode and going to Object->Convert to->Mesh from Curve/Meta/Surf/Text to change my 2D Bezier Curve to a simple mesh.
Then I switched to Edit mode, did a select all on the vertices and went to Mesh->Faces->Make Edge/Face to make them into a face.
Once I had a face, I went to Extrude->Region in the left panel and extruded it up to make it 3D.
When I had all my face elements into nice little objects, I went to File->Export to export them to .STL format which I could them import into my other pumpkin project.
Step 9: Modeling - Carving the Facial Features
In my last step, I made Mesh objects of all my different facial features which I exported to an .STL file. Back in my original project, I did a File->Import to get all my facial features into my pumpkin Blender project.
Now because I wanted to carve my facial features out of a nice rounded pumpkin, I decided it would be best it those objects were curved appropriately. I went to Add->Curve->Bezier Circle and added a new circle that was roughly the diameter of my pumpkin (It didn’t need to be perfect). Then I went to the Modifiers section and used the Curve Distort Modifier to “bend” those objects along that curve.
As I mentioned when I was modeling the outside of my pumpkin, it was important to me that all the different facial options lined up. To help with my placement of everything, I added three Add->Mesh->Planes and rotated and positioned them so I could visualize key landmarks of my pumpkin.
As necessary, I hit R and rotated my facial features so they laid better on the surface I wanted to cut them out of.
Once I was satisfied with everything, it was time to “carve” my pumpkin. To do that, I went back to the good ole Difference Operation of the Boolean Modifier. I selected my pumpkin in Object Mode and subtracted all the facial features from it. Note- I did an Object->Join on the various body parts to speed up the process.
Step 10: Modeling - Stem
For the stem of my pumpkin, I really just followed the great instruction by Jonathan Williamson in the “Modeling a Pumpkin in Blender” tutorial. I don't think I deviated from any of his steps. The stem starts off as a cylinder that is manipulated through edits and the Lattice Modifier is used to twist it.
Step 11: Modeling - Cutting the Lid
The last part of my pumpkin was making the lid. Yet another application of the Boolean Modifier, but this time a little twist. I also threw in the IntersectOperation.
I started off by doing a Mesh->Add->Cylinder to make myself a template. I went ahead and scaled one size of the cylinder larger. This would ensure the cuts would be angled. That way, even if there were little discrepancies/margins of error with the print, I could rest easy the lid would still fit.
Once I made my “Cutting Cylinder”, I placed it where I wanted to cut the lid on my pumpkin and I used the “Duplicate Objects” option in the left toolbar to make an exact copy in the same spot.
I selected the first cutting cylinder and added a Boolean Modifier. This time, however, I selected “Intersect” for the Operation. Instead of subtracting the cylinder from the pumpkin, “Intersect” returns the places where both objects overlay. If you are familiar with a Venn diagram, the Intersect operation would return just the little sliver where two circles overlap.
When that modifier was applied, my cylinder was transformed into a nice lid shaped piece that matched the top of my pumpkin.
But my pumpkin object was unchanged and still a complete sphere. That’s where our copy of the cutting cylinder comes into play. I selected my pumpkin object and then I did a Boolean Difference Modifier to subtract the cylinder from my pumpkin. Once applied, my pumpkin had a hole in it the exact shape of the lid.
Step 12: Modeling - Finishing and Printing
I finished up my model by joining any outstanding parts (for example, I joined my groove and tongue pieces to my pumpkin object at the end so they wouldn't accidently get "carved"). I ended up with two separate pieces - the pumpkin and the lid.
I typically use Blender units as centimeters. Since the company I was using to print expected the models in millimeters, I selected both the pumpkin and the lid and increased the dimensions 10 fold.
Next I needed an .STL file to upload. I selected both my pumpkin and my lid and went to File->Export and created an .STL file for my project.
Finally, I went to Shapeways, uploaded my model, and placed my order. I might have had just a little bit of anxiety waiting for my package to arrive. When it did, I was thrilled to see my moving parts actually moved!
As for my son, he loved it! WIN!
If you covet a Dial-O-Lantern of your own, you don't have to repeat all my steps (but hopefully they'll help in planning other projects). Attached is the .STL which I am licensing Creative Commons (With Attribution and No Commericial Use Without Permission).
If your printer gives you hassle or if you don't have a printer of your own, you can also order a print from Shapeways.
Happy Modeling (and Dialing!)