Improve editor history, CAD tools, and ruler workflows

This commit is contained in:
Formsmith
2026-07-14 09:43:37 +03:00
parent 20731043e4
commit 400c4bf86e
23 changed files with 1727 additions and 388 deletions
+15
View File
@@ -0,0 +1,15 @@
import { describe, expect, it } from "vitest";
import { sphereTessellation } from "@/lib/sphereTessellation";
describe("sphere tessellation", () => {
it("uses the visible sphere Steps value for both rendering and boolean operands", () => {
expect(sphereTessellation(6)).toEqual({ widthSegments: 12, heightSegments: 6 });
expect(sphereTessellation(24)).toEqual({ widthSegments: 48, heightSegments: 24 });
expect(sphereTessellation(64)).toEqual({ widthSegments: 128, heightSegments: 64 });
});
it("uses the catalog default and normalizes fractional input", () => {
expect(sphereTessellation()).toEqual({ widthSegments: 48, heightSegments: 24 });
expect(sphereTessellation(27.6)).toEqual({ widthSegments: 56, heightSegments: 28 });
});
});