z-axis: shift mounts to under parts
[clinton/prusa3.git] / box_frame / extras / endstop-holder-extra.scad
1 // PRUSA Mendel
2 // Endstop holder extra adapter rotator
3 // Used to rotate endstops for Prusa i2/i3 endstop holders
4 // GNU GPL v3
5 // Ethan Sherman
6 // ethan@blackguest.net
7
8 include <../configuration.scad>
9
10 /**
11 * This endstop adapter has 3 holes for endstops with either 10mm or 20mm spacing.
12 * It is designed to fit on the original endstop-holder to rotate a mechanical endstop 90 degrees.
13 *
14 * @id endstop-holder-extra
15 * @name Endstop holder extra
16 * @category Printed
17 */
18 module endstop_extra(shaft_radius){
19 screw_hole_spacing = 20;
20 screw_hole_spacing2 = 10;
21
22 segments=64;
23
24 difference(){
25 union(){
26 // for reference, here is the main endstop arm
27 //translate([-30, 0, 0]) cube([40, 4, 10]);
28
29 // endstop arm mount
30 translate([-20, -35.99, -5]) cube([10, 35, 5]);
31 // main sliding endstop mount slider plate
32 translate([-30, -5, -5]) cube([30, 5, 15]);
33 // extra overhang support (may not be easy to print in this orientation)
34 //#translate([-30, -0, -5]) cube([30, 6, 5]);
35
36 // extra curved arm support (optional)
37 difference(){
38 translate([-30, -15, -5]) cube([30, 11, 5]);
39 translate([-10, -10, -10]) rotate([0, 0, 90])
40 translate([-5, -10, -1]) rotate([0, 0, 0]) cylinder(h =20, r = 10, $fn = segments);
41 translate([-40, -10, -10]) rotate([0, 0, 90])
42 translate([-5, -10, -1]) rotate([0, 0, 0]) cylinder(h =20, r = 10, $fn = segments);
43 }
44 }
45
46 // main slot
47 for (z = [0:20]){
48 translate([-(5+screw_hole_spacing) + z, 7, 5]) rotate([90, 0, 0]) cylinder(h =20, r = m3_diameter/2, $fn = segments);
49 }
50
51 // small m2 holes
52 translate([-25, -8, -10]) rotate([0, 0, 90]){
53 translate([-5, -10, -1]) rotate([0, 0, 0]) cylinder(h =20, r = m2_diameter/2, $fn = segments);
54 translate([-(5+screw_hole_spacing), -10, -1]) rotate([0, 0, 0]) cylinder(h =20, r = m2_diameter/2, $fn = segments);
55 translate([-(5+screw_hole_spacing2), -10, -1]) rotate([0, 0, 0]) cylinder(h =20, r = m2_diameter/2, $fn = segments);
56 }
57 }
58 }
59
60 rotate([-90, 0, 0]) endstop_extra(bushing_xy[0]);