| 1 | // PRUSA iteration3 |
| 2 | // Y frame brackets |
| 3 | // GNU GPL v3 |
| 4 | // Josef Průša <josefprusa@me.com> |
| 5 | // Václav 'ax' Hůla <axtheb@gmail.com> |
| 6 | // http://www.reprap.org/wiki/Prusa_Mendel |
| 7 | // http://github.com/josefprusa/Prusa3 |
| 8 | |
| 9 | // ThingDoc entry |
| 10 | /** |
| 11 | * @id yFrameBracket |
| 12 | * @name Y Axis Frame Bracket |
| 13 | * @category Printed |
| 14 | */ |
| 15 | |
| 16 | include <configuration.scad> |
| 17 | |
| 18 | module bolt_track(width, length, height) { |
| 19 | hwidth = width / 2; |
| 20 | hdiff = hwidth - height; |
| 21 | union() { |
| 22 | difference() { |
| 23 | rotate([90, 0, 0]) |
| 24 | translate([hwidth, height, -length]) |
| 25 | cylinder(h=length, r=hwidth, $fn=$fn); |
| 26 | |
| 27 | if (height < hwidth) { |
| 28 | translate([0, -1, height - hwidth - 1]) |
| 29 | cube([width, length + 2, hdiff + 1]); |
| 30 | } |
| 31 | } |
| 32 | cube([width, length, height]); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | function bracket_width(screw_area) = screw_area * 2 + y_threaded_rod_long_r * 2; |
| 37 | function bracket_depth(lip_thickness, screw_area) = screw_area * 2 + lip_thickness; |
| 38 | function bracket_height(lip_length=0) = y_threaded_rod_long_r * 2 + 6 * layer_height + lip_length; |
| 39 | |
| 40 | module yrodbracket(screw_area, lip_thickness, lip_length, bevel_size=2.0) { |
| 41 | inner_radius = threaded_rod_diameter / 2; |
| 42 | screw_center = screw_area / 2; |
| 43 | |
| 44 | width = bracket_width(screw_area); |
| 45 | depth = bracket_depth(lip_thickness, screw_area); |
| 46 | height = bracket_height(lip_length); |
| 47 | |
| 48 | difference() { |
| 49 | translate([0, 0, -lip_length]) |
| 50 | cube_fillet([width, depth, height], bevel_size, top=[2, 2, 2, 2]); |
| 51 | translate([screw_area, -1, -lip_length - lip_thickness]) |
| 52 | bolt_track(y_threaded_rod_long_r * 2, depth + 2, lip_length + lip_thickness + inner_radius); |
| 53 | |
| 54 | translate([-1, lip_thickness, -lip_length - 1]) |
| 55 | cube([width + 2, depth, lip_length + 1]); |
| 56 | |
| 57 | // screw holes |
| 58 | for (x = [screw_center, width - screw_center]) { |
| 59 | for (y = [lip_thickness + screw_center, screw_area + lip_thickness + screw_center]) { |
| 60 | translate([x, y, bracket_height() + 0.1]) |
| 61 | rotate([180, 0, 0]) |
| 62 | screw(head_drop=3, r_head=4.5); |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | rotate([90, 0, 0]) { |
| 69 | for (x = [0, bracket_width(12) + 5]) { |
| 70 | for (y = [0, bracket_height(3) + 5]) { |
| 71 | translate([x, 0, y]) |
| 72 | yrodbracket(12, 3, 3); |
| 73 | } |
| 74 | } |
| 75 | } |