X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=blobdiff_plain;f=knifeblock.scad;h=c1f1869f4b1a07e9a777f9077b0274ccc7478a63;hp=4261be685bf146a34a4dc79c8bb066c8d6d39849;hb=9f21563a34c99c15c3adcd2a72ab0da7cf741bbe;hpb=881a2abf67d851bcbf320c5dda98c12972953356 diff --git a/knifeblock.scad b/knifeblock.scad index 4261be6..c1f1869 100644 --- a/knifeblock.scad +++ b/knifeblock.scad @@ -46,8 +46,8 @@ holeoffx = 0.33; holeoffy = 0.23; indentdepth = 1; -indentoutersize = holesize + 0.5; -indentinnersize = indentoutersize - indentdepth * 2.5; +indentoutersize = holesize + 2.15; +indentinnersize = indentoutersize - indentdepth * 3.0; pegstem = 3.5; peghead = 10; @@ -147,7 +147,7 @@ module BlockPegSlot(){ module DecorativeIndents(){ translate([0, -front, 0]) rotate([90,0,0]) - HexGrid(-5,5,-5,5) { + HexGrid(-height, 0, minx,maxx) { hull(){ translate([0, 0, -indentdepth]) cylinder(r=indentinnersize/2, h=indentdepth, $fn=40); @@ -241,7 +241,12 @@ module HolesScope(){ } } -module HexGrid(imin,imax,jmin,jmax) { +module HexGrid(xa,xb,ya,yb) { + imin = floor(xa / holepitch); + imax = ceil(xb / holepitch); + jmin = floor(ya / (sqrt(3)*holepitch)); + jmax = ceil(yb / (sqrt(3)*holepitch)); + echo("HexGrid ",imin,imax,jmin,jmax); for (i=[imin:imax]) { for (j=[jmin:jmax]) { translate([(j * sqrt(3) + holeoffx) * holepitch, @@ -260,13 +265,9 @@ module Hole(){ } module Holes(){ - imax = ceil(coverlonglen / holepitch); - echo("Holes Y count ", imax); - jmin = ceil((maxx-minx)/(sqrt(3)*holepitch)); - echo("Holes X count 2 x", jmin); intersection(){ translate([0, 0, -20]) - HexGrid(0,imax,-jmin,2) + HexGrid(0, coverlonglen, minx, maxx) Hole(); HolesScope(); } @@ -318,6 +319,22 @@ module CoverParts(){ ////toplevel Pegs(); } +module FrontDemo(){ ////toplevel + color([1,0,1]) Block(); + color([1,0,1]) CoverAligned(); + color([0,0,0]) DoKnives(); +} + +module BlockFrontTest(){ ////toplevel + intersection(){ + Block(); + translate([minx-10, -front-10, -height-10]) { + cube([75,14,35]); + cube([75,25,13]); + } + } +} + //Block(); //Demo(); //Cover();