Bauteile: Fenster-Anschlag-Striche (Laibung, fein) analog zur Tür, mit Tests

This commit is contained in:
2026-07-05 21:42:40 +02:00
parent a92b583df8
commit 1c33232139
2 changed files with 41 additions and 0 deletions
+17
View File
@@ -147,3 +147,20 @@ describe("generatePlan — Tür-Typ wandoeffnung (Item 6)", () => {
expect(arcCount(def)).toBe(1);
});
});
/** Zählt Fenster-Anschlag-/Laibungsstriche (cls "window-frame") im Plan. */
function windowRevealCount(p: Project, detail: "grob" | "mittel" | "fein") {
return generatePlan(p, "eg", visible, undefined, detail).primitives.filter(
(pr) => pr.kind === "line" && pr.cls === "window-frame",
).length;
}
describe("generatePlan — Fenster Anschlag-Striche (Item 8)", () => {
it("erzeugt bei 'fein' zwei Laibungsstriche (je Pfosten einen)", () => {
expect(windowRevealCount(projectWithOpening({ ...baseWindow }), "fein")).toBe(2);
});
it("erzeugt bei 'mittel' KEINE (nur im Detailgrad fein)", () => {
expect(windowRevealCount(projectWithOpening({ ...baseWindow }), "mittel")).toBe(0);
});
});