1 include <configuration.scad>
3 module bolt_track(width, length, height) {
5 hdiff = hwidth - height;
9 translate([hwidth, height, -length])
10 cylinder(h=length, r=hwidth, $fn=$fn);
12 if (height < hwidth) {
13 translate([0, -1, height - hwidth - 1])
14 cube([width, length + 2, hdiff + 1]);
17 cube([width, length, height]);
21 function bracket_width(screw_area) = screw_area * 2 + y_threaded_rod_long_r * 2;
22 function bracket_depth(lip_thickness, screw_area) = screw_area * 2 + lip_thickness;
23 function bracket_height(lip_length=0) = y_threaded_rod_long_r * 2 + 6 * layer_height + lip_length;
25 module yrodbracket(screw_area, lip_thickness, lip_length, bevel_size=2.0) {
26 inner_radius = threaded_rod_diameter / 2;
27 screw_center = screw_area / 2;
29 width = bracket_width(screw_area);
30 depth = bracket_depth(lip_thickness, screw_area);
31 height = bracket_height(lip_length);
34 translate([0, 0, -lip_length])
35 cube_fillet([width, depth, height], bevel_size, top=[2,2,2,2]);
36 translate([screw_area, -1, -lip_length - lip_thickness])
37 bolt_track(y_threaded_rod_long_r * 2, depth + 2, lip_length + lip_thickness + inner_radius);
39 translate([-1, lip_thickness, -lip_length - 1])
40 cube([width + 2, depth, lip_length + 1]);
43 for (x = [screw_center, width - screw_center]) {
44 for (y = [lip_thickness + screw_center, screw_area + lip_thickness + screw_center]) {
45 translate([x, y, bracket_height() + 0.1])
54 for (x = [0, bracket_width(12) + 5]) {
55 for (y = [0, bracket_height(3) + 5]) {
57 yrodbracket(12, 3, 3);