chiark / gitweb /
simplephone-case: wip rounded
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 30 Jun 2017 22:37:22 +0000 (23:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 30 Jun 2017 22:37:22 +0000 (23:37 +0100)
simplephone-case.scad

index caf465e..b1a126b 100644 (file)
@@ -30,11 +30,12 @@ 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];
 
 module RoundedProfile(sz, cnr_rad){
   hull(){
@@ -59,10 +60,11 @@ module Case(){
   difference(){
     mirror([1,0,0])
       translate(-thick)
-      cube(psz
-          + 2*thick
-          - [1,0,0] * (thick[0])
-          - [case_x_less, 0, 0]);
+      RoundedCube(psz
+                 + 2*thick
+                 - [1,0,0] * (thick[0])
+                 - [case_x_less, 0, 0],
+                 outer_cnr_rad);
 
     for (yp= [ btn_yprop, 1-btn_yprop ])
       translate([ -btn_x,
@@ -91,11 +93,15 @@ module Case(){
                   $fn= 20);
     }
 
+    //translate([ thick[0] - 
+    //cube([
+
     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]);