Examples

Every DIN 168 size: a cap in a row, each labelled with its designation.

Preview (F5) is quick; a full render of all of them takes a while on OpenSCAD 2021.01.

Source: examples/all_sizes.scad
// Every DIN 168 size: a cap in a row, each labelled with its designation. Preview (F5) is quick;
// a full render of all of them takes a while on OpenSCAD 2021.01.
include <../din168.scad> // for din168_sizes; the library draws nothing at top level

gap = 10;
top = 3;

// x of each cap's centre: the running sum of the diameters before it
function x_at(i) = i == 0 ? 0 : x_at(i - 1) + din168_cap_radius(din168_sizes[i - 1]) + gap + din168_cap_radius(din168_sizes[i]);

for (i = [0:len(din168_sizes) - 1]) {
  s = din168_sizes[i];
  translate([x_at(i), 0, 0]) {
    translate([0, 0, top]) rotate([180, 0, 0]) din168_cap(s, top=top); // mouth up, as printed
    translate([0, -din168_cap_radius(s) - 4, 0])
      linear_extrude(1)
        text(str(din168_name(s), " x ", din168_pitch(s)), size=4, halign="center", valign="top");
  }
}

examples/all_sizes.scad on GitHub

A GL45 screw cap, ribbed, and a short GL45 gauge to try it on without a bottle.

Source: examples/gl45_cap.scad
// A GL45 screw cap, ribbed, and a short GL45 gauge to try it on without a bottle.
use <../din168.scad>

gl = din168_by_name("GL45");

// Shown as printed: top on the bed, mouth up. din168_cap draws it mouth down, its top from z = 0
// to z = top.
top = 3;
translate([0, 0, top]) rotate([180, 0, 0]) din168_cap(gl, top=top, ribs=36);
translate([70, 0, 0]) din168_bolt(gl, length=12, bore=30);

examples/gl45_cap.scad on GitHub

A GL80 screw cap, ribbed, and a short GL80 gauge to try it on without a bottle.

Source: examples/gl80_cap.scad
// A GL80 screw cap, ribbed, and a short GL80 gauge to try it on without a bottle.
use <../din168.scad>

gl = din168_by_name("GL80");

// Shown as printed: top on the bed, mouth up. din168_cap draws it mouth down, its top from z = 0
// to z = top.
top = 3;
translate([0, 0, top]) rotate([180, 0, 0]) din168_cap(gl, top=top, ribs=48);
translate([100, 0, 0]) din168_bolt(gl, length=12, bore=64);

examples/gl80_cap.scad on GitHub

A GLS 80 screw cap, ribbed, for DURAN’s wide-mouth bottles, and a short GLS 80 gauge to try it on without a bottle.

GLS 80 is not a DIN 168 thread; see din168.scad and docs/references.md.

Source: examples/gls80_cap.scad
// A GLS 80 screw cap, ribbed, for DURAN's wide-mouth bottles, and a short GLS 80 gauge to try it
// on without a bottle. GLS 80 is not a DIN 168 thread; see din168.scad and docs/references.md.
use <../din168.scad>

gl = din168_by_name("GLS80");

// Shown as printed: top on the bed, mouth up. din168_cap draws it mouth down, its top from z = 0
// to z = top. For a bottle with its pouring ring fitted, add ring_band=8.
top = 3;
translate([0, 0, top]) rotate([180, 0, 0]) din168_cap(gl, top=top, ribs=48);
translate([100, 0, 0]) din168_bolt(gl, length=12, bore=64);

examples/gls80_cap.scad on GitHub


This site uses Just the Docs, a documentation theme for Jekyll.