Aufgestauter Arbeitsstand: Stiftsätze, Bulge/Bögen, neue 2D-Befehle, Geo/Import-Fixes, Dach-Schnittfugen 3D

Sammel-Commit für mehrere Wochen Arbeit seit dem letzten Commit-Stand
(22.8.) — Details je Fund/Feature stehen datiert in PENDENZEN.md.

- Stiftsatz-System (ArchiCAD-Stiftsatz-Vorbild): Bauteile/Ebenen/Element-
  Overrides wahlweise auf freie Farbe oder Stift+Stärke gekoppelt, eigene
  Palette-UI, 255-Stift-Standardpalette.
- Wand-"+"-Kreuzung: vierte Wand an einem Knoten wurde nicht mitverschnitten
  (model/joins.ts).
- 2D-Grundriss: Schnitt-vs-Ansicht-Entscheidung berücksichtigt jetzt
  wall.bottom/top-Override statt nur der rohen Wandhöhe.
- Bulge/Bogensegmente in Polylinien (geometry/bulge.ts) inkl. Trim/Extend/
  Offset/Fillet-Unterstützung.
- Neue 2D-Befehle: Block/Blockdefinition, Leader, Polygon, Textpfad, Xline.
- Kontext-Objekt-Kategorien (Ebenen-Zuordnung für importierte Gebäude/
  Terrain-Meshes).
- Element-Zwischenablage (Kopieren/Einfügen) für alle 3D-Elementarten.
- swissBUILDINGS3D/DXF-Import-Fixes (Polyface-Mesh-Absturz, Georeferenzierung,
  anwählbare Kontext-Meshes im 3D-Viewport).
- Dach-Schnittfugen im 3D-Live-Schnitt (render3d: roof_cut.rs neu).
- Diverse kleinere Fixes/Ergänzungen in Grundriss-, Schnitt-, Ansichts- und
  3D-Pipeline (siehe PENDENZEN.md für Einzelheiten).

Verifiziert: tsc --noEmit sauber, vitest run 117/1206 grün,
cargo test --package render3d 96/96 grün.
This commit is contained in:
karim committed 2026-09-10 15:40:04 +02:00
1 parent 91908b1456
commit ef40091f6d
136 files changed
+11109 -665

No files matched your search

+42
View File
@@ -38,6 +38,48 @@ function line(id: string, x: number): Drawing2D {
};
}
describe("commitTransform — mirror kehrt das Bulge-Vorzeichen einer Polylinie um", () => {
it("Spiegelung an der X-Achse negiert bulge (sonst wandert der Bogen auf die falsche Seite)", () => {
const poly: Drawing2D = {
id: "d-poly",
type: "drawing2d",
levelId: "eg",
categoryCode: "20",
geom: {
shape: "polyline",
pts: [{ x: 0, y: 2 }, { x: 4, y: 2 }],
closed: false,
bulge: [0.6],
},
};
const p = project([poly]);
const sel: TransformSelection = { wallIds: [], drawingId: "d-poly", drawingIds: ["d-poly"] };
// Spiegelachse = X-Achse (y=0).
const next = commitTransform(p, sel, "mirror", [{ x: 0, y: 0 }, { x: 1, y: 0 }], "move", 1);
const g = next.drawings2d[0].geom;
expect(g.shape).toBe("polyline");
if (g.shape === "polyline") {
expect(g.pts).toEqual([{ x: 0, y: -2 }, { x: 4, y: -2 }]);
expect(g.bulge?.[0]).toBeCloseTo(-0.6, 6);
}
});
it("reine Verschiebung (move) lässt bulge unverändert (keine Orientierungsumkehr)", () => {
const poly: Drawing2D = {
id: "d-poly",
type: "drawing2d",
levelId: "eg",
categoryCode: "20",
geom: { shape: "polyline", pts: [{ x: 0, y: 0 }, { x: 4, y: 0 }], closed: false, bulge: [0.6] },
};
const p = project([poly]);
const sel: TransformSelection = { wallIds: [], drawingId: "d-poly", drawingIds: ["d-poly"] };
const next = commitTransform(p, sel, "move", [{ x: 0, y: 0 }, { x: 2, y: 3 }], "move", 1);
const g = next.drawings2d[0].geom;
if (g.shape === "polyline") expect(g.bulge?.[0]).toBeCloseTo(0.6, 6);
});
});
describe("commitTransform — Mehrfachauswahl (drawingIds)", () => {
it("move: verschiebt ALLE gewählten 2D-Elemente, nicht nur eines", () => {
const p = project([line("d1", 0), line("d2", 5), line("d3", 10)]);