chiark / gitweb /
simplephone-case: thinner, done
[reprap-play.git] / simplephone-case.scad
index caf465e496b3d2a20b80dcb414cc36d5f390f946..95593388de4bb6fdd04dcdcdc7e0333e834dcdf0 100644 (file)
@@ -9,7 +9,7 @@ psz = [
 thick = [
         2,
         2,
-        2.5,
+        1.5,
         ];
 
 btn_x = 58;
@@ -30,11 +30,14 @@ rail_zsz = 2.5;
 
 case_x_less = 0; //case_x_less = 10;
 
-inner_cnr_rad = 2.0;
+inner_cnr_rad = 3.0;
 
 // calculated
 
 ym = psz[1]/2;
+outer_cnr_rad = inner_cnr_rad + thick[2];
+
+x_sliced = outer_cnr_rad * (1-sin(45));
 
 module RoundedProfile(sz, cnr_rad){
   hull(){
@@ -58,11 +61,14 @@ module RoundedCube(sz, cnr_rad){
 module Case(){
   difference(){
     mirror([1,0,0])
-      translate(-thick)
-      cube(psz
-          + 2*thick
-          - [1,0,0] * (thick[0])
-          - [case_x_less, 0, 0]);
+      translate(-thick +
+               - [1,0,0] * x_sliced)
+      RoundedCube(psz
+                 + 2*thick
+                 - [1,0,0] * (thick[0])
+                 + [1,0,0] * (x_sliced)
+                 - [case_x_less, 0, 0],
+                 outer_cnr_rad);
 
     for (yp= [ btn_yprop, 1-btn_yprop ])
       translate([ -btn_x,
@@ -91,11 +97,17 @@ module Case(){
                   $fn= 20);
     }
 
+    translate([ thick[0], -10, -10 ])
+      cube([ 10, psz[1]+20, psz[2]+20 ]);
+
+    //translate([-50,-50,10]) cube([100,100,100]);
+
     mirror([1,0,0])
       difference(){
-       cube(psz + [1,0,0]);
+       RoundedCube(psz + [1,0,0],
+                   inner_cnr_rad);
 
-       for (m=[0,1]) {
+       if (0) for (m=[0,1]) {
          translate([0,ym,0]) mirror([0,m,0]) translate([0,-ym,0])
            translate([-1,-1, psz[2]-rail_zsz])
            cube([psz[0]+1, rail_ysz+1, rail_zsz+1]);