chiark / gitweb /
doveclip wip for test print
[reprap-play.git] / doveclip.scad
1 toothheight = 1.2;
2 webthick = 1.8;
3 height = 7;
4 pindepth = 10;
5 nomrad = height/2 - toothheight;
6 minrad = nomrad - 0.5;
7 maxrad = nomrad + 0.5;
8
9 webgap = 0.4;
10
11 toothgap = webthick + webgap*2;
12 basethick = toothheight;
13 jawthick = toothheight;
14
15 module DoveClipPin() {
16   translate([0,0, height/2]) intersection(){
17     union(){
18       for (m=[0,1]) {
19         mirror([0,0,m]) translate([0,0,height/2]) rotate([90,0,0])
20           cylinder($fn=20, r1=minrad, r2=maxrad, h=pindepth);
21       }
22       translate([-webthick/2, -pindepth, -height/2-1])
23         cube([webthick, pindepth, height+2]);
24     }
25     translate([-maxrad-1, -pindepth-1, -height/2])
26       cube([maxrad*2+2, pindepth+2, height]);
27   }
28 }
29
30 module DoveClipEnd(baseextend=1, h=7) {
31   cubex = nomrad*2 + jawthick*2;
32   cube0y = -basethick-nomrad*2-toothheight;
33   centrey = -basethick-nomrad;
34   difference(){
35     translate([-cubex/2, cube0y, 0])
36       cube([cubex, -cube0y+baseextend, h]);
37     translate([0, centrey, -1])
38       cylinder($fn=20, r=nomrad, h=h+2);
39     translate([-toothgap/2, cube0y-1, -1])
40       cube([toothgap, toothheight+nomrad+1, h+2]);
41   }
42 }
43
44 module DoveClipPair(baseextend=1, h=7) {
45   delta = nomrad*2 + jawthick*2 + toothgap;
46   for (x=[-delta/2,delta/2])
47     translate([x,0,0])
48       DoveClipEnd(baseextend=baseextend, h=h);
49 }