diff --git a/X Carriage/X Carriage.scad b/X Carriage/X Carriage.scad index 23a4342..355fc3e 100644 --- a/X Carriage/X Carriage.scad +++ b/X Carriage/X Carriage.scad @@ -1,4 +1,5 @@ include <../lib/common.scad>; +include <../lib/examples.scad>; thickness = 6; width = 65; @@ -20,6 +21,7 @@ module base() { small_holes(); belt_holes(); endstop_holes(); + wheel_clerance(); } } @@ -33,6 +35,17 @@ module big_holes() { } +module wheel_clerance() { + diameter = 30; + diameter2 = 7; + translate([diameter2 / 2 + 5, diameter2 / 2 + 7, thickness]) + cylinder(d = diameter, h = thickness * 10); + + translate([width - (5 + diameter2 / 2), diameter2 / 2 + 7, thickness]) + cylinder(d = diameter, h = thickness * 10); + +} + module small_holes() { diameter = 5; @@ -57,21 +70,25 @@ module belt_holes() { module mount() { translate([(width - 35) / 2, 0]) { + rotate([90, 0, 0]) { difference() { union() { block_with_fillet(35, 30, thickness, 10); cube([35, 10, thickness]); + rotate([180, 0, 0]) + translate([0, - 20, 0]) + prism(35, 20, 23); } union() { translate([2.5 + 2, 20, 10]) rotate([180, 0, 0]) - screw_mount(length = 10, nut_size = 6, screw_size = 3, nut = "hexagon"); + screw_mount(length = 10, nut_size = 6, screw_size = 3, nut = "hexagon", nut_height = 30); translate([2.5 + 25, 20, 10]) rotate([180, 0, 0]) - screw_mount(length = 10, nut_size = 6, screw_size = 3, nut = "hexagon"); + screw_mount(length = 10, nut_size = 6, screw_size = 3, nut = "hexagon", nut_height = 30); } } } @@ -79,20 +96,6 @@ module mount() { } } -module screw_mount(length, nut_size, screw_size, nut = "none") { - translate([screw_size / 2, screw_size / 2, 0]) { - cylinder(d = screw_size + 3, h = screw_size); - cylinder(d = screw_size, h = length); - if (nut == "hexagon") { - translate([0, 0, length - 3]) - cylinder(d = nut_size, h = 3, $fn = 6); - } else if (nut == "square") { - translate([- nut_size / 2, - nut_size / 2, length - 3]) - cube([nut_size, nut_size, 3]); - } - } -} - module endstop_holes() { diameter = 2; translate([width - (diameter / 2 + 3), diameter / 2 + 16, - 0.1]) diff --git a/X Carriage/X Carriage.stl b/X Carriage/X Carriage.stl index f4937fb..e2a5253 100644 Binary files a/X Carriage/X Carriage.stl and b/X Carriage/X Carriage.stl differ diff --git a/lib/common.scad b/lib/common.scad index 4e4afcc..5a458c0 100644 --- a/lib/common.scad +++ b/lib/common.scad @@ -1,18 +1,18 @@ -module screw_mount(length, nut_size, screw_size, nut = "none") { +module screw_mount(length, nut_size, screw_size, nut = "none", nut_height = 3) { translate([screw_size / 2, screw_size / 2, 0]) { cylinder(d = screw_size + 3, h = screw_size); cylinder(d = screw_size, h = length); + if (nut == "hexagon") { translate([0, 0, length - 3]) - cylinder(d = nut_size, h = 3, $fn = 6); + cylinder(d = nut_size, h = nut_height, $fn = 6); } else if (nut == "square") { translate([- nut_size / 2, - nut_size / 2, length - 3]) - cube([nut_size, nut_size, 3]); + cube([nut_size, nut_size, nut_height]); } if (nut == "square+") { translate([- nut_size / 2, - nut_size / 2, length - 3]) - cube([nut_size+100, nut_size, 3]); + cube([nut_size + 100, nut_size, nut_height]); } - } } diff --git a/lib/examples.scad b/lib/examples.scad new file mode 100644 index 0000000..bd64356 --- /dev/null +++ b/lib/examples.scad @@ -0,0 +1,6 @@ +module prism(l, w, h) { + polyhedron( + points = [[0, 0, 0], [l, 0, 0], [l, w, 0], [0, w, 0], [0, w, h], [l, w, h]], + faces = [[0, 1, 2, 3], [5, 4, 3, 2], [0, 4, 5, 1], [0, 3, 4], [5, 2, 1]] + ); +} \ No newline at end of file