Part 2/5: Variable and parametric designThe previous part addressed the basics of Openscad. It relied mostly on "immediate values": we were providing dimensions as explicit numbers. If you want to tweak the design dimensions, then you need to parse the scad source code and fix the numbers all everywhere.
In fact "hard coded" numbers must be avoided. As opposed to "static" designs, parametric designs give the flexibility to tune the numbers very efficiently at one place only. The good point is that Openscad is one of the best tool to do so.
A larger mug by using the scale operator (from the "basic" tutorial).
This is still not parametric, as numbers are hard-coded (a bad practice).
So let us first convert this design to a parametric version, i.e. a design that can be tweaked with a small set of parameters that all have a clear role (width, height and so).