Tape Dispenser
A one-piece desk tape dispenser sized from the roll: a side plate with a spindle for the core, a foot bar along the bottom and a front wall whose top edge is a comb of cutting teeth. The roll slides onto the spindle from the open side and clicks past a small lip at the tip; pull the tape over the teeth and tear down. The file checks that a full roll clears the foot, the wall and the teeth. The default takes 18 mm tape on a 25.4 mm core up to a 70 mm roll and measures 88 x 85 x 23 mm. It is modelled on its side and prints that way, side plate on the bed, with no supports. Adjustable parameters: tape width, core and roll diameter, spindle play, tooth pitch and height.
# Tape Dispenser - one-piece desk dispenser with a serrated blade, sized from the roll
#
# A side plate with a spindle for the roll, a foot bar along the bottom and a front
# wall whose top edge is a comb of cutting teeth. The roll slides onto the spindle from
# the open side and clicks past a small lip at the tip. Pull the tape over the teeth
# and tear down. Modelled and printed on its side: the side plate lies on the bed, the
# spindle, the foot and the toothed wall stand up from it, so no supports are needed.
@param 10..25 step:1 group:"Roll" desc:"Tape width (mm)"
$tape_w = 18
@param 20..40 step:0.5 group:"Roll" desc:"Inner diameter of the tape core (mm)"
$core_d = 25.4
@param 40..90 step:5 group:"Roll" desc:"Outer diameter of a full roll (mm)"
$roll_d = 70
@param 0.3..1 step:0.1 group:"Fit" desc:"Play between spindle and core (mm, on the diameter)"
$play = 0.6
@param 0.6..1.5 step:0.1 group:"Blade" desc:"Tooth pitch (mm)"
$tooth_p = 1
@param 0.8..2 step:0.1 group:"Blade" desc:"Tooth height (mm)"
$tooth_h = 1.2
$plate_t = 3
$foot_h = 6 # foot bar height (in use: thickness of the base)
$depth = $tape_w + 6 # Z extent of foot and front wall
$ra = $core_d / 2 - $play / 2 # spindle radius
$rr = $roll_d / 2
$xa = $rr + 5 # spindle centre
$ya = $rr + $foot_h + 3
$xf = $xa + $rr + 10 # front wall (blade) x position
$len = $xf + 3
$hgt = $ya + $rr + 6 # plate height
$y_blade = $ya + 8 # blade edge height
# --- Side plate, foot bar, front wall ---
$plate = box $len $hgt $plate_t center:(false, false, false) | edges =Z | fillet 8
$foot = box $len $foot_h $depth center:(false, false, false)
$front = box 3 ($y_blade - $tooth_h) $depth center:(false, false, false) | translate ($len - 3) 0 0
# teeth: triangles in the YZ plane along the top of the front wall, extruded through its thickness
$nt = floor(($depth - 1) / $tooth_p)
$tooth = polyline [(0, $y_blade - $tooth_h - 0.01), ($tooth_p, $y_blade - $tooth_h - 0.01), ($tooth_p / 2, $y_blade)]
| extrude 3 | rotate 0 90 0 | translate ($len - 3) 0 $tooth_p # profile x -> -Z (pitch), y -> Y, extrusion -> X
$teeth = union [$tooth | translate 0 0 (0.5 + $k * $tooth_p) for $k in range($nt)]
# spindle with a retaining lip at the tip
$spindle = (cylinder $ra ($plate_t + $tape_w + 1.5) center:(true, true, false))
+ (cone ($ra + 0.5) ($ra - 0.5) 1.5 center:(true, true, false) | translate 0 0 ($plate_t + $tape_w + 0.5))
| translate $xa $ya 0
$body = $plate + $foot + $front + $teeth + $spindle
# --- Checks: a full roll on the spindle clears the foot, the wall and the teeth ---
$roll = (cylinder $rr $tape_w center:(true, true, false)) - (cylinder ($core_d / 2) ($tape_w + 2) center:(true, true, false) | translate 0 0 -1)
| translate $xa $ya ($plate_t + 0.5)
assert clear($roll, $body)
assert $ya - $rr >= $foot_h + 2
assert $xf - 3 - ($xa + $rr) >= 5
assert $body.solids == 1
assert $body.bbox.x ~ $len
assert $body.bbox.z ~ ($plate_t + $tape_w + 3) # spindle plus its retaining lip
assert $nt >= 10
print "dispenser" $body.bbox
print "teeth" $nt
$body