Child Safety Drawer Lock
A child-safety catch for a drawer or cabinet door with no metal spring: the latch is a printed flexure arm with a hook. It mounts inside the drawer front with two screws or strong double-sided tape, and the strike goes under the cabinet rail; the drawer then opens only 30 mm until the hook meets the strike lip, and an adult reaches through the gap and presses the arm down on the ribbed spot to release it. Closing needs nothing, the ramp of the hook snaps past the lip. The file computes the bending strain at the root of the arm from beam theory, both when pressed and when the hook is pushed down on closing, and asserts that it stays below 2 percent (0.8 percent by default); a stop finger under the pressing spot keeps the arm from being over-bent, and the caught and released positions are checked for collision against the strike. The latch is 109 x 52 x 16 mm and the strike 30 x 32 x 16 mm. Print the latch on its side so the layers run along the arm, and the strike flat with the lip up; no supports, PETG or PLA. Parameters: arm length and thickness, width, hook engagement, pressing spot, opening travel, lip drop and screw size.
# Drawer Lock - child-safety catch for a drawer or cabinet door: a printed flexure hook, press to release
#
# Two parts. The latch goes on the inside of the drawer front (two screws, or strong
# double-sided tape on the flat back of its pad) with its arm pointing into the cabinet and
# the hook up. The strike goes under the cabinet rail or worktop with its lip hanging down,
# `travel` in front of the hook. The drawer then opens only by `travel`: the hook meets the
# lip. Reach through the gap and press the arm down on the ribbed spot to let the hook pass
# under the lip. Closing needs nothing: the ramp of the hook rides under the lip and snaps up.
# A cabinet with a face frame can do without the strike if the hook reaches the frame.
#
# The arm is a cantilever of length L and thickness h. Beam theory gives the outer-fibre
# strain at its root:
# pressed at a, deflection ya there: strain = 3 ya h / (2 a^2)
# pushed at the hook, deflection d: strain = 3 d h / (2 L^2)
# A stop finger under the pressing spot limits ya, so the arm cannot be over-bent there;
# the gap is just large enough for the hook to drop clear. Both strains are asserted to
# stay below 2 percent.
# Printing: view = "print" - the latch on its side, so the layers run along the arm and the
# gap under it needs no support; the strike flat with the lip up. PETG or PLA.
@param 60..140 step:5 group:"Latch" desc:"Arm length, root to the catching face of the hook (mm)"
$arm_len = 90
@param 1.6..4 step:0.2 group:"Latch" desc:"Arm thickness in the bending direction (mm)"
$arm_t = 2.4
@param 10..30 step:1 group:"Latch" desc:"Width of the latch (mm)"
$width = 16
@param 3..10 step:0.5 group:"Latch" desc:"How far the hook overlaps the strike lip (mm)"
$engage = 6
@param 20..50 step:1 group:"Latch" desc:"Pressing spot, distance from the root of the arm (mm)"
$press_at = 30
@param 15..60 step:1 group:"Install" desc:"How far the drawer opens before the hook catches (mm)"
$travel = 30
@param 6..30 step:1 group:"Install" desc:"How far the strike lip hangs below its mounting face (mm)"
$drop = 12
@param 3..5 step:0.5 group:"Install" desc:"Screw diameter (mm)"
$screw_d = 3.5
@param choices:["print", "assembled"] group:"View" desc:"Print plate or installed position (drawer closed)"
$view = "print"
# --- Flexure numbers ----------------------------------------------------------------------------
$L = $arm_len
$h = $arm_t
$a = $press_at
$lip_gap = 0.8 # air between the arm and the lip
$hook_h = $engage + $lip_gap
$d_rel = $engage + 1 # hook deflection that frees it, with 1 mm to spare
assert $a + 25 <= $L # the pressing spot is on the arm, before the hook
# pressed at a: the arm is straight beyond a, so the hook drops (3L - a) / (2a) times as far
$ya_need = $d_rel * 2 * $a / (3 * $L - $a)
# the stop ends 3 mm past the pressing spot; the arm meets it there first
$over = 3
$stop_gap = $ya_need * (1 + 1.5 * $over / $a) + 0.3
$ya_max = $stop_gap / (1 + 1.5 * $over / $a)
$strain_press = 3 * $ya_max * $h / (2 * $a * $a)
$strain_close = 3 * $hook_h * $h / (2 * $L * $L)
$strain = max($strain_press, $strain_close)
assert $strain_press < 0.02 # 2 percent limit: thinner or longer arm, or press further out
assert $strain_close < 0.02
assert $ya_max >= $ya_need # the stop still lets the hook free
# when the hook is pushed down by the lip, the arm must not reach the stop
$xe = $a + $over
$y_stop_close = $hook_h * $xe * $xe * (3 * $L - $xe) / (2 * $L ** 3)
assert $y_stop_close < $stop_gap
$E = 2300 # MPa, PLA; PETG is about 2000
$I = $width * $h ** 3 / 12
$force = 3 * $E * $I * $ya_need / $a ** 3 # N, finger force to release
# --- Latch profile: X into the cabinet, Y up, extruded by the width -----------------------------
$pt = 5 # pad thickness
$root = $pt + 2 # the arm starts after a 2 mm gusset
$uc = $root + $L # catching face
$undercut = 0.6 # the face leans back, so a pull drives the hook into the lip
$ramp = ($hook_h - 0.8) / tan(30)
$tip = $uc + 2 + $ramp
$st = 6 # stop finger thickness
$v1 = -$stop_gap - $st - 10 # screw holes below the stop
$v2 = $v1 - 16
$pad_bot = $v2 - 8
$pad_top = $h + 3
$ua = $root + $a
def ext($pts) = polyline $pts | extrude $width
$pad = ext([(0, $pad_bot), ($pt, $pad_bot), ($pt, $pad_top), (0, $pad_top)])
$arm = ext([($pt - 1, 0), ($tip, 0), ($tip, $h), ($pt - 1, $h)])
$gusset_up = ext([($pt - 1, $h - 0.5), ($root, $h - 0.5), ($root, $h), ($pt, $h + 2), ($pt - 1, $h + 2)])
$gusset_dn = ext([($pt - 1, 0.5), ($root, 0.5), ($root, 0), ($pt, -1), ($pt - 1, -1)])
$hook = ext([($uc, $h - 0.5), ($uc - $undercut, $h + $hook_h), ($uc + 2, $h + $hook_h), ($tip, $h + 0.8), ($tip, $h - 0.5)])
$stop = ext([($pt - 1, -$stop_gap - $st), ($root + $xe, -$stop_gap - $st), ($root + $xe, -$stop_gap), ($pt - 1, -$stop_gap)])
def ridge($u) = ext([($u - 0.6, $h - 0.3), ($u + 0.6, $h - 0.3), ($u + 0.6, $h + 0.4), ($u - 0.6, $h + 0.4)])
$ridges = ridge($ua - 3) + ridge($ua) + ridge($ua + 3)
$hole_r = ($screw_d + 0.5) / 2
$csk_r = $screw_d
$csk_h = $csk_r - $hole_r
def screw_cut($v) = (cylinder $hole_r 30 | rotate 0 90 0 | translate 0 $v ($width / 2)) + (cone $hole_r $csk_r $csk_h | rotate 0 90 0 | translate ($pt - $csk_h / 2 + 0.01) $v ($width / 2))
$latch_solid = $pad + $arm + $gusset_up + $gusset_dn + $hook + $stop + $ridges
$latch = $latch_solid - screw_cut($v1) - screw_cut($v2)
# --- Strike: plate on the bed, lip up; X toward the hook, mounting face down --------------------
$sp_t = 4
$sp_len = 30
$lip_t = 5
$sw = $width + 16
$sy = $sw / 2 - 7
$strike_plate = box $sp_len $sw $sp_t center:(false, true, false) | edges =Z | fillet 3
$strike_lip = box $lip_t $width ($sp_t + $drop) center:(false, true, false) | translate ($sp_len - $lip_t) 0 0
def strike_cut($y) = (cylinder $hole_r 30 | translate 11 $y 0) + (cone $hole_r $csk_r $csk_h | translate 11 $y ($sp_t - $csk_h / 2 + 0.01))
$strike = $strike_plate + $strike_lip - strike_cut($sy) - strike_cut(-$sy)
# --- Installed position, drawer closed: Z up, drawer front at X = 0 -----------------------------
$latch_up = $latch | rotate 90 0 0 | translate 0 ($width / 2) 0
$strike_up = $strike | rotate 180 0 0 | translate ($uc - $undercut - $travel - $sp_len) 0 ($h + $lip_gap + $sp_t + $drop)
assert $uc - $travel - $lip_t >= $ua + 8 # closed, the lip is past the pressing spot: shorten travel
# pulled: the hook meets the lip. released: the arm turned down about its root, the hook passes
$pulled = $latch_up | translate (-$travel - 0.5) 0 0
$almost = $latch_up | translate (-$travel + 0.3) 0 0
$bent = $latch_up | rotate 0 (atan($d_rel / $L)) 0 origin:($root, 0, $h / 2)
$released = $bent | translate (-$travel - 8) 0 0
# --- Layout -------------------------------------------------------------------------------------
$strike_flat = $strike | translate 20 ($h + $hook_h + 6 + $sw / 2) 0
$plate = union [$latch, $strike_flat]
$installed = union [$latch_up, $strike_up]
$out = if $view == "print" then $plate else $installed
# --- Checks -------------------------------------------------------------------------------------
assert $latch.solids == 1
assert $strike.solids == 1
assert $latch.bbox.z ~ $width tol:0.01
assert $latch.bbox.min[2] ~ 0 tol:0.001
assert $latch.bbox.x ~ $tip tol:0.01
assert $latch.bbox.y ~ $h + $hook_h - $pad_bot tol:0.01
assert $strike.bbox.z ~ $sp_t + $drop tol:0.01
assert $strike.bbox.min[2] ~ 0 tol:0.001
# the gap under the arm is open: a feeler of the stop gap passes between arm and stop
$feeler = box ($xe - 4) ($stop_gap - 0.1) ($width + 2) center:(false, false, false) | translate ($root + 3) (-$stop_gap + 0.05) (-1)
assert clear($latch, $feeler)
# screws: the holes go through the pad and miss the stop
$pins = (cylinder ($screw_d / 2) 40 | rotate 0 90 0 | translate 0 $v1 ($width / 2)) + (cylinder ($screw_d / 2) 40 | rotate 0 90 0 | translate 0 $v2 ($width / 2))
assert clear($latch, $pins)
# the countersinks open toward the screwdriver: a thin head disc fits at the mouth of each hole
$head_l = cylinder ($csk_r - 0.3) 0.2 | rotate 0 90 0 | translate ($pt - 0.1) $v1 ($width / 2)
$head_s = cylinder ($csk_r - 0.3) 0.2 | translate 11 $sy ($sp_t - 0.1)
assert clear($latch, $head_l)
assert clear($strike, $head_s)
assert $latch.volume < $latch_solid.volume - 2 * pi * $hole_r * $hole_r * $pt * 0.99
# mechanism
assert clear($latch_up, $strike_up) # closed: nothing touches
assert clear($almost, $strike_up) # the drawer opens by the travel
assert ($pulled * $strike_up).volume > 0 # then the hook is on the lip
$bent_hook = $bent * (box 60 100 200 center:(false, true, true) | translate ($uc - 3) 0 0)
assert $bent_hook.bbox.max[2] <= $h + $hook_h - $d_rel + 0.5 # the hook top is now below the lip
assert clear($released, $strike_up) # pressed, the hook passes under the lip
assert clear($latch, $strike_flat)
assert $plate.solids == 2
assert $installed.solids == 2
print "strain pressed (%)" ($strain_press * 100) "strain closing (%)" ($strain_close * 100) "limit (%)" 2
print "stop gap (mm)" $stop_gap "hook drop needed (mm)" $d_rel "release force, PLA (N)" $force
print "latch" $latch.bbox
print "strike" $strike.bbox
print "installed" $installed.bbox
$out