chiark / gitweb /
fairphone-battery-case: Fix push hole master
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Jun 2020 13:46:45 +0000 (14:46 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 13 Jun 2020 13:46:45 +0000 (14:46 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
bike-phone-mount.scad [new file with mode: 0644]
fairphone-battery-case.scad
fairphone-case-mounted.scad [new file with mode: 0644]
fairphone-case.scad
mic-table-clamp.scad
wine-vacuum-adapter.scad [new file with mode: 0644]

diff --git a/bike-phone-mount.scad b/bike-phone-mount.scad
new file mode 100644 (file)
index 0000000..bb69726
--- /dev/null
@@ -0,0 +1,101 @@
+// -*- C -*-
+
+// should rename this to actual name of the product
+
+include <utils.scad>
+
+mount_lip_height = 2.0 - 0.15 - 0.15;
+mount_lip_depth = 2.5 /*?*/ - 0.30;
+mount_neck_width = 26.5 - 0.55 - 0.15;
+mount_neck_length = 1.5 + 0.50;
+
+mount_diag_outer = 34.8        - 0.50;
+mount_diag_inner = 34.6 - 0.20 - 0.50;
+
+mount_slope = .65;
+mount_extra_slope = 3;
+
+mount_demo_ceil = 4;
+
+// calculated
+
+mnep0 = [0,0];
+mnep1 = mnep0 + [0,1] * mount_neck_length;
+mnep7 = mnep0 + [1,0] * mount_lip_depth;
+mnep2 = [ mnep7[0] + mount_extra_slope, mnep1[1] + mount_slope * (mnep7[0] + mount_extra_slope - mnep1[0]) ];
+mnep3 = mnep2 + [0, 0.1];
+mnep4 = [ mnep0[0]-1, mnep3[1] ];
+mnep6 = mnep7 + [0,-1] * mount_lip_height;
+mnep5 = [ mnep4[0], mnep6[1] ];
+mnepm = [ mnep0[0], mnep3[1] ];
+
+mount_total_height = mnep2[1] - mnep6[1];
+mnep_z_offset = -mnep2[1];
+mnep_side_offset = [ mount_neck_width/2, mnep_z_offset ];
+
+module MountNeckEdgePlan() {
+  polygon([ mnep0,
+           mnep1,
+           mnep2,
+           mnep3,
+           mnep4,
+           mnep5,
+           mnep6,
+           mnep7 ]);
+}
+
+module MountNeckSquare() {
+  intersection_for (r=[0,90]) {
+    rotate([0,0,r]){
+      linextr_y_xz(-100,100,convexity=10){
+       for (m=[0,1]) {
+         mirror([m,0]) {
+           translate(mnep_side_offset) MountNeckEdgePlan();
+           rectfromto([-0.1, -mount_total_height],
+                      mnep_side_offset + mnepm);
+         }
+       }
+      }
+    }
+  }
+}
+
+module MountDiagonal() {
+  rotate([0,0,45]){
+    translate([0,0, -mount_total_height]){
+      linextr(0, mount_lip_height)
+       square(center=true, mount_diag_outer);
+      linextr(0, mount_total_height)
+       square(center=true, mount_diag_inner);
+      linextr(mount_lip_height + mount_neck_length,
+             mount_total_height + 1)
+       square(center=true, 100);
+    }
+  }
+}
+
+module MountDemoCeil() {
+  c = mount_demo_ceil + mount_extra_slope;
+  linextr(0, 0.8) {
+    square(mount_neck_width + 2*(mount_demo_ceil + mount_extra_slope),
+          center=true);
+  }
+}
+
+module Mount(){
+  intersection(){
+    MountNeckSquare();
+    MountDiagonal();
+  }
+}
+
+module MountDemo(){ ////toplevel
+  Mount();
+  MountDemoCeil();
+}
+
+//MountNeckEdgePlan();
+//MountNeck();
+//MountDemoCeil();
+//MountDiagonal();
+//MountDemo();
index 1d70359..557271d 100644 (file)
@@ -1,5 +1,7 @@
 // -*- C -*-
 
+include <utils.scad>
+
 mainwall_th = 3.0;
 smallwall_th = 2.0;
 
@@ -22,8 +24,12 @@ handle_height = 3.5;
 handle_inward = 10;
 handle_len = 5;
 
+pushhole_ell_sz = 4.75;
+pushhole_ell_th = 1.75;
+pushhole_circle_dia = 4.0;
+
 // for testing:
-battery_len = 3;
+//battery_len = 3;
 //battery_wdth = 15;
 //battery_base_indent_fromside_inside = 6;
 
@@ -114,7 +120,7 @@ module ExtrudePlan(from,to){
   rotate([0,-90,0])
   for (mj=[0,1]) {
     mirror([0,0,mj]) translate([0,0,from]){
-      linear_extrude(height= to-from){
+      linear_extrude(height= to-from, convexity=5){
        for (mi=[0,1]) {
          mirror([0,mi])
            translate([0, battery_th/2])
@@ -125,6 +131,17 @@ module ExtrudePlan(from,to){
   }
 }
 
+module PushHolePlan(){ ////toplevel
+  translate(-(pushhole_ell_th * 0.10 +
+             pushhole_ell_sz * 0.10) * [1,1]) {
+    for (r=[0,90])
+      rotate(r)
+       translate(-pushhole_ell_th * 0.5 * [1,1])
+       square([ pushhole_ell_sz, pushhole_ell_th ]);
+  }
+  circle(pushhole_circle_dia/2, $fn=40);
+}
+
 module PlanDemo(){ ////toplevel
   color("blue") BaseHalfPlan();
   color("red") LidHalfPlan();
@@ -132,7 +149,10 @@ module PlanDemo(){ ////toplevel
 }
 
 module Base(){ ////toplevel
-  ExtrudePlan(0,s1) BaseHalfPlan();
+  difference(){
+    ExtrudePlan(0,s1) BaseHalfPlan();
+    linextr(-(10+battery_len), battery_len+10, convexity=5) PushHolePlan();
+  }
   difference(){
     union(){
       ExtrudePlan(s0i, s1) SideHalfPlan();
diff --git a/fairphone-case-mounted.scad b/fairphone-case-mounted.scad
new file mode 100644 (file)
index 0000000..8999348
--- /dev/null
@@ -0,0 +1,14 @@
+// -*- C -*-
+
+include <bike-phone-mount.scad>
+
+module CaseMounted(){ ////toplevel
+  Case();
+  translate([ phone_width/2,
+             -phone_height/2, epp3[1] - case_th_bottom ])
+    Mount();
+}
+
+//// toplevels-from:
+include <fairphone-case.scad>
+$suppress_forward_holes = true;
index 5d8eb6f..2998b54 100644 (file)
@@ -271,6 +271,9 @@ prop_prong_heel_slope = 0.5;
 
 lid_fold_clearance_antislop = 0.5;
 
+$button_leg_only = false;
+$suppress_forward_holes = false;
+
 // ---------- calculated ----------
 
 phone_width =  (phone + bumper*2)[0];
@@ -1152,9 +1155,11 @@ module Case(){ ////toplevel
     }
 
     // apertures along top edge
-    CaseAperture(jack_pos, jack_dia, 8);
-    Flip_rhs(1)
-      CaseAperture(noisecancelmic_pos, noisecancelmic_dia, 8);
+    if (!$suppress_forward_holes) {
+      CaseAperture(jack_pos, jack_dia, 8);
+      Flip_rhs(1)
+       CaseAperture(noisecancelmic_pos, noisecancelmic_dia, 8);
+    }
 
     OrdinaryRearApertures();
 
index f1e23c0..b88e8d1 100644 (file)
@@ -55,11 +55,11 @@ wingnut_wing_xrad = 8;
 wingnut_wing_xh = 5;
 wingnut_wing_th = 3;
 
-$test= true;
-///$test= false;
+//$test= true;
+$test= false;
 
-//$fa= 3;
-//$fs= 0.2;
+$fa= 3;
+$fs= 0.2;
 
 // calculated
 
diff --git a/wine-vacuum-adapter.scad b/wine-vacuum-adapter.scad
new file mode 100644 (file)
index 0000000..5ce11a8
--- /dev/null
@@ -0,0 +1,74 @@
+// -*- C -*-
+
+india_nom = 27.0;
+india_slop = 0.63;
+
+middia_nom = 31.0;
+middia_slop = 0.10;
+
+outdia = 44.0;
+
+wall = 4;
+
+htop = 5;
+hbot = 7;
+
+slope = 0.65;
+
+$fa=3;
+$fs=0.1;
+
+// calculated
+
+india_use = india_nom + india_slop;
+middia_use = middia_nom - middia_slop;
+
+//echo("MIN WALL", (middia_use - india_use)/2);
+
+ppA = [middia_use/2, 0];
+ppB = ppA + [0, 1] * htop;
+ppC = ppB + [-1,0] * wall;
+ppD = [ppC[0], ppA[1] - wall/slope];
+ppE = [india_use/2, ppD[1] - (india_use/2 - ppD[0])/slope];
+ppF = ppE + [0,-1] * (htop + hbot);
+ppG = ppF + [1, 0] * wall;
+ppK = [outdia/2, ppA[1]];
+ppJ = ppK + [0,-1] * wall;
+ppH = [ppG[0], ppJ[1] - (ppJ[0]-ppG[0])/slope];
+
+module Plan1() {
+  polygon([[ india_use/2,    -hbot ],
+          [ outdia/2,       -hbot ],
+          [ outdia/2,       0     ],
+          [ middia_use/2,   0     ],
+          [ middia_use/2,   htop  ],
+          [ india_use/2,    htop  ]]);
+}
+
+module Plan3() {
+  p = [ ppA,
+       ppB,
+       ppC,
+       ppD,
+       ppE,
+       ppF,
+       ppG,
+       ppH,
+       ppJ,
+       ppK ];
+  echo(p);
+  polygon(p);
+}
+
+module Demo(){
+  color("blue") translate([0,0,1]) Plan1();
+  Plan3();
+}
+
+module Adapter(){
+  rotate_extrude(convexity=5)
+    Plan1();
+}
+
+//Demo();
+Adapter();