- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
Designing 3D objects in OpenSCAD can be very quick and simple. ((Thanks to dustinandrews for tagging their Part Catch Basket for Thing-O-Matic as with “openscadtutorial” on Thingiverse!)) 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.