]> www.fi.muni.cz Git - things.git/blob - din-quido.scad
Proof of concept of a bumper for mini arrow
[things.git] / din-quido.scad
1 infty = 300;
2 eps = 0.1;
3
4 wall = 3;
5 stem_wall = 4.5;
6
7 papouch_h = 123.2 + 0.7;
8 w = 20;
9
10 module din(height) {
11         assign(
12                 din_h = 35,
13                 din_thick = 2,
14                 din_clip = 4,
15                 din_bottom_d = 10,
16                 din_bottom_thick = 1.0,
17                 din_bottom_hole = 0.7
18         ) {
19                 // front part
20                 translate([-din_h/2 -wall, 0, 0])
21                         cube([din_h + 2*wall, wall, height]);
22                 // top plate
23                 translate([din_h/2, 0, 0]) 
24                         cube([wall, 2*wall + din_thick, height]);
25                 // behind the top plate
26                 translate([din_h/2 - din_clip, wall + din_thick, 0])
27                         cube([din_clip + wall, wall, height]);
28
29                 // bottom spring
30                 translate([-din_h/2 - din_bottom_d/2, din_bottom_d/2+wall-din_bottom_thick, 0])
31                 difference() {
32                         cylinder(r = din_bottom_d/2, h = height, $fn = 32);
33                         translate([0, 0, -eps])
34                                 cylinder(r = din_bottom_d/2 - din_bottom_thick,
35                                         h = height+2*eps, $fn = 16);
36                         translate([0, -din_bottom_d/2 + din_bottom_thick, -eps]) 
37                                 cube([din_bottom_d, din_bottom_hole, height + 2*eps]);
38                 };
39         };
40 };
41
42 module pcb_end(comp_h, pcb_h, pcb_border, height) {
43         translate([-wall, 0, 0])
44                 cube([wall+pcb_border, wall, height]);
45         translate([-wall, wall-eps, 0])
46                 cube([wall, pcb_h+eps, height]);
47         intersection() {
48                 translate([-wall, 0, 0])
49                         cube([2*wall, wall+pcb_h+5, height]);
50                 translate([-3, wall+pcb_h + 5/2, 0])
51                         cylinder(r=4, h=height);
52         }
53 }
54 module papouch(len, height, clip) {
55         // back
56         translate([-len/2-wall, -stem_wall, 0])
57                 cube([len+2*wall, stem_wall+eps, height]);
58         for (x = [-1, 1]) scale([x, 1, 1]) {
59                 translate([-len/2, 0, 0])
60                         pcb_end(3, 1.6, 5, height);
61                 translate([-len/6, 0, 0])
62                         cube([wall, wall, height]);
63         }
64 };
65
66         
67 rotate([0, 0, 180]) din(w);
68 translate([0, stem_wall-wall, 0]) papouch(papouch_h, w, 5.5);
69
70