]> www.fi.muni.cz Git - things.git/commitdiff
DIN rail holder for Papouch Quido in metal case
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Thu, 7 Jul 2016 08:42:56 +0000 (10:42 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Thu, 7 Jul 2016 08:42:56 +0000 (10:42 +0200)
din-quido-case.scad [new file with mode: 0644]

diff --git a/din-quido-case.scad b/din-quido-case.scad
new file mode 100644 (file)
index 0000000..cbed4a9
--- /dev/null
@@ -0,0 +1,70 @@
+infty = 300;
+eps = 0.1;
+
+wall = 3;
+stem_wall = 4.5;
+
+papouch_h = 126 + 0.7;
+w = 20;
+
+module din(height) {
+       assign(
+               din_h = 35,
+               din_thick = 2,
+               din_clip = 4,
+               din_bottom_d = 10,
+               din_bottom_thick = 1.0,
+               din_bottom_hole = 0.7
+       ) {
+               // front part
+               translate([-din_h/2 -wall, 0, 0])
+                       cube([din_h + 2*wall, wall, height]);
+               // top plate
+               translate([din_h/2, 0, 0]) 
+                       cube([wall, 2*wall + din_thick, height]);
+               // behind the top plate
+               translate([din_h/2 - din_clip, wall + din_thick, 0])
+                       cube([din_clip + wall, wall, height]);
+
+               // bottom spring
+               translate([-din_h/2 - din_bottom_d/2, din_bottom_d/2+wall-din_bottom_thick, 0])
+               difference() {
+                       cylinder(r = din_bottom_d/2, h = height, $fn = 32);
+                       translate([0, 0, -eps])
+                               cylinder(r = din_bottom_d/2 - din_bottom_thick,
+                                       h = height+2*eps, $fn = 16);
+                       translate([0, -din_bottom_d/2 + din_bottom_thick, -eps]) 
+                               cube([din_bottom_d, din_bottom_hole, height + 2*eps]);
+               };
+       };
+};
+
+module case_end(pcb_h, pcb_border, height) {
+       translate([-wall, 0, 0])
+               cube([wall+pcb_border, wall, height]);
+       translate([-wall, wall-eps, 0])
+               cube([wall, pcb_h+eps, height]);
+       intersection() {
+               translate([-wall, wall+pcb_h, 0])
+                       cube([3*wall, 5, height]);
+               translate([-2, wall+pcb_h + 4, 0])
+                       cylinder(r=5, h=height);
+       }
+}
+module papouch(len, height, clip) {
+       // back
+       translate([-len/2-wall, -stem_wall, 0])
+               cube([len+2*wall, stem_wall+eps, height]);
+       for (x = [-1, 1]) scale([x, 1, 1]) {
+               translate([-len/2, 0, 0])
+                       case_end(7.5 +0.7, 5, height);
+               translate([-len/6, 0, 0])
+                       cube([wall, wall, height]);
+       }
+};
+
+       
+rotate([0, 0, 180]) din(w);
+translate([0, stem_wall-wall, 0]) papouch(papouch_h, w, 5.5);
+
+