import { type Ring, type Vec2 } from '../source'; import type { FaceAttr, MeshBuilder } from './mesh'; import type { PartPlan } from './model'; import { boxCorners, type OrientedBox } from './poly'; export declare const PARAPET_M = 0.6; export declare const PARAPET_THICKNESS_M = 0.25; export declare const PITCH_DEG: { readonly hip: 30; readonly gable: 30; readonly pyramid: 40; readonly skillion: 10; }; export interface MassRings { outer: Ring; holes: Ring[]; } export interface RoofGeom { /** Top profile of the wall on edge `edge` of ring `ring` (0 = outer): (t along the edge, y) from p0 to p1. */ wallTop(ring: number, edge: number, p0: Vec2, p1: Vec2): Array<[number, number]>; emit(mb: MeshBuilder, attr: FaceAttr): void; } /** Rise of a pitched roof (hip, gable, pyramid) over a half-span, clamped to something a building can carry. */ export declare function pitchedRise(kind: 'hip' | 'gable' | 'pyramid', halfSpan: number, explicit: number | undefined, totalHeightCap: number | undefined): number; export declare function skillionRise(span: number, explicit: number | undefined, totalHeightCap: number | undefined): number; /** Inward mitre offset of a counter-clockwise (from above) ring; null when it would fold, vanish or self-intersect. */ export declare function insetRing(ring: Ring, distance: number): Ring | null; export declare const DOME_PROFILES: { /** y(r): height fraction at radius fraction r (0 = apex, 1 = base) of a spherical cap. */ readonly dome: (r: number) => number; /** An onion: bulges past the base circle, then pinches to a tip. */ readonly onion: (r: number) => number; }; /** A surface of revolution over an ellipse (semi-axes a, b along u and v). Smooth normals. */ export declare function emitLathe(mb: MeshBuilder, attr: FaceAttr, centre: Vec2, box: Pick, a: number, b: number, baseY: number, height: number, profile?: (r: number) => number, segments?: number, rings?: number): void; /** The semi-axes of the largest centred ellipse (along the box axes) that stays inside the footprint; null if tiny. */ export declare function domeFit(outer: Ring, holes: readonly Ring[], box: OrientedBox): { a: number; b: number; } | null; /** * Roof geometry for `part` drawn over `mass` (the box corners or the cleaned footprint). `parapet` is true for the near * level and false for the LOD1/far boxes, which are always a plain flat top. */ export declare function buildRoof(part: PartPlan, mass: MassRings, parapet: boolean): RoofGeom; export { boxCorners }; /** The plain flat top of the LOD1 and far boxes: no parapet, no pitch. */ export declare function flatTop(mass: MassRings, topY: number): RoofGeom;