chiark / gitweb /
filamentspool overclip move sizes (no functional change)
[reprap-play.git] / doveclip.scad
1 // -*- C -*-
2
3 toothheight = 1.2;
4 webthick = 1.8;
5 height = 7;
6 pinlengthfact = 1.2;
7 nomrad = height/2 - toothheight;
8 minrad = nomrad - 0.75;
9 maxrad = nomrad + 0.25;
10 jawthick = 1.5;
11
12 webgap = 0.4;
13 basepinclear = 1.0;
14
15 toothgap = webthick + webgap*2;
16 basethick = toothheight;
17
18 module DoveClipPin(h=height) {
19   pinh = h * pinlengthfact;
20   pinheight = nomrad*2 + jawthick*2;
21   translate([0,0, pinheight/2]) intersection(){
22     union(){
23       for (m=[0,1]) {
24         mirror([0,0,m]) translate([0,0,pinheight/2]) rotate([90,0,0])
25           cylinder($fn=20, r1=minrad, r2=maxrad, h=pinh);
26       }
27       translate([-webthick/2, -pinh, -pinheight/2-1])
28         cube([webthick, pinh, pinheight+2]);
29     }
30     translate([-maxrad-1, -pinh-1, -pinheight/2])
31       cube([maxrad*2+2, pinh+2, pinheight]);
32   }
33 }
34
35 module DoveClipEnd(baseextend=1, h=7) {
36   cubex = nomrad*2 + jawthick*2;
37   cube0y = -basethick-nomrad*2-toothheight;
38   centrey = -basethick-nomrad;
39   difference(){
40     translate([-cubex/2, cube0y, 0])
41       cube([cubex, -cube0y+baseextend, h]);
42     translate([0, centrey, -1])
43       cylinder($fn=20, r=nomrad, h=h+2);
44     translate([-toothgap/2, cube0y-1, -1])
45       cube([toothgap, toothheight+nomrad+1, h+2]);
46   }
47 }
48
49 module DoveClipPair(baseextend=1, h=7) {
50   delta = nomrad*2 + jawthick*2 + toothgap;
51   for (x=[-delta/2,delta/2])
52     translate([x,0,0])
53       DoveClipEnd(baseextend=baseextend, h=h);
54 }
55
56 module DoveClipPairBase(baseextend=0.1, h=7) {
57   delta = nomrad*2 + jawthick;
58   intrude = nomrad + basethick - basepinclear;
59   for (x=[-delta/2,delta/2]) {
60     translate([x,0,0])
61       DoveClipEnd(baseextend=baseextend, h=h);
62   }
63   translate([-delta, -intrude, 0])
64     cube([delta*2, intrude+0.1, h]);
65 }