Pet Food Scoop
A measuring scoop for dry pet food that holds exactly the volume you ask for when it is struck off level with the rim, so every meal is the same size. The bowl is a straight cylinder closing in a 45 deg cone to a small flat floor; its radius is solved from the volume, and the file builds the cavity as a plug solid from the finished part and asserts that it matches. The flat handle is flush with the rim, has a stiffening rib and a hanging hole, and carries the volume engraved on the face that looks up in use. The default 100 ml scoop is 155 x 65 x 47 mm. Print it upside down as laid out, rim and handle on the bed, with no supports: only the small floor is bridged. Parameters: volume (10 to 500 ml), bowl proportion, floor diameter, wall thickness, handle length and width, and the label.
# Pet Food Scoop - measuring scoop sized from a volume, flat handle with the volume engraved
#
# A scoop that holds exactly `volume_ml` when it is filled and struck off level with the rim,
# for feeding the same amount of dry food every time. The bowl is a straight cylinder that
# closes in a 45 deg cone to a small flat floor; its radius is solved from the volume:
# V = pi R^2 (k R) + pi/3 (R^3 - r0^3) => R^3 = (V + pi r0^3 / 3) / (pi (k + 1/3))
# with k = straight depth / radius and r0 = radius of the flat floor. The file then builds
# the cavity as a plug solid from the finished part and asserts its volume.
# The handle is flush with the rim, has a rib under it and a hanging hole, and carries the
# volume engraved on the face that looks up in use.
# Printing: as laid out, upside down - rim and handle flat on the bed, the cone closing at
# 45 deg and only the small floor bridged. No supports. The engraving is in the first layers.
@param 10..500 step:5 group:"Scoop" desc:"Volume level with the rim (ml)"
$volume_ml = 100
@param 0.3..2 step:0.1 group:"Scoop" desc:"Depth of the straight part of the bowl / bowl radius"
$aspect = 0.8
@param 6..40 step:1 group:"Scoop" desc:"Diameter of the flat floor, a printed bridge (mm)"
$floor_d = 20
@param 1.2..3 step:0.2 group:"Scoop" desc:"Wall thickness (mm)"
$wall = 2
@param 40..140 step:5 group:"Handle" desc:"Handle length beyond the bowl (mm)"
$handle_len = 90
@param 12..30 step:1 group:"Handle" desc:"Handle width (mm)"
$handle_w = 20
@param group:"Handle" desc:"Engrave the volume on the handle"
$label = true
# --- Bowl radius from the volume ----------------------------------------------------------------
$V = $volume_ml * 1000 # mm3
$r0 = $floor_d / 2
$R = (($V + pi * $r0 ** 3 / 3) / (pi * ($aspect + 1 / 3))) ** (1 / 3)
assert $R >= $r0 + 3 # the floor must be smaller than the bowl: lower floor_d
$hc = $aspect * $R # straight depth
$hk = $R - $r0 # cone depth at 45 deg
$depth = $hc + $hk
$e = 0.414 * $wall # keeps the cone wall as thick as the straight wall
$ro = $R + $wall
$H = $depth + $wall
# --- Bowl: one revolved profile, rim on the bed -------------------------------------------------
$bowl = workplane XZ | polyline [($R, 0), ($ro, 0), ($ro, $hc + $e), ($r0 + $e, $H), (0, $H), (0, $depth),
($r0, $depth), ($R, $hc)] | revolve Z
$envelope = workplane XZ | polyline [(0, 0), ($ro, 0), ($ro, $hc + $e), ($r0 + $e, $H), (0, $H)] | revolve Z
# --- Handle along +X, flush with the rim --------------------------------------------------------
$ht = 5 # handle thickness
$x0 = $R + $wall / 2 # starts inside the wall, not in the cavity
$x1 = $ro + $handle_len - $handle_w / 2 # centre of the round end
$hole_r = 3
$bar = box ($x1 - $x0) $handle_w $ht center:(false, true, false) | translate $x0 0 0
$tip = cylinder ($handle_w / 2) $ht | floor | translate $x1 0 0
$blank = $bar + $tip
$grip = $blank | edges >Z | fillet 1.5
$hang = cylinder $hole_r (3 * $ht) | translate $x1 0 0
# rib under the handle (above it on the bed), up the straight wall
$rib_t = 3
$rib_h = min(22, $hc - 2)
assert $rib_h >= 4
$rib = workplane XZ | polyline [($x0, $ht - 1), ($ro + $rib_h, $ht - 1), ($x0, $ht - 1 + $rib_h + $wall / 2)] | extrude $rib_t | translate 0 ($rib_t / 2) 0
$handle = $grip + $rib - $hang
# --- Engraved volume on the bed face of the handle ----------------------------------------------
# turned over about X so that it reads correctly from below, which is the top in use
$eng = 0.6
$txt_h = min(10, $handle_w - 8)
$t0 = text ("" + $volume_ml + " ml") $txt_h | extrude 1 | rotate 180 0 0
$lab_x = ($ro + 4 + $x1 - $hole_r - 4) / 2
$txt = $t0 | translate ($lab_x - $t0.bbox.center[0]) (-$t0.bbox.center[1]) ($eng - $t0.bbox.max[2])
assert $txt.bbox.x <= $x1 - $hole_r - $ro - 8 # the label fits between bowl and hole
assert $txt.bbox.y <= $handle_w - 4
$solid = $bowl + $handle
$scoop = if $label then ($solid - $txt) else $solid
# --- Checks -------------------------------------------------------------------------------------
$plug = $envelope - $solid # what the finished scoop holds, level with the rim
assert $plug.solids == 1
assert $plug.volume ~ $V tol:0.5% # the asked volume
assert $plug.bbox.z ~ $depth tol:0.01
assert $plug.bbox.x ~ 2 * $R tol:0.1%
assert clear($plug, $scoop)
assert $scoop.solids == 1
assert $scoop.bbox.min[2] ~ 0 tol:0.001 # rim and handle on the bed
assert $scoop.bbox.z ~ $H tol:0.01
assert $scoop.bbox.x ~ 2 * $ro + $handle_len tol:0.1
assert $scoop.bbox.y ~ 2 * $ro tol:0.1
print "bowl inner diameter (mm)" (2 * $R) "depth (mm)" $depth
print "cavity (ml)" ($plug.volume / 1000) "asked (ml)" $volume_ml
print "scoop" $scoop.bbox
$scoop