Skip to content

TOGoS/OpenSCADDesigns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOGoS’s OpenSCAD designs

Re-useable libraries are in ./2023/lib/.

‘Unit tests’ for said libraries are in ./2023/test/.

Everything else is shapes.

Build system

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.

TOGMod1

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.

Units

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.

Standards

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)

TOGridPile

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).

http://picture-files.nuke24.net/uri-res/raw/urn:bitprint:G433XIL5VD42Y3JACRBLNYLAV6Z4EFNZ.6UIXGXTO5YFGMLKAY7QNU3BYUIR7YXPXLKU4QAA/p1515.png

MiniRail

Kind of like DIN rail, but more trapezoidal.

Invented for cable-management purposes, but useful for other things, too.

http://picture-files.nuke24.net/uri-res/raw/urn:bitprint:P4MEHMJICT7VTYO7W2HHAKX5MVAVLFCS.YJLVUBAGWII3GRASKHYPDRU4X7Z2QSYJVQBQQZQ/p2243.png

See MiniRail0 or MiniRail2.

French cleats

The 3D-prunt ones seem sturdy enough for most purposes.

http://picture-files.nuke24.net/uri-res/raw/urn:bitprint:RXTRUOJCUNCNAZCNGALTNAKBF654LZPL.KDJVFNAWTL7T35WLDSHOCVMAGY2DORP2NNJTHVQ/p1715.png

See FrenchCleat (note that OpenSCAD 2021 doesn’t like the mixed array parameters, so this only works in OpenSCAD 2021).

Clarp[2505]

1+1/2-inch-wide snap-together conduit.

http://picture-files.nuke24.net/uri-res/raw/urn:bitprint:3EPU42DRH5VG5S76TBKZ4WGKK4FZX546.ZOEUXGDJEMMUH4UN2INLIKBMN6RRPG6NBCRM2LI/p2048.png

http://picture-files.nuke24.net/uri-res/raw/urn:bitprint:TLVMBCEKRYNMNUO4TVXFF5YEATO5KYX2.EL7YCLSM4HJYKASSPLJ6QKUC2HGLHCEMOH3536Q/p2028.png

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.

Other stuff

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.

About

OpenSCAD shapes for various purposes, mostly to be 3D-printed

Resources

Stars

Watchers

Forks

Packages

No packages published