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: add B-Rep STEP import with exact round-trip
Import STEP/STP files as tessellated mesh bodies (Tier 1) while retaining each body's exact OpenCascade B-Rep, normalized to the body's local frame (lib/stepImport). On STEP export, re-emit imported bodies from that stored B-Rep with the editor's placement reapplied via rigid kernel ops: rigid and uniform-scaled placements stay exact analytic geometry, and non-uniform resize degrades to valid B-splines (Tier 2). Closes import -> edit -> export. A shared lazy occt-wasm loader (lib/brepKernel) is reused by import and export so the kernel loads at most once per session, on first use.
This commit is contained in:
@@ -10,7 +10,12 @@ function fileExtension(fileName: string) {
|
||||
return fileName.split(".").pop()?.toLowerCase() ?? "";
|
||||
}
|
||||
|
||||
function importedShapeFromTriangleSoup(fileName: string, rawPositions: number[], rawNormals: number[] | undefined): WorkplaneShape {
|
||||
export function importedShapeFromTriangleSoup(
|
||||
fileName: string,
|
||||
rawPositions: number[],
|
||||
rawNormals: number[] | undefined,
|
||||
sourceFormat: NonNullable<WorkplaneShape["importedMesh"]>["sourceFormat"] = "stl",
|
||||
): WorkplaneShape {
|
||||
const geometry = new THREE.BufferGeometry();
|
||||
geometry.setAttribute("position", new THREE.Float32BufferAttribute(rawPositions, 3));
|
||||
if (rawNormals?.length === rawPositions.length) {
|
||||
@@ -55,7 +60,7 @@ function importedShapeFromTriangleSoup(fileName: string, rawPositions: number[],
|
||||
|
||||
return {
|
||||
id: createLocalId("uploaded-mesh"),
|
||||
name: fileName.replace(/\.[^.]+$/, "") || "Imported STL",
|
||||
name: fileName.replace(/\.[^.]+$/, "") || `Imported ${sourceFormat.toUpperCase()}`,
|
||||
kind: "mesh",
|
||||
color: "#0098c7",
|
||||
x: 10,
|
||||
@@ -74,7 +79,7 @@ function importedShapeFromTriangleSoup(fileName: string, rawPositions: number[],
|
||||
baseDepth: depth,
|
||||
baseHeight: height,
|
||||
triangleCount,
|
||||
sourceFormat: "stl",
|
||||
sourceFormat,
|
||||
},
|
||||
locked: false,
|
||||
hidden: false,
|
||||
|
||||
Reference in New Issue
Block a user