/** * One coherent glass-panel guard laid out along a rail path — a modern framed * glass balustrade in metres: a slim square post at each end (and every bay * ≤ 4 ft between), a flat cap over them, and one flat tempered-glass panel per * bay, point-fixed to its flanking posts by small edge clamps. It shares the * path sampling, corner finding and post stations in `guard-path.ts` with the * baluster, cable and deck guards, so a straight flight, a chained L/U landing * turn, a winder, a curved or spiral sweep and an integrated top landing all * read as the same glass rail; only the sections and the glass infill differ. * * The panels are the physical intent of a glass rail, not a fiction: a tempered * pane is rigid and flat, so on a curved or spiral sweep it cannot follow the * arc. Each panel is therefore a flat parallelogram spanning the straight chord * between two consecutive posts, with plumb vertical edges inset from each post * by a reveal gap and a top/bottom clearance to the cap and the nosing line. * Adjacent panels meet at a post with twice the reveal between them, never * sharing or crossing a vertex. On a straight flight the collinear posts make * those chords read as one plane. * * A flat chord between two posts on a curve lies inside the rail curve by its * sagitta — on the outer rail that is up to tens of centimetres toward the * treads, so a chord laid on the posts would push the pane well past the guard * line into the walking volume. When the caller supplies `insideWalk` (which * side of a point is the walkable surface), each bay measures how far its flat * chord sags toward that surface and shifts the whole pane — and its clamps — * radially outward by that sag plus the pane's half-thickness, so the pane's * walking-facing face sits at or outside the rail line across the entire bay. * The inner rail's chord sags into the void, away from the walkable surface, so * it is left on the line; a straight run has no sag; neither is shifted. The * frame is pure `GuardBox` data; the panels are the corner parametrics the * renderer extrudes with metre UVs. No Three.js. * * `reach` runs the cap that far past the top vertex along the final slope to die * into a post standing there; `topPost: false` then omits the top post. * `postThrough` runs the posts past the cap with a small cap of their own. */ import { type GuardBox, type GuardRail, type Vec3 } from './guard-path.js'; export type GlassGuardOptions = { railHeight: number; /** Metres between posts along the run; omit (or Infinity) for ends only. */ postSpacing?: number; topPost?: boolean; postThrough?: boolean; /** Metres the cap runs past the top vertex, along the final slope. */ reach?: number; /** Whether a horizontal point (in the path's frame) is on the walkable * surface. When given, a bay whose flat chord sags toward that surface shifts * its pane radially outward to keep the pane's face off the walking volume. */ insideWalk?: (x: number, z: number) => boolean; }; /** A flat glass panel spanning one bay, as the parallelogram the renderer * extrudes: `start` is its inset bottom corner on the nosing line, `yaw` the * plan heading of its chord, and the panel rises `rise` over `run` horizontally * with its lower and upper edges `bottom` and `top` above the nosing line. */ export type GlassPanel = { start: Vec3; yaw: number; run: number; rise: number; bottom: number; top: number; thickness: number; }; export type GlassGuard = { frame: GuardBox[]; panels: GlassPanel[]; }; /** The glass guard's single flat cap rail. Shared with the flight connector so a * bridge between flights carries the same cap as the guards it joins. */ export declare function glassGuardRails(railHeight: number): GuardRail[]; export declare function buildGlassGuard(points: Vec3[], options: GlassGuardOptions): GlassGuard; //# sourceMappingURL=glass-guard.d.ts.map