X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=knifeblock.scad;h=89568dfe5d2e82690a2b3858868d8aa39088cdeb;hb=842bcd9806c82030432cddc064b7dc5929ff81fc;hp=1a5d4df65d4308ea4d0723a7c2987a8ea6b9662c;hpb=440332fbe5cc66ca332fe1012482c44ad57588f5;p=reprap-play.git diff --git a/knifeblock.scad b/knifeblock.scad index 1a5d4df..89568df 100644 --- a/knifeblock.scad +++ b/knifeblock.scad @@ -42,8 +42,8 @@ holesize = 12.5; holestrut = 7; holeedge = 4; -holeoffx = 0.45; -holeoffy = 0.25; +holeoffx = 0.33; +holeoffy = 0.23; pegstem = 3.5; peghead = 10; @@ -168,9 +168,9 @@ module CoverTemplate(){ linear_extrude(height=coverthick) polygon([[minx, 0], [maxx, 0], - [maxx, coverlonglen], - [maxx - coverside, coverlonglen], - [minx, covershortlen]]); + [maxx, coverlonglen+0.1], + [maxx - coverside, coverlonglen+0.1], + [minx, covershortlen+0.1]]); } module CoverSide(len){ @@ -215,26 +215,30 @@ module CoverPegSlot(coverlen){ } 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=40); } } 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]) @@ -295,3 +299,5 @@ module CoverParts(){ ////toplevel //CoverParts(); //Peg(); //Cover(); +//Holes(); +//%CoverTemplate();