X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=knifeblock.scad;h=7747518ad379d1e20bb0e832109e007dd7bb7962;hb=728ba19167c96b423c401d85d666aae832a911e0;hp=4376a880464c303e9d324d92498ccc63df5e5beb;hpb=64643b803a0937f2f0388006d6dfd1d5a65155a0;p=reprap-play.git diff --git a/knifeblock.scad b/knifeblock.scad index 4376a88..7747518 100644 --- a/knifeblock.scad +++ b/knifeblock.scad @@ -1,19 +1,45 @@ // -*- C -*- -//import(file="t.dxf"); -module ImportTemplate(k,t) { - import(file=str("knifeblock-knives-t",k,t,".dxf"), convexity=10); +nknives = 3; + +widths = [15.5, 15.8, 19.0]; + +handlelenbase = 60; +handlelendelta = [-10, 0, 0]; + +locations = [-35, 0, 40]; + +bladew = 5; // 2.5 + + +module ImportTemplate(w,k,t) { + fn = str("knifeblock-knives-t",k,t,".dxf"); + echo(fn); + translate([0,0, -w/2]) + linear_extrude(height=w) + import(file=fn, convexity=100); } module Knife(k){ - translate([0,50*k,0]){ - ImportTemplate(k,"b"); - translate([0,0,10]) - ImportTemplate(k,"h"); + ImportTemplate(bladew, k,"bl"); + hull(){ + ImportTemplate(widths[k], k,"hl"); + translate([-100,0,0]) + ImportTemplate(widths[k], k,"hl"); } } -Knife(0); -Knife(1); -Knife(2); -//import(file="t.dxf",convexity=4); +module DoKnife(k){ + translate([locations[k],0,0]){ + rotate([0,90,0]) + translate([-(handlelenbase + handlelendelta[k]),0,0]) + Knife(k); + } +} + +module DoKnives(){ + for (k=[0:nknives-1]) + DoKnife(k); +} + +DoKnives();