From 0a05dd483768aec7c0fd4fe8eb3faa0a583f13d0 Mon Sep 17 00:00:00 2001 From: "Azzam S.A" Date: Mon, 6 Jan 2025 09:30:40 +0700 Subject: [PATCH] fix(case): faster preview --- case/cheapino-bottom-left.scad | 3 +-- case/cheapino-bottom-right.scad | 4 +--- case/cheapino-top-left.scad | 2 +- case/cheapino-top-right.scad | 2 +- case/cheapino.scad | 2 +- case/hotswap.scad | 4 ++-- case/modules.scad | 1 - case/plate.scad | 4 ++-- 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/case/cheapino-bottom-left.scad b/case/cheapino-bottom-left.scad index 6d7244b..3d57ce5 100644 --- a/case/cheapino-bottom-left.scad +++ b/case/cheapino-bottom-left.scad @@ -3,14 +3,13 @@ use // height = 95.1738; // width = 132.6134; step = 0.05; -//$fn=30; // hotswap socket is ~1.75 high at the highest. // magsafe ring is 0.4 high // 2.5 will leave 0.35 at the thinnest(between hotswap and magsafe). -$fn=50; +$fn = $preview ? 10 : 50; // Rotate so you dont need to do that in extruder translate([0,0,2.5]) diff --git a/case/cheapino-bottom-right.scad b/case/cheapino-bottom-right.scad index a20a208..e44ca41 100644 --- a/case/cheapino-bottom-right.scad +++ b/case/cheapino-bottom-right.scad @@ -3,14 +3,12 @@ use // height = 95.1738; // width = 132.6134; step = 0.05; -//$fn=30; // hotswap socket is ~1.75 high at the highest. // magsafe ring is 0.4 high // 2.5 will leave 0.35 at the thinnest(between hotswap and magsafe). - -$fn=50; +$fn = $preview ? 10 : 50; // Rotate so you dont need to do that in extruder translate([0,0,2.5]) diff --git a/case/cheapino-top-left.scad b/case/cheapino-top-left.scad index 1cc6a33..d8ebbfe 100644 --- a/case/cheapino-top-left.scad +++ b/case/cheapino-top-left.scad @@ -1,7 +1,7 @@ height = 95.1738; width = 132.6134; step = 0.06; -$fn=50; +$fn = $preview ? 10 : 50; height_translation = 0; include diff --git a/case/cheapino-top-right.scad b/case/cheapino-top-right.scad index 98291a2..e12ab97 100644 --- a/case/cheapino-top-right.scad +++ b/case/cheapino-top-right.scad @@ -1,7 +1,7 @@ height = 95.1738; width = 132.6134; step = 0.06; -$fn=50; +$fn = $preview ? 10 : 50; height_translation = 0; include diff --git a/case/cheapino.scad b/case/cheapino.scad index 28e2a0d..99be9cc 100644 --- a/case/cheapino.scad +++ b/case/cheapino.scad @@ -1,7 +1,7 @@ height = 95.1738; width = 132.6134; step = 0.05; -$fn=30; +$fn = $preview ? 10 : 50; height_translation = 0; diff --git a/case/hotswap.scad b/case/hotswap.scad index fee9c63..ffcbe83 100644 --- a/case/hotswap.scad +++ b/case/hotswap.scad @@ -1,4 +1,4 @@ -//$fn=50; +$fn = $preview ? 10 : 50; module hotswap_mx() { thickness=1.85; @@ -170,4 +170,4 @@ hotswap_mx(); color("green") translate([0,0,0]) import("hotswap.stl"); - */ \ No newline at end of file + */ diff --git a/case/modules.scad b/case/modules.scad index 984baa8..117d9f3 100644 --- a/case/modules.scad +++ b/case/modules.scad @@ -1,4 +1,3 @@ -//$fn=50; pcb_thickness = 1.6; bottom_plate_thickness = 2.5; top_of_pcb = bottom_plate_thickness + pcb_thickness; diff --git a/case/plate.scad b/case/plate.scad index a4c8d13..6b00c55 100644 --- a/case/plate.scad +++ b/case/plate.scad @@ -1,5 +1,5 @@ -$fn=100; +$fn = $preview ? 10 : 100; height_translation = 0; @@ -10,4 +10,4 @@ module plate() } linear_extrude(1.6) - plate(); \ No newline at end of file + plate();