lini 0.22.0

Pretty diagrams, charts, and technical drawings from plain text, with fine-grained control. Compiles to clean, themeable SVG.
Documentation
// Sourced views [SPEC 15.8] on an A4 sheet: the front view carries the A–A
// cutting plane and a detail ring; `|drawing| { of: a }` authors the section
// (hatched walls, the bore reading between them), and `|drawing| { of: c }`
// re-renders the ringed port clipped to the circle, titled "C (3:1)" by
// composition — its own drafting ratio, `scale: 3`.
{
  |steel::sketch| { fill: hatch(45, 5); }
}

|page#sheet| { sheet: a4 landscape; gap: 24; align: origin; } [

  |drawing#front| "COOLING RING" { scale: 1; } [
    |oval#od| { width: 80; height: 80; fill: none; stroke: --stroke-dark; }
    |oval#bore| { width: 34; height: 34; fill: --bg; stroke: --stroke-dark; }
    |oval#port| {
      width: 8; height: 8; fill: --bg; stroke: --stroke-dark; pattern: radial(6, 28);
    }

    |plane#a| "A" { at: 0; }
    // a vertical plane, viewing right
    |magnifier#c| "C" { width: 15; translate: 0 -28; }
    // a port, ringed for detail

    od (o) { side: right; }
    // ⌀80 — clear of the vertical A–A
    bore (o) { side: left; }
    // ⌀34
  ]

  |drawing#sec| { of: a; scale: 1; } [
    |steel#wall| {
      draw: move(-40, -8) right(23) down(16) left(23) close();
      // the left ring wall
      mirror: y-axis;
      // → both walls (the bore between)
    }
    |centerline| { points: 0 -20, 0 20; }
    // the revolve axis

    wall:left (-) wall:right { side: bottom; }
    // 80 across
  ]

  |drawing#det| { of: c; scale: 3; }
  // the ringed port, re-laid ×3

]