Variables or modules when programming

In working up a recent project:

https://www.blockscad3d.com/community/projects/1168572

There were many instances of needing to refer to the dimensions of parts, which brought to mind a nifty feature of TeX, where one can place something into a box and then measure the contents of said box, which is surprisingly useful.

Unfortunately, OpenSCAD lacks a facility for doing that, but it did bring to mind an alternative. While one could just use variables, this can become unwieldy in BlockSCAD where one often needs to select a variable out of the interface where they are shown/defined. Further, it is often needful to select them in pairs, one for each axis — since BlockSCAD allows testing w/in a module for which value to return, the following seemed worth trying:

This topic was automatically closed after 30 days. New replies are no longer allowed.