Aquarium Tube Holder
A clip that hangs on the top edge of an aquarium glass and keeps air lines or filter hoses in place. A U-shaped hook sized from the glass thickness drops over the rim, and a row of C clips on the inside leg holds one to six tubes running straight down along the glass. Each clip mouth is a set fraction of the tube diameter (85 percent by default), so the tube snaps in and cannot leave without spreading the arms; the model checks this with tube probes, checks that the glass enters the slot, and prints an estimate of the snap strain. With the defaults (6 mm glass, two 6 mm airline tubes) it is 19.1 x 17.2 x 30.4 mm. Print it as modelled, upside down with the bridge on the bed and no supports; PETG is a good choice for something that lives next to water. Glass thickness, slot play, tube diameter and count, mouth fraction, arm thickness, clip height, wall and leg lengths can be changed.
# Aquarium Tube Holder - rim clip that holds air or water tubes in snap-in C clips
#
# How it is used: the U-shaped hook drops over the top edge of the tank glass,
# long leg outside, short leg inside. A row of C clips sits on the inside leg at
# rim height, mouths facing into the tank. Push each tube sideways into a clip:
# the mouth is `open_frac` of the tube diameter, so the arms spread and close
# behind it, and the tube runs straight down along the glass. Above the clip the
# tube bends over the rim across the top of the hook.
#
# Print orientation: as modelled, which is upside down: the bridge that rests on
# the rim lies on the bed, both legs and the clips stand up from it. No supports,
# and the clip arms bend in the plane of the layers.
@param 3..20 step:0.5 group:"Tank" desc:"Glass thickness (mm)"
$glass_t = 6
@param 0.1..1 step:0.05 group:"Tank" desc:"Slot width minus glass thickness (mm)"
$slot_play = 0.4
@param 4..25 step:0.5 group:"Tubes" desc:"Tube outer diameter (mm): 6 for standard airline, 16 or 22 for filter hose"
$tube_d = 6
@param 1..6 step:1 group:"Tubes" desc:"Number of tubes"
$count = 2
@param 0.7..0.95 step:0.01 group:"Tubes" desc:"Clip mouth as a fraction of the tube diameter"
$open_frac = 0.85
@param 0..0.5 step:0.05 group:"Tubes" desc:"Radial play of the seated tube (mm)"
$tube_play = 0.1
@param 1.2..3 step:0.1 group:"Clip" desc:"Clip arm thickness (mm)"
$arm_t = 1.2
@param 4..20 step:1 group:"Clip" desc:"Clip height along the tube (mm)"
$clip_h = 8
@param 1.6..4 step:0.2 group:"Hook" desc:"Wall thickness of the bridge and legs (mm)"
$wall = 2.4
@param 10..60 step:1 group:"Hook" desc:"Outside leg length below the rim (mm)"
$outer_len = 28
@param 6..60 step:1 group:"Hook" desc:"Inside leg length below the rim (mm)"
$inner_len = 14
@param 12..60 step:1 group:"Hook" desc:"Least hook width along the rim (mm)"
$min_w = 16
# --- Derived (X along the rim, Y across the glass with the tank at +Y, Z = down in use) ---
$slot = $glass_t + $slot_play
$ri = $tube_d / 2 + $tube_play # clip bore
$ro = $ri + $arm_t
$rm = $ri + $arm_t / 2 # mean radius of the arms
$opening = $open_frac * $tube_d # clear gap between the rounded tips
$tip_r = $arm_t / 2
$tx = $opening / 2 + $tip_r # tip centres, on the mean radius
$tyo = sqrt($rm * $rm - $tx * $tx) # their distance from the bore centre, toward the tank
$alpha = asin($tx / $rm) # tip angle from the mouth direction
$yf = $slot / 2 + $wall # tank-side face of the inside leg
$web = max(0.4, $arm_t - $wall + 1) # between the bore and that face: the ring bites at most wall - 1 into the leg
$cy = $yf + $web + $ri # bore centres
$bw = 1.3 * $ro # root block that joins each ring to the leg
$beta = asin($bw / 2 / $ro) # where the arms leave the block
$bh = $cy - $yf - $ro * cos($beta) + 0.3
$spread = $tube_d - $opening # how far a mouth opens, both arms together
$pitch = 2 * $ro + $spread + 1 # neighbouring arms never touch when both spread
$w = max($min_w, ($count - 1) * $pitch + 2 * $ro)
$depth = $slot + 2 * $wall # hook size across the glass
# snap strain, an estimate for a tube that does not give at all: each arm as a
# cantilever of the arm's arc length L, thickness t, tip deflection spread / 2
$arm_len = $rm * radians(180 - $alpha - $beta)
$strain = 3 * $arm_t * ($spread / 2) / (2 * $arm_len * $arm_len)
assert $opening < $tube_d # it snaps: the mouth is narrower than the tube
assert $tx < $rm
assert $arm_t - $web <= $wall - 0.99 # the rings bite into the leg but leave its glass side whole
assert $clip_h <= $wall + $inner_len # the clips are no taller than the leg they stand on
assert $outer_len >= $inner_len
assert $strain <= 0.05 # soft tube squeezes too, so this is the worst case
# --- Hook: bridge on the bed, two legs standing on it ---------------------------
$bridge = box $w $depth $wall | floor
def leg($y, $len) = box $w $wall ($wall + $len) | floor | translate 0 $y 0
$hook = ($bridge + leg(-($slot + $wall) / 2, $outer_len)) + leg(($slot + $wall) / 2, $inner_len)
# --- One clip: 2D profile with the mouth toward +Y, extruded along the tube -----
def clip($cx) = (((circle $ro at:($cx, $cy)) - (circle $ri at:($cx, $cy))
- (polyline [($cx, $cy), ($cx - 4 * $tx, $cy + 4 * $tyo), ($cx + 4 * $tx, $cy + 4 * $tyo)]))
+ (circle $tip_r at:($cx - $tx, $cy + $tyo)) + (circle $tip_r at:($cx + $tx, $cy + $tyo))
+ ((rect $bw $bh at:($cx, $yf + $bh / 2 - 0.3)) - (circle $ri at:($cx, $cy)))) | extrude $clip_h
$xs = [($i - ($count - 1) / 2) * $pitch for $i in range($count)]
$clips = union [clip($x) for $x in $xs]
$part = $hook + $clips
assert $part.solids == 1
assert $part.valid
assert $part.bbox.x ~ $w tol:0.01
assert $part.bbox.z ~ $wall + $outer_len tol:0.01
assert $part.bbox.min[2] ~ 0 tol:0.001
assert $part.bbox.y ~ $depth + $web + $ri + $tyo + $tip_r tol:0.02
assert $part.volume > $hook.volume + $count * 0.5 * pi * ($ro * $ro - $ri * $ri) * $clip_h # every clip is there
# --- Fit, checked with a glass pane and tubes -----------------------------------
def pane($t) = box ($w + 20) $t ($outer_len + 20) | floor | translate 0 0 $wall
assert clear(pane($glass_t), $part) # the glass enters the slot
assert clear(pane($slot + 0.2), $part) == false # and the slot is the computed width
assert clear(pane($glass_t) | translate 0 0 -0.2, $part) == false # the bridge rests on the rim
def tube($dia, $x, $y) = cylinder ($dia / 2) ($outer_len + 20) | translate $x $y 0
$x0 = $xs[0]
$tubes = union [tube($tube_d, $x, $cy) for $x in $xs]
assert clear($tubes, $part) # every tube seats
assert clear($tubes, pane($glass_t)) # beside the glass, not in it
assert clear(tube($tube_d, $x0, $cy + $tube_play + 0.3), $part) == false # the arms close over it
assert clear(tube($tube_d, $x0 + $tube_play + 0.3, $cy), $part) == false
assert clear(tube($tube_d, $x0, $cy + $tyo), $part) == false # it cannot leave without spreading the mouth
assert clear(tube($opening - 0.1, $x0, $cy + $tyo), $part) # the mouth is the computed opening
assert clear(tube($opening + 0.2, $x0, $cy + $tyo), $part) == false
print "holder" $part.bbox "slot (mm)" $slot
print "tube" $tube_d "x" $count "mouth opening (mm)" $opening "clip pitch (mm)" $pitch
print "snap strain estimate for a rigid tube (%)" ($strain * 100)
$part