Earbud Cord Winder
A flat bone-shaped spool for wired earbuds: wind the cord around the waist, then park the plug in one end notch and the buds in the other so nothing unwinds in a pocket or bag. Each notch has a round relief so the cord is not pinched. It is one sketch and one extrude, measures 70 x 28 x 4 mm and prints flat in minutes with no supports. Adjustable parameters: length, width, waist width, thickness and notch width.
# Earbud Cord Winder - a flat bone-shaped spool with a notch at each end for the plug and buds
#
# Wind the cord around the waist, then park the plug in one end notch and the earbuds
# in the other so nothing unwinds in a pocket. One sketch, one extrude: the outline is
# a bar with rounded lobes at both ends and a waist between them. Prints flat.
@param 50..90 step:5 desc:"Length (mm)"
$len = 70
@param 20..40 step:1 desc:"Width across the lobes (mm)"
$wid = 28
@param 10..24 step:1 desc:"Width of the waist the cord winds around (mm)"
$waist = 16
@param 3..6 step:0.5 desc:"Thickness (mm)"
$t = 4
@param 2..4 step:0.5 desc:"Notch width for the cord (mm)"
$notch = 3
$rl = $wid / 2 # lobe radius
$cx = $len / 2 - $rl # lobe centres
# outline: two round lobes joined by the waist bar, corners of the waist rounded
$outline = (circle $rl at:(-$cx, 0)) + (circle $rl at:($cx, 0)) + (rect (2 * $cx) $waist)
$body = $outline | extrude $t | edges =Z | fillet 2
# notches: a slot into each end along X, plus a round relief so the cord is not pinched
$slot = (rect 12 $notch at:($len / 2 - 5, 0)) + (circle ($notch / 2 + 0.6) at:($len / 2 - 11, 0))
$slots = ($slot + ($slot | mirror "X")) | extrude ($t + 2) | translate 0 0 -1
$winder = $body - $slots
assert $winder.solids == 1
assert $winder.bbox.x ~ $len
assert $winder.bbox.y ~ $wid
assert $winder.bbox.z ~ $t
assert $wid - $waist >= 8 # lobes stand 4 mm proud of the waist on each side
assert $winder.volume < $body.volume - 2 * 12 * $notch * $t * 0.9
print "winder" $winder.bbox
$winder