chiark / gitweb /
trackpump-mutlihead-clip: finer
[reprap-play.git] / trackpump-mutlihead-clip.scad
1 // -*- C -*-
2
3 pump_main_dia = 38;
4 pump_side_width = 5;
5 pump_side_thick = 5;
6 pump_shaft_dia = 14;
7 baseplate = 4;
8
9 pump_protr_flat = 3;
10 pump_protr_slope = 1.0;
11
12 // need reconfirm:
13 pump_protr_protr = 3;
14 pump_side_height = 20;
15
16 // calculated
17 pump_protr_slheight = pump_protr_protr / pump_protr_slope;
18
19 pump_side_outer_rad = pump_side_width + pump_main_dia/2;
20
21 $fa=5;
22
23 module PumpSidePlan() {
24   xm = baseplate + pump_main_dia/2;
25   or = pump_side_outer_rad;
26   difference(){
27     union(){
28       intersection(){
29         translate([-xm, 0]) circle(r=or);
30         translate([-(xm+or), -or]) square([xm+or, or*2]);
31       }
32       translate([-xm, -or]) square([xm, or*2]);
33     }
34     translate([-xm-or, 0])
35       square(center=true, [pump_side_width*4, pump_shaft_dia]);
36   }
37 }
38
39 module PumpSideElevation(){
40   x3 = 0;
41   x2 = x3 - baseplate;
42   x1 = x2 - pump_main_dia;
43   x0 = x1 - pump_side_width;
44   x2a = x2 - pump_protr_protr;
45
46   z0 = 0;
47   z1 = z0 - pump_side_thick;
48   z2 = z1 - pump_side_height;
49   z2a = z2 - pump_protr_slheight;
50   z2b = z2a - pump_protr_flat;
51
52   arcx = x2-x1;
53   arcy = z1-z2;
54
55   translate([x0,z1]) square([x1-x0, z0-z1]);
56
57   difference(){
58     translate([x1,z2]) square([x3-x1, z0-z2]);
59     translate([x1,z2]) scale([1,arcy/arcx]) circle(r=arcx);
60   }
61
62   translate([x2,z2a]) square([x3-x2, z0-z2a]);
63
64   hull(){
65     translate([x2,z2a]) square([x3-x2, z2-z2a]);
66     translate([x2a,z2b]) square([x3-x2a, z2a-z2b]);
67   }
68 }
69
70 module PumpSide(){
71   difference(){
72     intersection(){
73       translate([0,100,0])
74         rotate([90,0,0])
75         linear_extrude(height=200)
76       PumpSideElevation();
77       translate([0,0,-100])
78         linear_extrude(height=200)
79         PumpSidePlan();
80     }
81     translate([-(baseplate + pump_main_dia/2), 0,
82                 -(pump_side_thick + pump_side_height)])
83       cylinder(r=pump_main_dia/2, h=200);
84   }
85 }
86
87 //PumpSidePlan();
88 //PumpSideElevation();
89 PumpSide();