]> www.fi.muni.cz Git - things.git/commitdiff
DIN rail holder for Papouch TCP2RTU
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 9 Feb 2015 14:58:24 +0000 (15:58 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Mon, 9 Feb 2015 14:58:24 +0000 (15:58 +0100)
din-papouch.scad [new file with mode: 0644]

diff --git a/din-papouch.scad b/din-papouch.scad
new file mode 100644 (file)
index 0000000..b5476ac
--- /dev/null
@@ -0,0 +1,57 @@
+infty = 300;
+eps = 0.1;
+
+wall = 3;
+
+papouch_h = 55;
+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 papouch(len, height, clip) {
+       // front part
+       translate([-len/2 - wall, 0, 0])
+               cube([len + 2*wall, wall, height]);
+       // top plate
+       translate([len/2, -clip, 0]) 
+               cube([wall, wall+clip, height]);
+       // bottom plate
+       translate([-len/2-wall, -clip, 0]) 
+               cube([wall, wall+clip, height]);
+};
+
+       
+din(w);
+papouch(papouch_h, w, 5.5);
+
+