release: publish v0.9.0 modeling update

This commit is contained in:
Formsmith
2026-08-02 17:38:53 +03:00
parent ab2f34aa80
commit c5f34422e4
28 changed files with 3099 additions and 402 deletions
+23
View File
@@ -1,6 +1,7 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { strFromU8, strToU8, unzipSync, zipSync } from "fflate";
import { editorHistoryEntry } from "@/lib/editorHistory";
import { placementWorkplaneFromSurface } from "@/lib/placementWorkplane";
import { projectAssetFromBytes } from "@/lib/projectAssets";
import { canonicalizeShape } from "@/lib/workplaneShapes";
import {
@@ -125,6 +126,28 @@ describe("SketchForge .skf project packages", () => {
expect(document.assets.filter((entry) => entry.kind === "derived-mesh")).toHaveLength(0);
});
it("preserves an oriented placement workplane", async () => {
const placementWorkplane = placementWorkplaneFromSurface(
{ x: 12, y: 8, z: -3 },
{ x: 1, y: 0, z: 0 },
{ x: 0, y: 1, z: 0 },
);
const sketchPlacementWorkplane = placementWorkplaneFromSurface(
{ x: -4, y: 6, z: 9 },
{ x: 0, y: 0, z: -1 },
{ x: 1, y: 0, z: 0 },
);
const exported = await exportSkfProject(input([shape("box")], {
placementElevation: 0,
placementWorkplane,
sketchPlacementWorkplane,
}));
const restored = await importSkfProject(exported);
expect(restored.placementWorkplane).toEqual(placementWorkplane);
expect(restored.sketchPlacementWorkplane).toEqual(sketchPlacementWorkplane);
});
it("preserves editable revolve sketch settings and generated geometry", async () => {
const revolve = shape("mesh", "revolve-sketch", {
name: "Sketch revolve",