chiark / gitweb /
utils, fairphone-case: move various things into utils
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 19:10:20 +0000 (19:10 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Jan 2018 19:10:20 +0000 (19:10 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad
utils.scad

index b78373c9303fc67e4b806fa29d912124056d6861..62048c83d3b7af673b9167177f03f10c64fe7436 100644 (file)
@@ -1,5 +1,7 @@
 // -*- C -*-
 
+include <utils.scad>
+
 phone = [ 75.0, 145.0 ];
 
 bumper = [ 0.250, -0.025 ];
@@ -139,17 +141,7 @@ hppM = [ epp4[0] - foldover_hinger_gap - hp_r2,
 hppT = hppM + 0.5 * [0,+1] * hp_k;
 hppB = hppM + 0.5 * [0,-1] * hp_k;
 
-module rectfromto(a,b) {
-  ab = b - a;
-  translate([min(a[0], b[0]), min(a[1], b[1])])
-    square([abs(ab[0]), abs(ab[1])]);
-}
-module circleat(c,r) { translate(c) circle(r); }
-module linextr(z0,z1) {
-  translate([0,0,z0])
-    linear_extrude(height=z1-z0)
-    children();
-}
+// ---------- modules ----------
 
 module KeeperProfile(slant=0){
   use_e = kppe + [0,-1] * slant * keeper_inner_width / keeper_slant_slope;
index 5234d5151e3023d2dda7eb81331884f88f73352c..6af49c493de8235e752d7de5f24c600d5c2ca08c 100644 (file)
@@ -24,3 +24,14 @@ module FArcSegment(xc,yc,inrad,outrad,alpha,delta) {
   }
 }
 
+module rectfromto(a,b) {
+  ab = b - a;
+  translate([min(a[0], b[0]), min(a[1], b[1])])
+    square([abs(ab[0]), abs(ab[1])]);
+}
+module circleat(c,r) { translate(c) circle(r); }
+module linextr(z0,z1) {
+  translate([0,0,z0])
+    linear_extrude(height=z1-z0)
+    children();
+}