[217] Kern: Panic durch f64::clamp mit vertauschten/NaN-Grenzen behoben
wall_top_at (wall_piece_mesh, 3D, Exporte) klemmte die Oberkante auf [Unterkante, Unterkante + Höhe]; bei negativer/NaN-Höhe panikierte clamp und legte das WASM-Modul lahm. Neu jsnum::clamp_safe / ClampSafe (Grenzen tauschen, NaN wie JS); 28 weitere clamp-Aufrufe mit berechneten Grenzen umgestellt. Regressionstests in Rust und im Robustheitstest. TODO [217] angelegt.
This commit is contained in:
21 files changed
+120
-29
No files matched your search
@@ -362,6 +362,16 @@ describe("Kern robust gegen kaputte Projekte", () => {
|
||||
}, 240_000);
|
||||
}
|
||||
|
||||
it("[217] Wände mit negativer/NaN-Höhe unter dem Dach: 3D und Exporte ohne Kern-Panic", async () => {
|
||||
for (const h of [-3, NaN, 0, -1e300]) {
|
||||
const p = clone(richProject());
|
||||
for (const w of list(p, "walls")) w.height = h;
|
||||
for (const r of list(p, "roofs")) r.floorId = list(p, "walls")[0]?.floorId ?? r.floorId;
|
||||
const errors = await runAll(p as unknown as Project);
|
||||
expect(errors, `Höhe ${h}`).toEqual([]);
|
||||
}
|
||||
}, 120_000);
|
||||
|
||||
it("hängender Wandtyp: Plan wie mit dem Rückfall-Typ (kein Werfen, Wand bleibt sichtbar)", () => {
|
||||
const p = clone(sampleProject);
|
||||
p.walls[0].wallTypeId = "nope";
|
||||
|
||||
Reference in new issue
Block a user