+module DoKnives(){
+ for (k=[0:nknives-1])
+ DoKnife(k);
+}
+
+module ScrewHole(){
+ translate([0,-50,0])
+ rotate([-90,0,0])
+ cylinder(r=screwdia/2, h=150, $fn=40);
+ translate([0, totaldepth-front - screwbackdepth, 0])
+ rotate([90,0,0])
+ cylinder(r=screwcsinkdia/2 / (sqrt(3)/2), h=100, $fn=6);
+}
+
+module Block(){
+ sidemidx = minsideout + screwcsinkdia/2;
+
+ difference(){
+ hull() mirror([0,0,1]) {
+ translate([minx, 0, 0])
+ cube([maxx-minx, totaldepth-front, height]);
+ for (x=[minx + front/2, maxx - front/2])
+ translate([x, -front/2, 0])
+ cylinder(r=front/2, h=height, $fn=30);
+ }
+ for (x=[minx + sidemidx, maxx - sidemidx]) {
+ translate([x, 0, -screwabove])
+ ScrewHole();
+ }
+ for (yshift=[-1,1])
+ translate([0, yshift * frontbackslop, 0])
+ DoKnives();
+ }
+}
+
+module BlockPrint(){ ////toplevel
+ rotate([0,0,90])
+ 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]]);