7 nomrad = height/2 - toothheight;
8 minrad = nomrad - 0.75;
9 maxrad = nomrad + 0.25;
15 toothgap = webthick + webgap*2;
16 basethick = toothheight;
18 module DoveClipPin(h=height) {
19 pinh = h * pinlengthfact;
20 pinheight = nomrad*2 + jawthick*2;
21 translate([0,0, pinheight/2]) intersection(){
24 mirror([0,0,m]) translate([0,0,pinheight/2]) rotate([90,0,0])
25 cylinder($fn=20, r1=minrad, r2=maxrad, h=pinh);
27 translate([-webthick/2, -pinh, -pinheight/2-1])
28 cube([webthick, pinh, pinheight+2]);
30 translate([-maxrad-1, -pinh-1, -pinheight/2])
31 cube([maxrad*2+2, pinh+2, pinheight]);
35 function DoveClip_depth(baseextend) =
36 basethick + nomrad*2 + toothheight + baseextend;
37 function DoveClip_width() =
38 nomrad*2 + jawthick*2 + toothgap;
40 module DoveClipEnd(baseextend=1, h=7) {
41 cubex = nomrad*2 + jawthick*2;
42 cube0y = -basethick-nomrad*2-toothheight;
43 centrey = -basethick-nomrad;
45 translate([-cubex/2, cube0y, 0])
46 cube([cubex, -cube0y+baseextend, h]);
47 translate([0, centrey, -1])
48 cylinder($fn=20, r=nomrad, h=h+2);
49 translate([-toothgap/2, cube0y-1, -1])
50 cube([toothgap, toothheight+nomrad+1, h+2]);
54 module DoveClipPair(baseextend=1, h=7) {
55 delta = DoveClip_width();
56 for (x=[-delta/2,delta/2])
58 DoveClipEnd(baseextend=baseextend, h=h);
61 module DoveClipPairBase(baseextend=0.1, h=7) {
62 delta = nomrad*2 + jawthick;
63 intrude = nomrad + basethick - basepinclear;
64 for (x=[-delta/2,delta/2]) {
66 DoveClipEnd(baseextend=baseextend, h=h);
68 translate([-delta, -intrude, 0])
69 cube([delta*2, intrude+0.1, h]);
72 module DoveClipPairSane(baseextend=0, h=7) {
74 translate([0, DoveClip_depth(baseextend=0), 0])
75 DoveClipPairBase(baseextend=baseextend, h=h);