Models / Tea pavilion dispenser

Tea pavilion dispenser

Tea pavilion: a packet dispenser with a plain gable roof and a front lip. Packet width, depth and stack height generate the enclosure dimensions. Assembly: glue the wall and floor joints, then glue one roof slope in place. Leave the other slope loose for refilling from above.

Download size: 535.4 × 203.2 mm. 7 parts on 1 sheet.

Source 56 lines

// Tea pavilion: a packet dispenser with a plain gable roof and a front lip.
// Packet width, depth and stack height generate the enclosure dimensions.
// Assembly: glue the wall and floor joints, then glue one roof slope in
// place. Leave the other slope loose for refilling from above.
 
/* [Packets] */
packet_width = 65; // [50:1:95]
packet_depth = 60; // [45:1:90]
stack_height = 160; // [90:5:250]
ease = 4; // [2:0.5:8]
opening_height = 24; // [18:1:36]
 
/* [Roof] */
roof_rise = 34; // [22:2:60]
overhang = 8; // [4:1:15]
window_detail = true;
 
/* [Material] */
$thickness = 3; // [2:0.5:6]
$kerf = 0.15; // [0:0.01:0.3]
 
/* [Hidden] */
$material = "plywood";
t = $thickness;
w = packet_width + 2 * ease + 2 * t;
d = packet_depth + 2 * ease + 2 * t;
h = stack_height + t;
angle = atan(2 * roof_rise / w);
slant = w / 2 / cos(angle);
extra = overhang / cos(angle);
assert(opening_height < h / 2, "Dispensing opening must stay below mid-height");
module end(front = false) {
  difference() {
    union() {
      finger_rect([w, h], ["in", "out", "flat", "out"]);
      polygon([[0, h - 0.1], [w, h - 0.1], [w / 2, h + roof_rise]]);
    }
    if (front) translate([w * 0.16, t + 6]) rect([w * 0.68, opening_height], r = 5);
  }
  if (window_detail) score() translate([w / 2, h * 0.65]) {
    outline() rect([w * 0.34, h * 0.22], center = true, r = 3);
    line([-w * 0.17, 0], [w * 0.17, 0]);
    line([0, -h * 0.11], [0, h * 0.11]);
  }
}
step("Glue the ends and sides into the floor") {
  part("Floor", at = [0, 0, 0]) finger_rect([w, d], "out");
  part("Dispensing end", at = [0, t, 0], rotate = [90, 0, 0]) end(true);
  part("Rear end", at = [0, d, 0], rotate = [90, 0, 0]) end(false);
  part("Side", qty = 2, at = [[0, 0, 0], [w - t, 0, 0]], rotate = [90, 0, 90])
    finger_rect([d, h], ["in", "in", "flat", "in"]);
}
step("Glue one roof slope in place")
  part("Fixed roof", at = [-overhang, -overhang, h - overhang * tan(angle)], rotate = [0, -angle, 0]) rect([slant + extra, d + 2 * overhang]);
step("Lay the other slope on top, loose for refilling")
  part("Lift-off roof", at = [w / 2, -overhang, h + roof_rise], rotate = [0, angle, 0]) rect([slant + extra, d + 2 * overhang]);