Re-useable libraries are in ./2023/lib/.
‘Unit tests’ for said libraries are in ./2023/test/.
Everything else is shapes.
There is a make.bat and make.ts in this repo
that can build STLs from their ‘part ID’
(usually “p” + four digits). This requires Deno 2.something.
This exists mostly so that I can more easily reproduce renderings from specific viewing angles.
You can use the OpenSCAD libraries within
without having to know or care about make.ts.
At some point I grew weary of the limitations of OpenSCAD’s ‘modules’ and started writing everything in a functional style where the shape to be rendered is represented using lists (similar to S-expressions) which can then be interpreted to actually generate the shape in OpenSCAD.
TOGMod1 provides an interpreter for these shape definitions, but of course the beautiful thing about this technique is that you can write alternative interpreters, or higher-level languages, that all operate on the same data structures.
Newer designs allow dimensions to be specified in terms of whatever units you like, so long as there is a definition in the default unit table, as a string of the form number + unit name. The number can be a sum of rational numbers, where each component is a decimal number.
e.g.
// Customizable parameters
box_width = "7+1/2inch";
// ...
// box width in millimeters:
box_width_mm = togunits1_to_mm(box_width);
// width in inches, rounded to the nearest inch:
box_width_inches = togunits1_to_mm(box_width, unit="inch", xf="round");See TOGUnits1 for parsing functions.
Somewhat older designs use ‘complex amounts’, which are an array of [number, unit name].
This has the disadvantage of being annoying to type and that
OpenSCAD 2024 won’t let you indicate those as design parameters,
so has been replaced by the single-string format.
I try to settle on a few core shapes that fit together with each other in order to maximize the chance that any given part will integrate nicely with another without them having to be specifically designed for each other.
Some standards I try to follow are:
- Sizes that are multiples of 1+1/2” ‘chunks’, or at least 1/2” ‘atoms’
- 3/4”, 1/4”, and 1/8” being common thicknesses for panels
- Gridbeam holes for bolting things together
- TOGridPile (stacking cups based around a 1+1/2” or 1/2” grid)
- French cleats
- MiniRail (serves similar role to DIN rail)
- Clarp2505 (a shape for snap-together conduit or other things)
- UNC threads, esp. 1+1/4”-7 (see Threads2)
- 1/2” 14-degree dovetail slots (i.e. MicroJig’s Matchfit system)
If you like Gridfinity but want something that fits on an inch-based grid and is more rotationally symmetric, check out ./2023/togridpile/TGx9.4.scad (for a Swiss Army Chainsaw type thing) or ./2023/togridpile/TGx11.1.scad (for a cleaner generation of the basic shape, from which you can make your own cut-outs).
Kind of like DIN rail, but more trapezoidal.
Invented for cable-management purposes, but useful for other things, too.
The 3D-prunt ones seem sturdy enough for most purposes.
See FrenchCleat (note that OpenSCAD 2021 doesn’t like the mixed array parameters, so this only works in OpenSCAD 2021).
1+1/2-inch-wide snap-together conduit.
TOGridPile cups created with TGx11.1 and cavity_type = "clarp2505-square"
act as female clarps, in case you want to make a snap-in lid or something.
Almost everything I print starts as a .scad in this repo.
Poke around in e.g. experimental to get a feel for what else is in here.




