chiark / gitweb /
filamentspool wrappers
[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 basepinclear = 1.0;
14
15 toothgap = webthick + webgap*2;
16 basethick = toothheight;
17
18 module DoveClipPin(height=height) {
19   translate([0,0, height/2]) intersection(){
20     union(){
21       for (m=[0,1]) {
22         mirror([0,0,m]) translate([0,0,height/2]) rotate([90,0,0])
23           cylinder($fn=20, r1=minrad, r2=maxrad, h=pindepth);
24       }
25       translate([-webthick/2, -pindepth, -height/2-1])
26         cube([webthick, pindepth, height+2]);
27     }
28     translate([-maxrad-1, -pindepth-1, -height/2])
29       cube([maxrad*2+2, pindepth+2, height]);
30   }
31 }
32
33 module DoveClipEnd(baseextend=1, h=7) {
34   cubex = nomrad*2 + jawthick*2;
35   cube0y = -basethick-nomrad*2-toothheight;
36   centrey = -basethick-nomrad;
37   difference(){
38     translate([-cubex/2, cube0y, 0])
39       cube([cubex, -cube0y+baseextend, h]);
40     translate([0, centrey, -1])
41       cylinder($fn=20, r=nomrad, h=h+2);
42     translate([-toothgap/2, cube0y-1, -1])
43       cube([toothgap, toothheight+nomrad+1, h+2]);
44   }
45 }
46
47 module DoveClipPair(baseextend=1, h=7) {
48   delta = nomrad*2 + jawthick*2 + toothgap;
49   for (x=[-delta/2,delta/2])
50     translate([x,0,0])
51       DoveClipEnd(baseextend=baseextend, h=h);
52 }
53
54 module DoveClipPairBase(baseextend=0.1, h=7) {
55   delta = nomrad*2 + jawthick;
56   intrude = nomrad + basethick - basepinclear;
57   for (x=[-delta/2,delta/2]) {
58     translate([x,0,0])
59       DoveClipEnd(baseextend=baseextend, h=h);
60   }
61   translate([-delta, -intrude, 0])
62     cube([delta*2, intrude+0.1, h]);
63 }