Gauge Plates
Three flat workshop gauges from one file, chosen by the kind parameter. The drill gauge is a 4 x 4 grid of holes from 1 to 10 mm: drop a bit in and read its size. The radius gauge has semicircular notches along the top edge for outside radii and tabs along the bottom edge for inside radii, R1 to R10. The thread-pitch gauge has nine combs of 60 degree teeth from 0.5 to 3 mm: hold one against a thread and the comb that meshes is the pitch. Every size is engraved next to its feature and each plate has a hanging hole. The drill plate measures 88 x 92 x 3 mm, the radius plate 134 x 46 x 3 mm and the pitch plate 94 x 32 x 3 mm; all print flat with no supports. Adjustable parameters: kind, plate thickness, engraving depth, drill hole play and comb length.
# Gauge Plates - drill, radius and thread-pitch gauges with engraved labels
#
# Three flat workshop gauges from one file, chosen by `kind`:
# drill - a 4 x 4 grid of holes from 1 to 10 mm: drop a bit in to read its size
# radius - semicircular notches along the top edge for outside radii (a rounded
# edge) and tabs along the bottom edge for inside radii, R1 to R10
# pitch - nine combs of 60 deg teeth, pitch 0.5 to 3 mm: hold one against a thread
# and the comb that meshes is the pitch
# Each size is engraved next to its feature. Every plate prints flat with no supports;
# the drill holes have a little play so a sharp bit of the nominal size drops in.
@param choices:["drill", "radius", "pitch"] desc:"Which gauge"
$kind = "drill"
@param 2..5 step:0.5 desc:"Plate thickness (mm)"
$t = 3
@param 0.3..1 step:0.1 desc:"Engraving depth of the labels (mm)"
$engrave = 0.5
@param 0..0.3 step:0.05 group:"Drill" desc:"Play added to each drill hole (mm, on the diameter)"
$hole_play = 0.1
@param 10..20 step:1 group:"Pitch" desc:"Length of each pitch comb (mm)"
$comb_len = 14
$hang_r = 2.5 # hanging hole in one corner
# a through hole from below the plate to above it (a centered cylinder would leave a skin on top)
def thru($r, $x, $y) = cylinder $r ($t + 2) at:($x, $y) center:(true, true, false) | translate 0 0 -1
# an engraved label: text extruded and sunk into the top face
def label($s, $size, $x, $y, $angle) = text $s $size at:($x, $y) angle:$angle | extrude ($engrave + 1) | translate 0 0 ($t - $engrave)
# --- Drill gauge ---------------------------------------------------------------
$drills = [1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 8, 9, 10]
$dp = 21 # grid pitch
$dw = 4 * $dp + 4
$dh = 4 * $dp + 8
$dx = [12 + ($i % 4) * $dp for $i in range(16)]
$dy = [$dh - 14 - floor($i / 4) * $dp for $i in range(16)]
$drill_holes = union [thru($drills[$i] / 2 + $hole_play / 2, $dx[$i], $dy[$i]) for $i in range(16)]
$drill_labels = union [label("" + $drills[$i], 3.5, $dx[$i], $dy[$i] - 8.5, 0) for $i in range(16)]
$drill_gauge = (box $dw $dh $t center:(false, false, false) | edges =Z | fillet 3)
- $drill_holes - $drill_labels - thru($hang_r, $dw - 6, $dh - 6)
# --- Radius gauge --------------------------------------------------------------
$radii = [1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10]
$rx = [7, 13.5, 21, 29.5, 39, 52, 65, 80, 98, 120] # centers: each feature 2r wide plus 4 mm
$rw = 134
$rh = 36
$notches = union [thru($radii[$i], $rx[$i], $rh) for $i in range(10)]
$tabs = union [cylinder ($radii[$i]) $t at:($rx[$i], 0) center:(true, true, false) for $i in range(10)]
$radius_labels = union [label("R" + $radii[$i], 2.6, $rx[$i], $rh / 2 + 4, 90) for $i in range(10)]
$radius_gauge = ((box $rw $rh $t center:(false, false, false)) + $tabs) - $notches - $radius_labels
- thru($hang_r, $rw - 5, 6)
# --- Thread pitch gauge ----------------------------------------------------------
$pitches = [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.5, 3]
$pw = 5 * ($comb_len + 4) + 4
$ph = 32
# one comb: V teeth (60 deg) cut into an edge; dir +1 points the teeth down from the top edge
def comb($p, $x0, $y, $dir) = union [polyline [($x0 + $k * $p, $y), ($x0 + ($k + 0.5) * $p, $y - $dir * 0.866 * $p), ($x0 + ($k + 1) * $p, $y)]
| extrude ($t + 2) | translate 0 0 -1 for $k in range(floor($comb_len / $p))]
$px = [4 + ($i % 5) * ($comb_len + 4) for $i in range(9)]
$top_combs = union [comb($pitches[$i], $px[$i], $ph, 1) for $i in range(5)]
$bot_combs = union [comb($pitches[$i], $px[$i], 0, -1) for $i in range(5, 9)]
$pitch_labels = (union [label("" + $pitches[$i], 3, $px[$i] + $comb_len / 2, $ph - 7, 0) for $i in range(5)])
+ (union [label("" + $pitches[$i], 3, $px[$i] + $comb_len / 2, 7, 0) for $i in range(5, 9)])
$pitch_gauge = (box $pw $ph $t center:(false, false, false)) - $top_combs - $bot_combs - $pitch_labels
- thru($hang_r, $pw - 6, 6)
# --- Checks --------------------------------------------------------------------
assert $drill_gauge.solids == 1
assert $radius_gauge.solids == 1
assert $pitch_gauge.solids == 1
assert $drill_gauge.bbox.z ~ $t
assert $radius_gauge.bbox.y ~ ($rh + 10) # the R10 tab hangs below the plate
assert $pitch_gauge.bbox.x ~ $pw
# the holes, notches and tabs are all the way through: the volumes add up
$hole_vol = $hang_r * $hang_r * pi * $t
$drill_vol = $t * pi * (0.25 + 0.5625 + 1 + 1.5625 + 2.25 + 3.0625 + 4 + 5.0625 + 6.25 + 7.5625 + 9 + 10.5625 + 12.25 + 16 + 20.25 + 25)
$half_r_vol = $t * pi / 2 * (1 + 2.25 + 4 + 6.25 + 9 + 16 + 25 + 36 + 64 + 100)
assert $drill_gauge.volume < $dw * $dh * $t - $drill_vol - $hole_vol
assert $radius_gauge.volume < $rw * $rh * $t - $hole_vol tol:0.5% # tabs and notches cancel; labels remain
assert $radius_gauge.volume > $rw * $rh * $t - $hole_vol - 40
assert $pitch_gauge.volume < $pw * $ph * $t - $hole_vol - 100
print "drill" $drill_gauge.bbox
print "radius" $radius_gauge.bbox
print "pitch" $pitch_gauge.bbox
if $kind == "drill" then $drill_gauge else if $kind == "radius" then $radius_gauge else $pitch_gauge