From f23b960006e9dffc7dcedcf4f7dff8d7c2a41775 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Thu, 7 Jul 2016 10:42:56 +0200 Subject: [PATCH] DIN rail holder for Papouch Quido in metal case --- din-quido-case.scad | 70 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 din-quido-case.scad diff --git a/din-quido-case.scad b/din-quido-case.scad new file mode 100644 index 0000000..cbed4a9 --- /dev/null +++ b/din-quido-case.scad @@ -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); + + -- 2.43.0