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
Add reversible edge tools and view cube fixes
This commit is contained in:
@@ -9,6 +9,9 @@ import {
|
||||
mirrorSign,
|
||||
normalizeDegrees,
|
||||
proportionalResizeScale,
|
||||
preservesEdgeTreatmentSize,
|
||||
resizedImportedCoordinates,
|
||||
resizedImportedMeshPositions,
|
||||
resizedShapeSize,
|
||||
serializeShapesForSync,
|
||||
shapeDepth,
|
||||
@@ -110,4 +113,34 @@ describe("workplane shape helpers", () => {
|
||||
expect(fallbackSolidColor(shape({ kind: "sphere" }))).toBe("#0098c7");
|
||||
expect(fallbackSolidColor(shape({ kind: "box" }))).toBe("#d41721");
|
||||
});
|
||||
|
||||
it("can resize the body while preserving fillet and chamfer boundary distances", () => {
|
||||
const modified = shape({
|
||||
kind: "mesh",
|
||||
width: 40,
|
||||
depth: 20,
|
||||
height: 40,
|
||||
edgeResizeMode: "preserve",
|
||||
edgeTreatments: [{ kind: "fillet", amount: 1, edgeCount: 1 }],
|
||||
importedMesh: {
|
||||
positions: [-10, 0, 0, -9, 1, 0, 0, 10, 0, 9, 19, 0, 10, 20, 0],
|
||||
baseWidth: 20,
|
||||
baseDepth: 20,
|
||||
baseHeight: 20,
|
||||
triangleCount: 1,
|
||||
sourceFormat: "json",
|
||||
},
|
||||
});
|
||||
|
||||
expect(preservesEdgeTreatmentSize(modified)).toBe(true);
|
||||
expect(resizedImportedMeshPositions(modified)).toEqual([
|
||||
-20, 0, 0,
|
||||
-19, 1, 0,
|
||||
0, 20, 0,
|
||||
19, 39, 0,
|
||||
20, 40, 0,
|
||||
]);
|
||||
expect(resizedImportedMeshPositions({ ...modified, edgeResizeMode: "scale" })[3]).toBe(-18);
|
||||
expect(resizedImportedCoordinates(modified, [-9, 1, 0, 9, 19, 0])).toEqual([-19, 1, 0, 19, 39, 0]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user