chiark / gitweb /
pattress-boxes-3-cover: RailProfile: introduce lid_rail_strongwall
[reprap-play.git] / pattress-boxes-3-cover.scad
index 6122f5d0e95e452db38acce12fb4698305a5c4eb..dbd06c9ff855d6bcd8530935cedd9b11abcbdf76 100644 (file)
@@ -37,6 +37,7 @@ peg_slope = 1;
 
 lid_side_slop = 0.5;
 lid_rail_behindslop = 0.5;
+lid_rail_strongwall = 2.5;
 
 // computed
 
@@ -76,13 +77,18 @@ module RailProfile(lslop=0.1){
   yt_base = thinbox_front_z;
   yt = yt_base - lid_rail_behindslop;
   pegx = (lid_inner_w_nom - patbox_centres)/2;
+  sw = lid_rail_strongwall;
   
   polygon([[-lslop,                  yt],
           [pegx - peg_main_dia/2, yt],
           [pegx - peg_main_dia/2, yt_base - peg_straight_len],
-          [-lslop,
+          [sw,
            yt_base - peg_straight_len - (pegx - peg_main_dia/2)/peg_slope
-          -0.1]]);
+           +sw],
+          [sw,
+           lid_seatline_h - 1],
+          [-lslop,
+           lid_seatline_h - 1]]);
 }
 
 module LidSide(){
@@ -110,6 +116,21 @@ module LidSide(){
     translate([0,0,-0.1])
     linear_extrude(height=raillen+0.1) //todo
     RailProfile();
+
+  // rail end
+  translate([raillen, 0,0])
+    intersection(){
+      rotate_extrude($fn=50)
+       RailProfile(lslop=0);
+      translate([0, 25-0.1, 0])
+       cube(50, center=true);
+    }
+}
+
+module Lid(){ ////toplevel
+  for (m=[0,1])
+    mirror([0,m,0])
+      translate([0, -lid_inner_w/2, 0]) LidSide();
 }
 
 module PegProfile(){
@@ -123,7 +144,7 @@ module PegProfile(){
           [-peg_engage_depth,  (peg_inner_dia + peg_inner_slop)/2]]);
 }
 
-module Peg(){
+module Peg(){ ////toplevel
   rotate_extrude($fn=50)
     rotate([0,0,-90])
     PegProfile();
@@ -149,7 +170,7 @@ module TopPattressBox(){
 }
 
 module Demo(){
-  translate([0, -lid_inner_w/2, 0]) LidSide();
+  Lid();
   translate([0,0, thinbox_front_z])
     rotate([0,180,0]) translate([0, -patbox_side/2, 0])
     rotate([0,0,90]) union(){
@@ -165,4 +186,5 @@ module Demo(){
 //Peg();
 //TopPattressBox();
 //RailProfile();
-Demo();
+//Demo();
+//Lid();