Dach: getrennter Überstand Traufe/Ortgang (statt ringsum)

Bisher ein einziger overhang ringsum (Designdoc-Prio #2). Neu Roof.overhangGable
für den Ortgang (Giebelseite, entlang First); overhang gilt für die Traufe
(senkrecht zum First). Fehlt overhangGable, gilt ringsum overhang (rückwärts-
kompatibel). Geometrie mappt die Überstände je nach ridgeAxis auf die Outline-
Achsen. Panel: zweites Feld 'Überstand Ortgang' (ausser flach/zelt). +3 Tests.
672/672 grün.
This commit is contained in:
2026-07-10 02:10:03 +02:00
parent 4319e12e35
commit c9baff58b0
7 changed files with 58 additions and 9 deletions
+26
View File
@@ -154,4 +154,30 @@ describe("roofGeometry — Überstand", () => {
const bb = roofBBox(g.eaves);
expect(bb).toEqual({ x0: -0.5, y0: -0.5, x1: 6.5, y1: 4.5 });
});
it("getrennter Traufe/Ortgang-Überstand: First entlang X -> Ortgang weitet X, Traufe Y", () => {
// ridgeAxis "x": First entlang X -> Ortgang (Giebel) an den X-Enden,
// Traufe an den Y-Seiten. overhang(Traufe)=0.3, overhangGable(Ortgang)=0.8.
const g = roofGeometry(
roof({ shape: "sattel", ridgeAxis: "x", overhang: 0.3, overhangGable: 0.8 }),
E,
);
const bb = roofBBox(g.eaves);
expect(bb).toEqual({ x0: -0.8, y0: -0.3, x1: 6.8, y1: 4.3 });
});
it("getrennter Überstand: First entlang Y -> Ortgang weitet Y, Traufe X", () => {
const g = roofGeometry(
roof({ shape: "sattel", ridgeAxis: "y", overhang: 0.3, overhangGable: 0.8 }),
E,
);
const bb = roofBBox(g.eaves);
expect(bb).toEqual({ x0: -0.3, y0: -0.8, x1: 6.3, y1: 4.8 });
});
it("overhangGable fehlt -> ringsum gleich overhang (rückwärtskompatibel)", () => {
const g = roofGeometry(roof({ shape: "sattel", overhang: 0.4 }), E);
const bb = roofBBox(g.eaves);
expect(bb).toEqual({ x0: -0.4, y0: -0.4, x1: 6.4, y1: 4.4 });
});
});