The Solid Modeler's Blender Survival Guide

Part 2: Topology and the Motor Pinion

First of all, some lip-service to the mathematical discipline of topology is definitely in order. This is not by any means a full lesson in topology, but some minimal knowledge is necessary to understand why so often a model simply will not go through skeinforge, no matter how hard you jab at it.

Skeinforge won't slice something that isn't manifold, or solid. The solidness of objects isn't always easy to maintain in a 3D package like Blender because frankly it isn't the first thing on a 3D artists' mind. Many of the meshes you will encounter are not solid objects, but will in fact have holes in them. Any mesh, no matter how convex-looking it might be, which has a hole anywhere in its surface, is topologically the same as an infinitely thin sheet, which skeinforge knows you won't be able to print.

(Actually skeinforge tends to righteously freak out if you feed it non-manifold meshes.)

With all that said, on to the Pinion.



The Pinion

In these survival guides, I'm going to take a modeling problem I've actually faced and actually solved, and turn it into a tutorial. I figure that way I'll definitely be covering useful commands and real-world situations. We'll start with what was definitely the "easy part" of the Gearbox: the motor pinion.

The motor pinion is just a single, ordinary gear with one end closed. I closed one end so the motor's shaft would hit a place and stop. This way it'd have a well-defined position in the final model. So the first thing we need to do is break out the gear script. You can download it here. Make sure you put it into your .blender/scripts directory, and when you hit the space bar, you should have the "add gear" menu option, like this:



Click that, and you'll get the Add Gear dialog. There are tooltips on this thing to give you an idea of what the options mean, and the Thingiverse page has a link to a very nice tutorial on it. For this project, I have it filled out thus:



When you click okay, you'll have a nice-looking gear, and if you were going to render it in a machine, this might be good enough. (You'd have to mess with textures and stuff, but we don't do that in these tutorials.) One cosmetic note, though:



It looks a bit smeary and wonky, doesn't it? This is because by the default in this script (I may have to *fix* that...) the gear is set as a smooth object, so that blender is trying to shade the hard edges of the gear as though they were smooth, soft curves. If you click that little button marked "Set Solid" you'll get a much more proper-looking gear:



There's a problem with this if we want to print it though. Remember that note about topology? This gear is topologically equivalent to an infinitely thin straw, which doesn't print. To make a printable gear, we will have to alter the geometry of the holes on the top and bottom so that there is an inside to this gear model. First step, let's close up the top.

Press the 1 key on the number pad to get a z-x view. Now hit alt-b and draw a rectangle around the vertices that make up the top of the gear. This will mask all the vertices but those up top.



You should now have this:



Hit 7 to get a veiw from up top. Hit the a key twice. The first time you hit it, the whole model with light up, and the second, it will all go dark. This ensures that you don't have anything at all selected. Now hit b and draw a box around the ring of vertices in the middle. Because you've masked the vertices underneath, this only selects the vertices in on the top ring of the gear.



Now it's time to make a topologically significant alteration! Hit alt-m. Select "At Center".



Your gear should now have a closed-up top. Hit alt-b again to take a look at the whole model with this modification:



Now our gear is no longer topologically identical to an infinitely thin straw. Now it's topologically identical to an infinitely thin plane. That's one less hole than before!

It's not strictly speaking the safest thing in the world to make selections through other objects-- usually one should do as we did previously and mask off a section of the mesh so its parts can be selected with impunity. But in this case I felt like I could get away with tilting the gear forward and highlighting the lower ring of vertices straight through the gear walls:





We could do as before and merge these vertices to at last make a solid object. However, we want a hole in the bottom for the motor's shaft to plug into. So we hit the e key and select "Only Edges":



Blender now creates a second ring of vertices and connects it to the previous one with a cylinder! You can now drag it around freely, which isn't always the best idea...



Hit the z key while you've got this glowing circle moving around and Blender will snap it to the z axis!



This is something I do all the time to make extrusions go where I want them to. This works with the x and y axes as well. Click when you're done picking a position for the internal cylinder. The ring of new vertices will remain selected, which is good because we're going to extrude again:



Hit alt-m and select "At Center" again and the topological hole in the gear is now sewn up, and we have our hole for the motor shaft to plug into:



If you've been altering a model's topology, Blender can get itself turned around as to which side of the model is the inside and which is the outside. To fix this, there's a command in the mesh menu for just such an occasion. Hit a to select the entire gear, then select Mesh:Normals:Recalculate Outside.





Fun Modeling Tidbit: The Extrude Command

As a closing note, the Extrude command we used is actually insanely powerful. Try starting with a cube and extruding its faces. A really vast variety of shapes can be made this way. Extruding a face on a mesh is generally very safe from a solid-ness stand point, so I use it a lot when I want to make an alteration to something but don't wish to threaten its printability.

Back to the Solid Modeler's Blender Survival Guide