3 // properties of the knives
5 widths = [15.5, 15.8, 19.0];
7 handlelendelta = [-15, 0, 10];
8 locations = [-35, 0, 37];
12 templatescale = 27.2 / 19.6;
14 coverlonglen = 120; // xxx
15 covershortlen = 70; // xxx
28 screwbackdepth = 6.0 - 1.0;
30 screwcsinkdia = 9.8 + 1.0;
35 coverside = coverthick;
38 covertopwingbase = 20;
54 recessblockwidth = peghead + pegstem*3;
55 recessblockheight = peglen/2 + pegstem*1.5;
61 pegdepthproportion = 0.80;
65 function width(k) = widths[k] + knifewidthslop;
67 side = minsidein + screwcsinkdia + minsideout;
68 totaldepth = front + maxhandledepth + back;
70 minkx = locations[0] - width(0) /2;
71 maxkx = locations[nknives-1] + width(nknives-1)/2;
76 holepitch = holesize+holestrut;
78 pegrecess = pegdepthproportion*totaldepth - 0.5*peglen;
80 module ImportTemplate(w,k,t) {
81 fn = str("knifeblock-knives-t",k,t,".dxf");
83 translate([0,0, -w/2])
84 linear_extrude(height=w)
85 scale(templatescale) import(file=fn, convexity=100);
89 ImportTemplate(bladew, k,"bl");
91 ImportTemplate(width(k), k,"hl");
93 ImportTemplate(width(k), k,"hl");
98 translate([locations[k],0,0]){
100 translate([-(handlelenbase + handlelendelta[k]),0,0])
106 for (k=[0:nknives-1])
113 cylinder(r=screwdia/2, h=150, $fn=40);
114 translate([0, totaldepth-front - screwbackdepth, 0])
116 cylinder(r=screwcsinkdia/2 / (sqrt(3)/2), h=100, $fn=6);
119 module PegTemplate(apex){
120 for (mx=[0,1]) for (my=[0,1]) {
121 mirror([mx,0,0]) mirror([0,my,0])
122 polygon([[-0.1, -0.1],
124 [pegstem/2, pegstemheight/2],
125 [peghead/2, pegheight /2],
126 [-0.1, pegheight /2 + apex]]);
131 translate([minx,0,0]) child(0);
132 translate([maxx,0,0]) mirror([1,0,0]) child(1);
135 module BlockPegSlot(){
136 translate([recessblockwidth/2, pegrecess - 0.5*peglen, -height]){
137 rotate([-90,0,0]) linear_extrude(height=totaldepth){
138 PegTemplate(peghead/2 * 1.2);
144 sidemidx = minsideout + screwcsinkdia/2;
148 translate([minx, -front, 0])
149 cube([maxx-minx, totaldepth, height]);
151 for (x=[minx + sidemidx, maxx - sidemidx]) {
152 translate([x, 0, -screwabove])
156 translate([0, yshift * frontbackslop, 0])
158 AtSides() { BlockPegSlot(); BlockPegSlot(); }
162 module BlockPrint(){ ////toplevel
167 module CoverTemplate(){
168 linear_extrude(height=coverthick)
171 [maxx, coverlonglen+0.1],
172 [maxx - coverside, coverlonglen+0.1],
173 [minx, covershortlen+0.1]]);
176 module CoverSide(len){
177 translate([0, 0 ,0]) {
179 linear_extrude(height=coverside)
182 [covertopwing, totaldepth],
183 [covertopwingbase, coverside + coverthick],
184 [len - covertopwingbase, coverside + coverthick],
185 [len - covertopwing, totaldepth],
188 cube([recessblockwidth, recessblockheight, totaldepth]);
193 echo("peg angle slope (must be <1)",
194 (peghead-pegstem)/(pegheight-pegstemheight));
198 linear_extrude(height=peglen-pegslopl) {
200 translate([-dx,-dy,0]) PegTemplate(0);
201 translate([-dx,+dy,0]) PegTemplate(0);
202 translate([+dx,+dy,0]) PegTemplate(0);
203 translate([+dx,-dy,0]) PegTemplate(0);
209 module CoverPegSlot(coverlen){
210 translate([recessblockwidth/2, 0, -1]){
211 linear_extrude(height= 1 + pegrecess + 0.5*peglen){
218 imax = ceil(coverlonglen / holepitch);
219 echo("Holes Y count ", imax);
221 translate([0, (i+0.5)*holepitch, -20])
222 cylinder(r=holesize/2, h=40, $fn=20);
227 intersection_for (dx=[-1,+1]) {
228 intersection_for (dy=[-1,+1]) {
229 translate([dx * holeedge, dy * holeedge, -5])
237 imin = ceil((maxx-minx)/(sqrt(3)*holepitch));
238 echo("Holes X count 2 x", imin);
240 translate([holeoffx * holepitch, holeoffy * holepitch, 0]) {
242 translate([i * sqrt(3) * holepitch, 0, 0]) {
244 translate([sqrt(3)/2 * holepitch, -0.5 * holepitch, 0])
264 AtSides() { CoverSide(covershortlen); CoverSide(coverlonglen); }
266 AtSides() { CoverPegSlot(); CoverPegSlot(); }
270 module CoverAligned(){
271 translate([0,-front,-height])
277 translate([recessblockwidth/2, pegrecess, -height])
281 module Demo(){ ////toplevel
284 color([0,0,1]) CoverAligned();
285 color([1,0,0]) AtSides() { DemoPeg(); DemoPeg(); }
288 module CoverParts(){ ////toplevel
290 translate([0, coverlonglen, pegheight/2]) {
292 translate([-peghead-3, 0,0]) Peg();