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