> Canonical HTML: https://kerfscript.mylasertools.com/models/tea-pavilion/

# 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.

This design has 7 parts on 1 sheet. Customize it in the [playground](https://kerfscript.mylasertools.com/playground/?model=tea-pavilion).

## Downloads

- [KerfScript source](https://kerfscript.mylasertools.com/models/tea-pavilion/tea-pavilion.kerf)
- [SVG](https://kerfscript.mylasertools.com/models/tea-pavilion/tea-pavilion.svg)
- [DXF](https://kerfscript.mylasertools.com/models/tea-pavilion/tea-pavilion.dxf)

## Parts

| Part | Quantity | Size |
| --- | ---: | --- |
| Floor | 1 | 79 × 74 mm |
| Dispensing end | 1 | 79 × 197 mm |
| Rear end | 1 | 79 × 197 mm |
| Side | 2 | 74 × 163 mm |
| Fixed roof | 1 | 62.7 × 90 mm |
| Lift-off roof | 1 | 62.7 × 90 mm |

## Settings

| Name | Default | Range or choices |
| --- | --- | --- |
| `packet_width` | `65` | 50 to 95 |
| `packet_depth` | `60` | 45 to 90 |
| `stack_height` | `160` | 90 to 250 |
| `ease` | `4` | 2 to 8 |
| `opening_height` | `24` | 18 to 36 |
| `roof_rise` | `34` | 22 to 60 |
| `overhang` | `8` | 4 to 15 |
| `window_detail` | `true` | on or off |
| `$thickness` | `3` | 2 to 6 |
| `$kerf` | `0.15` | 0 to 0.3 |

## Source

```kerf
// 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]);
```

Set power, speed and cut order in your laser software. See the [laser software guide](https://kerfscript.mylasertools.com/docs/compatibility/index.md).
