X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=knifeblock.scad;h=7ea6079d580a4221ad95a69e589f6909b885a4ac;hp=e79fca3923be50e1dae2068aa7b5d33afa9dd7c7;hb=216f40cedb6ce16f24f1bcad55a8ecf1f2093f02;hpb=1d5ba2a44400c0b2ca21db7b9a109dcb2a0e05bc diff --git a/knifeblock.scad b/knifeblock.scad index e79fca3..7ea6079 100644 --- a/knifeblock.scad +++ b/knifeblock.scad @@ -5,7 +5,7 @@ nknives = 3; widths = [15.5, 15.8, 19.0]; handlelenbase = 75; handlelendelta = [-15, 0, 10]; -locations = [-35, 0, 40]; +locations = [-35, 0, 37]; bladew = 5; // 2.5 maxhandledepth = 45; @@ -23,6 +23,8 @@ minsideout = 4; frontbackslop = 0.25; +knifewidthslop = 2.0; + screwbackdepth = 6.0 - 1.0; screwdia = 4.0 + 0.5; screwcsinkdia = 9.8 + 1.0; @@ -40,8 +42,8 @@ holesize = 12.5; holestrut = 7; holeedge = 4; -holeoffx = 0.6; -holeoffy = 0.3; +holeoffx = 0.33; +holeoffy = 0.23; pegstem = 3.5; peghead = 10; @@ -50,7 +52,7 @@ pegheight = 9; peglen = 12; recessblockwidth = peghead + pegstem*3; -recessblockheight = peglen + pegstem*1.5; +recessblockheight = peglen/2 + pegstem*1.5; pegsloph = 0.5; pegslopv = 0.5; @@ -59,11 +61,14 @@ pegslopl = 0.5; pegdepthproportion = 0.80; // computed + +function width(k) = widths[k] + knifewidthslop; + side = minsidein + screwcsinkdia + minsideout; totaldepth = front + maxhandledepth + back; -minkx = locations[0] - widths[0] /2; -maxkx = locations[nknives-1] + widths[nknives-1]/2; +minkx = locations[0] - width(0) /2; +maxkx = locations[nknives-1] + width(nknives-1)/2; minx = minkx - side; maxx = maxkx + side; @@ -83,9 +88,9 @@ module ImportTemplate(w,k,t) { module Knife(k){ ImportTemplate(bladew, k,"bl"); hull(){ - ImportTemplate(widths[k], k,"hl"); + ImportTemplate(width(k), k,"hl"); translate([-100,0,0]) - ImportTemplate(widths[k], k,"hl"); + ImportTemplate(width(k), k,"hl"); } } @@ -111,14 +116,14 @@ module ScrewHole(){ cylinder(r=screwcsinkdia/2 / (sqrt(3)/2), h=100, $fn=6); } -module PegTemplate(){ +module PegTemplate(apex){ for (mx=[0,1]) for (my=[0,1]) { mirror([mx,0,0]) mirror([0,my,0]) polygon([[-0.1, -0.1], [pegstem/2, -0.1], [pegstem/2, pegstemheight/2], [peghead/2, pegheight /2], - [-0.1, pegheight /2]]); + [-0.1, pegheight /2 + apex]]); } } @@ -130,7 +135,7 @@ module AtSides(){ module BlockPegSlot(){ translate([recessblockwidth/2, pegrecess - 0.5*peglen, -height]){ rotate([-90,0,0]) linear_extrude(height=totaldepth){ - PegTemplate(); + PegTemplate(peghead/2 * 1.2); } } } @@ -139,12 +144,9 @@ 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); + mirror([0,0,1]) { + translate([minx, -front, 0]) + cube([maxx-minx, totaldepth, height]); } for (x=[minx + sidemidx, maxx - sidemidx]) { translate([x, 0, -screwabove]) @@ -195,10 +197,10 @@ module Peg(){ rotate([90,0,0]) { linear_extrude(height=peglen-pegslopl) { intersection(){ - translate([-dx,-dy,0]) PegTemplate(); - translate([-dx,+dy,0]) PegTemplate(); - translate([+dx,+dy,0]) PegTemplate(); - translate([+dx,-dy,0]) PegTemplate(); + translate([-dx,-dy,0]) PegTemplate(0); + translate([-dx,+dy,0]) PegTemplate(0); + translate([+dx,+dy,0]) PegTemplate(0); + translate([+dx,-dy,0]) PegTemplate(0); } } } @@ -207,32 +209,36 @@ module Peg(){ module CoverPegSlot(coverlen){ translate([recessblockwidth/2, 0, -1]){ linear_extrude(height= 1 + pegrecess + 0.5*peglen){ - PegTemplate(); + PegTemplate(0); } } } module HoleRow(){ - for (i=[0:10]) { - translate([0, (i+0.5)*holepitch, -1]) - cylinder(r=holesize/2, h=coverthick+2, $fn=20); + imax = ceil(coverlonglen / holepitch); + echo("Holes Y count ", imax); + for (i=[0:imax]) { + translate([0, (i+0.5)*holepitch, -20]) + cylinder(r=holesize/2, h=40, $fn=20); } } module HolesScope(){ intersection_for (dx=[-1,+1]) { intersection_for (dy=[-1,+1]) { - translate([dx * holeedge, dy * holeedge, -1]) - scale([1,1,2]) + translate([dx * holeedge, dy * holeedge, -5]) + scale([1,1,10]) CoverTemplate(); } } } module Holes(){ + imin = ceil((maxx-minx)/(sqrt(3)*holepitch)); + echo("Holes X count 2 x", imin); intersection(){ translate([holeoffx * holepitch, holeoffy * holepitch, 0]) { - for (i=[-10:10]) { + for (i=[-imin:2]) { translate([i * sqrt(3) * holepitch, 0, 0]) { HoleRow(); translate([sqrt(3)/2 * holepitch, -0.5 * holepitch, 0]) @@ -287,6 +293,9 @@ module CoverParts(){ ////toplevel } } -Demo(); +//Block(); +//Demo(); //Cover(); +//CoverParts(); //Peg(); +//Cover();