Editieren im Schnitt: Cut-Polygone tragen die Quell-Element-Id
toSection loest je Cut-Band die Quell-Element-Id (Wand/Decke/Dach) ueber die Besitzer-Listen auf (cp.sourceId) und propagiert sie durch Schicht-Zerlegung, Terminierung und Boolean-Dominanz. generateSectionPlan schreibt sie je component.kind als wallId/ceilingId/roofId ans Plan-Polygon — ein Klick im Schnitt waehlt damit exakt jenes Bauteil im Modell (bestehende PlanView-Pick-/ Highlight-Logik greift), das Attribut-Panel editiert OK/UK/Hoehe, der Schnitt rechnet neu. Tests fuer Mapping + sourceId-Propagation.
This commit is contained in:
@@ -112,6 +112,13 @@ describe("splitWallLayers: Aussenputz auf der Aussenseite, Wände spiegelverkehr
|
||||
expect(bands[3].width).toBeCloseTo(RENDER_EXT_T, 6);
|
||||
});
|
||||
|
||||
it("propagiert sourceId (Quell-Element) auf ALLE Schicht-Bänder", () => {
|
||||
const cpWithId: SectionCutPolygon = { ...cp, sourceId: "W2" };
|
||||
const bands = splitWallLayers(cpWithId, sampleProject, aw, wall("W2"), uWorld);
|
||||
expect(bands.length).toBeGreaterThan(1);
|
||||
expect(bands.every((b) => b.sourceId === "W2")).toBe(true);
|
||||
});
|
||||
|
||||
it("W2 und W4 liegen spiegelverkehrt (nicht identisch)", () => {
|
||||
const b2 = bandsByU(splitWallLayers(cp, sampleProject, aw, wall("W2"), uWorld));
|
||||
const b4 = bandsByU(splitWallLayers(cp, sampleProject, aw, wall("W4"), uWorld));
|
||||
|
||||
Reference in New Issue
Block a user