release: SnapCAD Studio 1.0.10 (desktop menuler, macOS kisayollari, YakNet SSO)
Build and Push Docker Images / build (push) Canceled after 0s
Desktop Release / Build linux desktop (push) Canceled after 0s
Desktop Release / Build windows desktop (push) Canceled after 0s
Desktop Release / Attach packages to release (push) Canceled after 0s
Desktop Release / Build macos desktop (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s

This commit is contained in:
Enes Yakıştır
2026-11-12 10:12:35 +03:00
parent d5cc023856
commit ee28672e23
81 changed files with 10729 additions and 821 deletions
+23
View File
@@ -71,4 +71,27 @@ describe("Offset Tool Kernel (Ofset Aracı & Duvar Kalınlığı)", () => {
expect(walledProfile.points.length).toBe(8); // 4 outer + 4 inner wall points
expect(walledProfile.segments.length).toBe(8); // 4 outer + 4 inner segments
});
it("handles concave L-shaped polygon inset cleanly without inverted bowties (Clipper2)", () => {
const lShape: Point2D[] = [
{ x: 0, z: 0 },
{ x: 100, z: 0 },
{ x: 100, z: 30 },
{ x: 40, z: 30 },
{ x: 40, z: 100 },
{ x: 0, z: 100 },
];
const inset = offsetPolygon(lShape, -5);
expect(inset.length).toBeGreaterThanOrEqual(6);
expect(Math.abs(polygonSignedArea(inset))).toBeLessThan(Math.abs(polygonSignedArea(lShape)));
// Collapsing a narrow 20x20 square inward by -15mm returns empty cleanly
const small: Point2D[] = [
{ x: 0, z: 0 },
{ x: 20, z: 0 },
{ x: 20, z: 20 },
{ x: 0, z: 20 },
];
expect(offsetPolygon(small, -15)).toEqual([]);
});
});