3 // properties of the knives
5 widths = [15.5, 15.8, 19.0];
7 handlelendelta = [-15, 0, 10];
8 locations = [-35, 0, 40];
12 templatescale = 27.2 / 19.6;
14 coverlonglen = 120; // xxx
15 covershortlen = 70; // xxx
26 screwbackdepth = 6.0 - 1.0;
28 screwcsinkdia = 9.8 + 1.0;
33 coverside = coverthick;
36 covertopwingbase = 20;
48 side = minsidein + screwcsinkdia + minsideout;
49 totaldepth = front + maxhandledepth + back;
51 minkx = locations[0] - widths[0] /2;
52 maxkx = locations[nknives-1] + widths[nknives-1]/2;
57 module ImportTemplate(w,k,t) {
58 fn = str("knifeblock-knives-t",k,t,".dxf");
60 translate([0,0, -w/2])
61 linear_extrude(height=w)
62 scale(templatescale) import(file=fn, convexity=100);
66 ImportTemplate(bladew, k,"bl");
68 ImportTemplate(widths[k], k,"hl");
70 ImportTemplate(widths[k], k,"hl");
75 translate([locations[k],0,0]){
77 translate([-(handlelenbase + handlelendelta[k]),0,0])
90 cylinder(r=screwdia/2, h=150, $fn=40);
91 translate([0, totaldepth-front - screwbackdepth, 0])
93 cylinder(r=screwcsinkdia/2 / (sqrt(3)/2), h=100, $fn=6);
97 sidemidx = minsideout + screwcsinkdia/2;
100 hull() mirror([0,0,1]) {
101 translate([minx, 0, 0])
102 cube([maxx-minx, totaldepth-front, height]);
103 for (x=[minx + front/2, maxx - front/2])
104 translate([x, -front/2, 0])
105 cylinder(r=front/2, h=height, $fn=30);
107 for (x=[minx + sidemidx, maxx - sidemidx]) {
108 translate([x, 0, -screwabove])
112 translate([0, yshift * frontbackslop, 0])
117 module BlockPrint(){ ////toplevel
122 module CoverTemplate(){
123 linear_extrude(height=coverthick)
126 [maxx, coverlonglen],
127 [maxx - coverside, coverlonglen],
128 [minx, covershortlen]]);
131 module CoverSide(xpos, len){
132 translate([xpos, 0 ,0]) {
134 linear_extrude(height=coverside)
137 [covertopwing, totaldepth],
138 [covertopwingbase, coverside + coverthick],
139 [len - covertopwingbase, coverside + coverthick],
140 [len - covertopwing, totaldepth],
146 module PegTemplate(){
147 for (mx=[0,1]) for (my=[0,1]) {
148 mirror([mx,0,0]) mirror([0,my,0])
149 polygon([[-0.1, -0.1],
151 [pegstem/2, pegstemheight/2],
152 [peghead/2, pegheight /2],
153 [-0.1, pegheight /2]]);
158 echo("peg angle slope (must be <1)",
159 (peghead-pegstem)/(pegheight-pegstemheight));
162 linear_extrude(height=peglen) {
164 translate([-d,-d,0]) PegTemplate();
165 translate([-d,+d,0]) PegTemplate();
166 translate([+d,+d,0]) PegTemplate();
167 translate([+d,-d,0]) PegTemplate();
175 CoverSide(minx, covershortlen);
176 mirror([1,0,0]) CoverSide(-maxx, coverlonglen);
179 module CoverAligned(){
180 translate([0,-front,-height])
185 module Demo(){ ////toplevel
188 color([0,0,1]) CoverAligned();