chiark / gitweb /
knifeblock: wip cover
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Dec 2014 12:35:26 +0000 (12:35 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Dec 2014 12:35:26 +0000 (12:35 +0000)
knifeblock.scad

index da25c38..b0dbd68 100644 (file)
@@ -11,6 +11,9 @@ maxhandledepth = 45;
 
 templatescale = 27.2 / 19.6;
 
+coverlonglen = 130; // xxx
+covershortlen = 80; // xxx
+
 // other tuneables
 front = 5;
 back = 5;
@@ -26,6 +29,13 @@ screwcsinkdia =  9.8 + 1.0;
 
 screwabove = 15;
 
+coverthick = 2.4;
+coverside = coverthick;
+
+covertopwing = 15;
+covertopwingbase = 20;
+coveredge = 3;
+
 // computed
 side = minsidein + screwcsinkdia + minsideout;
 totaldepth = front + maxhandledepth + back;
@@ -101,9 +111,42 @@ module BlockPrint(){ ////toplevel
     Block();
 }
 
+module CoverTemplate(){
+  linear_extrude(height=coverthick)
+    polygon([[minx, 0],
+            [maxx, 0],
+            [maxx, coverlonglen],
+            [maxx - coverside, coverlonglen],
+            [minx, covershortlen]]);
+}
+
+module CoverSide(xpos, len){
+  translate([xpos, 0 ,0])
+  rotate([90,0,90])
+    linear_extrude(height=coverside)
+      polygon([[0,                      0],
+              [0,                      totaldepth],
+              [covertopwing,           totaldepth],
+              [covertopwingbase,       coverside + coverthick],
+              [len - covertopwingbase, coverside + coverthick],
+              [len - covertopwing,     totaldepth],
+              [len,                    totaldepth],
+              [len,                    0]]);
+//  }
+}
+
+module Cover(){
+  CoverTemplate();
+  CoverSide(minx,           covershortlen);
+  CoverSide(maxx-coverside, coverlonglen);
+}
+
 module Demo(){ ////toplevel
-  Block();
-  %DoKnives();
+  %Block();
+  DoKnives();
+  translate([0,0,-height])
+    rotate([90,0,0])
+      Cover();
 }
 
 Demo();