chiark / gitweb /
pattress-boxes-3-cover: PegProfile, wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 25 Dec 2015 18:09:52 +0000 (18:09 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 25 Dec 2015 18:09:52 +0000 (18:09 +0000)
pattress-boxes-3-cover.scad

index e3a3369..5d116e6 100644 (file)
@@ -20,6 +20,19 @@ lid_top_wall = 1.5;
 lid_front_wall = 1.5;
 lid_side_wall = 1.5;
 
+peg_engage_depth = 1;
+peg_engage_dia = 6.0;
+peg_main_dia = 9;
+peg_max_dia = 15;
+peg_inner_dia = 3.5;
+peg_top_thick = 1;
+peg_straight_len = 3;
+
+peg_inner_slop = 0.2;
+peg_outer_slop = 0.1;
+
+peg_slope = 1;
+
 lid_side_slop = 0.5;
 
 // computed
@@ -38,6 +51,8 @@ lid_rail_h = lid_fatbox_switches_h;
 
 echo(lid_rail_w);
 
+peg_main_height = peg_straight_len + (peg_max_dia - peg_main_dia)/2/peg_slope;
+
 module LidSideProfile(){
   polygon([[-lid_top_wall,     lid_inner_max_h],
           [lid_inner_kink[0], lid_inner_max_h],
@@ -68,4 +83,16 @@ module LidSide(){
     cube([lid_top_wall, lid_inner_w/2 + 10, lid_front_wall + lid_inner_max_h]);
 }
 
-LidSide();
+module PegProfile(){
+  polygon([[-peg_engage_depth, (peg_engage_dia - peg_outer_slop)/2],
+          [0,                 (peg_engage_dia - peg_outer_slop)/2],
+          [0,                 (peg_main_dia - peg_outer_slop)/2],
+          [peg_straight_len,  (peg_main_dia - peg_outer_slop)/2],
+          [peg_main_height,   (peg_max_dia - peg_outer_slop)/2],
+          [peg_main_height+peg_top_thick, (peg_max_dia - peg_outer_slop)/2],
+          [peg_main_height+peg_top_thick, (peg_inner_dia + peg_inner_slop)/2],
+          [-peg_engage_depth,  (peg_inner_dia + peg_inner_slop)/2]]);
+}
+
+//LidSide();
+PegProfile();