chiark / gitweb /
utils, fairphone-case: move various things into utils
[reprap-play.git] / fairphone-case.scad
index 7bcbec3f32739203454ec5af52ff703b5ac92a66..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;
@@ -477,11 +469,23 @@ module Lid(){ ////toplevel
   }
 }
 
+module TestSelectLength(){
+  translate([-30, -200, -20])
+    cube([30 + 15, 250, 40]);
+}
+
 module TestLength(){ ////toplevel
   intersection(){
     Case();
-    translate([-30, -200, -20])
-    cube([30 + 15, 250, 40]);
+    TestSelectLength();
+  }
+}
+
+module TestLengthRight(){ ////toplevel
+  intersection(){
+    Case();
+    CaseBase_rhsflip(1)
+      TestSelectLength();
   }
 }