feat: SnapCAD Studio'yu YakHub deposuna taşı
Build and Push Docker Images / build (push) Canceled after 0s
CI / Typecheck and unit tests (push) Canceled after 0s

- DWG/DXF içe aktarma ve .skf yeniden açma düzeltmeleri

- YakNet Bulut eşitlemede boş/eski kopya koruması ve yerel-only proje bildirimi

- Panelden içe aktarma duyuruları ve erişilebilir Türkçe hata mesajları

- AGPL-3.0 lisansı, README ve YakHub bağlantıları
This commit is contained in:
Enes Yakıştır
2026-10-25 18:20:21 +03:00
parent e9cb8e8681
commit 33b0940012
149 changed files with 46978 additions and 1273 deletions
+74
View File
@@ -0,0 +1,74 @@
import { describe, it, expect } from "vitest";
import {
generateFollowMeShape,
createProfileShape,
createSweepCurvePath,
FOLLOW_ME_PROFILE_PRESETS,
} from "@/lib/followMeKernel";
describe("Follow Me / Sweep Kernel (Beni Takip Et / Süpürme)", () => {
it("has complete preset profiles for architecture", () => {
expect(FOLLOW_ME_PROFILE_PRESETS.length).toBeGreaterThanOrEqual(6);
const ids = FOLLOW_ME_PROFILE_PRESETS.map((p) => p.id);
expect(ids).toContain("molding");
expect(ids).toContain("baseboard");
expect(ids).toContain("handrail");
expect(ids).toContain("pipe");
expect(ids).toContain("beam");
});
it("creates valid 2D shapes for all profile types", () => {
for (const preset of FOLLOW_ME_PROFILE_PRESETS) {
const shape = createProfileShape(preset.id, 20, 30, 3);
expect(shape.curves.length).toBeGreaterThan(0);
}
});
it("creates valid 3D sweep curve paths", () => {
const straightPath = createSweepCurvePath("straight", { pathLength: 150 });
expect(straightPath.curves.length).toBe(1);
const cornerPath = createSweepCurvePath("l-corner", { roomWidth: 100, roomDepth: 80 });
expect(cornerPath.curves.length).toBe(2);
const perimeterPath = createSweepCurvePath("perimeter", { roomWidth: 200, roomDepth: 150 });
expect(perimeterPath.curves.length).toBe(4);
});
it("generates a complete 3D WorkplaneShape with valid mesh data", () => {
const shape = generateFollowMeShape({
profileType: "molding",
pathPreset: "perimeter",
width: 25,
height: 30,
roomWidth: 200,
roomDepth: 150,
texture: "wood",
});
expect(shape.id).toBeDefined();
expect(shape.kind).toBe("mesh");
expect(shape.name).toContain("Kartonpiyer");
expect(shape.texture).toBe("wood");
expect(shape.importedMesh).toBeDefined();
expect(shape.importedMesh!.positions.length).toBeGreaterThan(100);
expect(shape.importedMesh!.normals?.length).toBeGreaterThan(100);
expect(shape.width).toBeGreaterThan(150);
expect(shape.depth).toBeGreaterThan(100);
});
it("supports straight pipe / handrail generation", () => {
const pipe = generateFollowMeShape({
profileType: "pipe",
pathPreset: "straight",
width: 20,
height: 20,
pathLength: 300,
texture: "metal",
});
expect(pipe.importedMesh).toBeDefined();
expect(pipe.width).toBeGreaterThan(250);
expect(pipe.texture).toBe("metal");
});
});