[330] Tests nach Antrittspunkt: DXF schreibt ihn als CIRCLE, Pfeil-Test zählt nur Dreiecke, CLI-Golden nachgeführt
check / check (push) Canceled after 0s
check / licenses (push) Canceled after 0s
check / e2e (push) Canceled after 0s
macos / native (push) Canceled after 0s

This commit is contained in:
Claude committed 2026-11-24 15:20:48 +00:00
1 parent a0e4290175
commit e7073d06a6
4 files changed
+9 -4

No files matched your search

+4 -1
View File
@@ -72,6 +72,9 @@ describe.skipIf(!hasEzdxf)("DXF-Export gegen ezdxf", { timeout: 60_000 }, () =>
});
const plan = generatePlan(world, "eg", new Set(flattenCategories(world.layers).map((l) => l.code)));
const r = ezdxfRead("demo-haus", buildPlanDxf(plan, world));
// [330] Antrittspunkt der Lauflinie: gefülltes 16-Eck einer Treppe, in der DXF als CIRCLE erkannt (arc_fit).
const isRunStartMark = (p: Extract<Plan["primitives"][number], { kind: "polygon" }>) => !!p.stairId && p.pts.length >= 12 && p.fill !== "none";
expect(r.result!.entities.filter((e) => e.type === "CIRCLE").length).toBeGreaterThanOrEqual(plan.primitives.filter((p) => p.kind === "polygon" && isRunStartMark(p)).length);
expect(r.result, r.err).not.toBeNull();
expect(r.result!.errors).toEqual([]);
expect(r.status).toBe(0);
@@ -80,7 +83,7 @@ describe.skipIf(!hasEzdxf)("DXF-Export gegen ezdxf", { timeout: 60_000 }, () =>
// Ohne unsichtbare Pick-Bänder und ohne Öffnungs-Polygone (Fensterrahmen liegen im Block, nicht im Modellbereich).
const polys = plan.primitives.filter(
(p): p is Extract<Plan["primitives"][number], { kind: "polygon" }> =>
p.kind === "polygon" && !p.openingId && !(p.stroke === "none" && p.fill === "none" && p.hatch.pattern === "none"),
p.kind === "polygon" && !p.openingId && !(p.stroke === "none" && p.fill === "none" && p.hatch.pattern === "none") && !isRunStartMark(p),
);
const ezPolys = r.result!.entities.filter((e) => e.type === "LWPOLYLINE");
expect(ezPolys.length).toBe(polys.length);
+2 -1
View File
@@ -27,8 +27,9 @@ function flatCounts(plan: Plan, project: Project): Record<string, number> {
}
/** Polygone, die der Export schreibt: unsichtbare Pick-Bänder (weder Füllung noch Umriss noch Schraffur) entfallen. */
// [330] Ohne den Antrittspunkt der Lauflinie (gefülltes 16-Eck einer Treppe): die DXF schreibt ihn als CIRCLE (arc_fit).
const visiblePolys = (polys: Extract<Plan["primitives"][number], { kind: "polygon" }>[]) =>
polys.filter((p) => !p.openingId && !(p.stroke === "none" && p.fill === "none" && p.hatch.pattern === "none" && p.hatch.kind !== "gradient"));
polys.filter((p) => !p.openingId && !(p.stroke === "none" && p.fill === "none" && p.hatch.pattern === "none" && p.hatch.kind !== "gradient") && !(p.stairId && p.pts.length >= 12 && p.fill !== "none"));
describe("DXF-Export (R2018 über acadrust)", () => {
// 1:50: Wände mit Schichten und Schraffur (ab 1:100 schwarz, [140]).