chiark / gitweb /
pattress-boxes-3-cover: RailProfile, add
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Dec 2015 00:06:54 +0000 (00:06 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Dec 2015 00:06:54 +0000 (00:06 +0000)
pattress-boxes-3-cover.scad

index d0b7e9a7194177d8bad00d5b89b428a510e2930a..a3c2804e6eb6bd0e3708b47e24ef81b0092df9ea 100644 (file)
@@ -34,6 +34,7 @@ peg_outer_slop = 0.1;
 peg_slope = 1;
 
 lid_side_slop = 0.5;
+lid_rail_behindslop = 0.5;
 
 // computed
 
@@ -64,6 +65,19 @@ module LidSideProfile(){
           [-lid_top_wall,     -lid_front_wall]]);
 }
 
+module RailProfile(){
+  yt_base = lid_seatline_h + lid_fatbox_h - lid_thinbox_h;
+  yt = yt_base - lid_rail_behindslop;
+  pegx = (lid_inner_w - patbox_centres)/2;
+  
+  polygon([[-0.1,                  yt],
+          [pegx - peg_main_dia/2, yt],
+          [pegx - peg_main_dia/2, yt_base - peg_straight_len],
+          [-0.1,
+           yt_base - peg_straight_len - (pegx - peg_main_dia/2)/peg_slope
+          -0.1]]);
+}
+
 module LidSide(){
   overlap = [0.1, 0.1, 0.1];
 
@@ -83,6 +97,12 @@ module LidSide(){
   // lid top
   translate([-lid_top_wall, -lid_side_wall, -lid_front_wall])
     cube([lid_top_wall, lid_inner_w/2 + 10, lid_front_wall + lid_inner_max_h]);
+
+  // rail
+  rotate([90,0,90])
+    translate([0,0,-0.1])
+    linear_extrude(height=100.1) //todo
+    RailProfile();
 }
 
 module PegProfile(){
@@ -137,4 +157,5 @@ module Demo(){
 //PegProfile();
 //Peg();
 //TopPattressBox();
+//RailProfile();
 Demo();