3c701ef56cbfd56b3cfa0e9cb3541883333b24d8
[clinton/prusa3.git] / box_frame / extras / tube_clamp.scad
1 //makes tube clamping part. Useful for strenghtening Z axis tubing or as holder for Z axis endstop.
2 // GNU GPL v3
3 // Václav 'ax' Hůla <axtheb@gmail.com>
4 include <../configuration.scad>;
5 $fn=64;
6
7 module tube_clamp(tube_r, wall_width=3, endstop=false) {
8 //wall_width is in single_wall_widths
9 difference() {
10 union(){
11 intersection() {
12 union(){
13 cylinder(r=tube_r + wall_width * single_wall_width, h=10);
14 translate([-4.5, 0, 0]) cube([9, 20, 10]);
15 }
16 cylinder(r=tube_r + 5 + wall_width * single_wall_width, h=10);
17 }
18 if (endstop) {
19 translate([-4.5, 5 + tube_r, 0]) cube([4.5, 30, 10]);
20 }
21 }
22 translate([0, 0, -0.5]) cylinder(r=tube_r, h=11);
23 translate([-0.5, 0, -0.5]) cube([1, 45, 11]);
24
25 translate([-7, max (6, tube_r + wall_width * single_wall_width + 0.5) , 5]) {
26 rotate([0, 90, 0]) screw(r=1.7, r_head=m3_washer_diameter/2, head_drop=3, slant=false);
27 translate([10, 0, 0]) rotate([0, 90, 0]) cylinder(r=m3_nut_diameter_horizontal/2, $fn=6, h=2);
28 }
29 if (endstop) {
30 translate([-7, 10 + tube_r, 5]) rotate([0, 90, 0]) {
31 cylinder(r = 1.2, h=10);
32 translate([0, 10, 0])
33 cylinder(r = 1.2, h=10);
34 translate([0, 20, 0])
35 cylinder(r = 1.2, h=10);
36 }
37 }
38
39 }
40 }
41
42 tube_clamp(3.5);
43 translate([15, 0, 0]) tube_clamp(3.5);
44 translate([0, 20, 0]) {
45 tube_clamp(bushing_xy[0], endstop=true);
46 translate([20, 0, 0]) tube_clamp(bushing_xy[0], endstop=true);
47 translate([-20, 0, 0]) tube_clamp(bushing_z[0], endstop=true);
48 }