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