import { type AnyNode, type AnyNodeId, type LevelNode, type RoofNode, type RoofSegmentNode, type SceneApi } from '@pascal-app/core'; /** * Where a roof drawn by hand goes, by core's rule for every roof writer (`planRoofLevel`): on the * level directly above the storey whose walls carry it, which over the top storey is the * building's roof level, created or declared in the same undo step as the roof. */ export type RoofLevelTarget = { levelId: LevelNode['id']; create: { node: AnyNode; parentId?: AnyNodeId; }[]; update: { id: AnyNodeId; data: Partial; }[]; /** The scene with the target written, to resolve the roof's elevation against. */ nodes: Readonly>; }; /** A roof drawn by hand, in the plan of the level it was drawn on: its footprint and form. */ export type DrawnRoof = { center: [number, number]; /** Along plan x and z (a cone: its diameter both ways). */ width: number; depth: number; roofType: string; }; /** The target of a roof carried by `storeyId`'s walls, `roofHeight` its rise over its eaves. */ export declare function roofLevelTarget(nodes: Readonly>, storeyId: LevelNode['id'], roofHeight: number): RoofLevelTarget; /** * The target of a roof drawn on the armed level: over that storey (`overStorey`), the level above * its walls; else the level itself (a porch on its posts, an empty upper level or the roof level, * already above what it covers). */ export declare function drawnRoofLevelTarget(nodes: Readonly>, levelId: LevelNode['id'], roofHeight: number, drawn: DrawnRoof): RoofLevelTarget; /** * How a roof drawn on the armed level stands: lifted onto the roof level over the armed storey, on * that storey's walls, following their height as a roof over a room does; anywhere else (a lower * wing's storey above, an empty level) on the level plane it was drawn on. */ export declare function drawnRoofSupport(target: RoofLevelTarget, armedLevelId: string): NonNullable; /** A roof's eave on the wall tops under it, read with the roof written into the target's scene. */ export declare function seatedRoofElevation(target: RoofLevelTarget, roof: RoofNode, segments: RoofSegmentNode[]): number; /** How far above the armed level a target sits (m), to draw the roof's ghost where it lands. */ export declare function roofLevelTargetOffset(target: RoofLevelTarget, armedLevelId: string): number; /** Writes a roof's nodes with its target level, in one step when the scene can. */ export declare function writeRoofNodes(sceneApi: SceneApi, target: RoofLevelTarget, ops: { node: AnyNode; parentId?: AnyNodeId; }[]): void; /** * A roof edit written through the seat every roof writer runs (`seatRoofs`): a segment added to a * roof held by a storey that puts it on that storey's walls takes the roof to the level above them, * in the same store call. */ export declare function writeSeatedRoofEdit(sceneApi: SceneApi, edit: { create?: { node: AnyNode; parentId?: AnyNodeId; }[]; update?: { id: AnyNodeId; data: Partial; }[]; }): void; /** * A roof edit from the plan or an inspector (a move, a turn, a resize, a field), committed through * the seat (`seatRoofs`) in one store call: an edit that puts a storey-held roof on its walls takes * it to the level above them, and the selection follows `selectId` there. */ export declare function commitSeatedRoofEdit(update: { id: AnyNodeId; data: Partial; }[], selectId: AnyNodeId): void; //# sourceMappingURL=roof-level-target.d.ts.map