Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat: SnapCAD Studio'yu YakHub deposuna taşı
- 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:
@@ -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");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user