diff options
Diffstat (limited to 'body/stand.scad')
| -rw-r--r-- | body/stand.scad | 224 |
1 files changed, 197 insertions, 27 deletions
diff --git a/body/stand.scad b/body/stand.scad index c583ec5..ea450b4 100644 --- a/body/stand.scad +++ b/body/stand.scad @@ -1,4 +1,5 @@ include <body.scad> +include <body_config.scad> include <helpers.scad> include <holes.scad> @@ -28,15 +29,120 @@ sws = side_wall_s; limit_switch_pcb_s = [40, 17, 1.6]; ls_pcb_s = limit_switch_pcb_s; +carriage_s = [80, 50, 32]; +// scanner coords +carriage_top_y_offset = 56; +carriage_z_pos = 240; + module profile_20x20x50() { - scale([1, 1, 2]) + scale([1, 1, 10]) translate([-0.06, -61, -10]) import("Modular profile 20x20 - 973094/files/Profilo_20x20_L50.stl"); } -// hot inserts for m4 are not needed -module m4_screw_hole(hole_side) +module calibration_template() +{ + zo = 5; + cs = carriage_s; + // TODO: create a global var for this + lhs = laser_holder_size(); + + top_s = [bshs[0] + bwt * 2, sws[1], wt * 2]; + cut_s = [main_frame_width_x, sws[1] * 2, wt + $tiny_padding * 2]; + + // decrease if there are some reflections + adjustment_z = -0; + + translate([0, carriage_z_pos + carriage_s[1] - 5, lhs[2] / 2]) + translate([0, top_s[1] / 2, cut_s[2] / 2 + bshs[2] + bwt + wt]) + // arranged: should switch from triangles to surface + // by rotating by 180 around scanner z axis + translate([0, 0, adjustment_z]) + union() + { + // centered + rotate([0, 180, 0]) + { + color("green", 0.3) + translate([-125, 0, zo]) + translate([85, -50, -5.8]) + rotate([-90, 0, 0]) + rotate([0, 90, 0]) + import("calibration_template.stl"); + } + + { + color("blue", 0.3) + translate([-125, 0, zo]) + translate([85, -54, -5.8]) + rotate([-90, 0, 0]) + rotate([0, 90, 0]) + import("calibration_template.stl"); + } + + color("blue") + { + x_offsets = [-30, 0, 30]; + y_offsets = [0, 4]; + + for (xo = x_offsets, yo = y_offsets) + { + translate([xo, -cs[1] + 0.45 + yo, 0]) + cylinder($fn = dToFn(m3), d = m3, h = 100, center = true); + } + } + } +} + +module calibration_template_holder() +{ + cs = carriage_s; + + calibration_template_holder_s = [cs[0], cs[1], 8]; + cths = calibration_template_holder_s; + + yo = cs[1] / 2 + carriage_z_pos; + //zo = -cs[2] / 2 - 20 + carriage_top_y_offset;// + cs[2]; + zo = - 20 + carriage_top_y_offset + cths[2] / 2; + + + difference() + { + translate([0, yo, zo]) + { + color("orange", 0.5) + cube(cths, center = true); + + top_cube_s = [cths[0], 13, 10.5]; + tcs = top_cube_s; + + color("red", 0.5) + translate([-tcs[0] / 2, -3, 4]) + cube(tcs); + } + + //color("red") + translate([0, 0, cths[2] / 2]) + carriage_screw_holes(); + } +} + +module calibration_template_holder_to_print() +{ + difference() + { + calibration_template_holder(); + calibration_template(); + } +} + + +// hot inserts for m4 are not needed; +// d_padding - diameter delta. can be set to 0 +// if cutting a thread with a screw is needed, and +// to 0.5 for just a screw hole +module m4_screw_hole(hole_side, d_padding = 0.5) { screw_hole( m = m4 + 0.2, @@ -79,6 +185,53 @@ ls_pcb_h_delta_long = 1.3; ls_pcb_h_delta_short = 1.1; ls_pcb_h_delta_btw_holes = 19; +// 56 +// w 80 d 50 h 32 + +module carriage_screw_holes(d_padding) +{ + cs = carriage_s; + yo = cs[1] / 2 + carriage_z_pos; + zo = -cs[2] / 2 - 20 + carriage_top_y_offset; + + // scanner coords + distance_between_holes_x = 60; + distance_between_holes_z = 30; + dbhx = distance_between_holes_x; + dbhz = distance_between_holes_z; + + translate([0, yo, zo]) + { + for (xo = [-dbhx / 2, dbhx / 2], yo = [-dbhz / 2, dbhz / 2]) + { + translate([xo, yo, cs[2] / 2]) + m4_screw_hole(hole_side_top, d_padding = d_padding); + } + } +} + +module carriage() +{ + +// carriage_top_z_offset + cs = carriage_s; + yo = cs[1] / 2 + carriage_z_pos; + zo = -cs[2] / 2 - 20 + carriage_top_y_offset; + + + difference() + { + translate([0, yo, zo]) + { + color("grey", 0.5) + cube(carriage_s, center = true); + } + + //color("red") + carriage_screw_holes(); + } +} + // limit switch designed by makerbot.com // instructions: www.bigtree-tech.com // license: GPLv3 @@ -137,7 +290,6 @@ module limit_switch() module base() { - // base color("orange", 0.4) { @@ -292,17 +444,6 @@ module scanner_holder() } } -*stand(); - -*union() -{ - base(); - translate([0, sws[1], -20 + sws[2]]) - limit_switch(); - base_side_screw_holes(); - stand_top_m3_holes(); -} - module scanner_holder_to_print() { difference() @@ -312,20 +453,49 @@ module scanner_holder_to_print() } } -*translate([0, -back_wall_offset + wt, -20 + sws[2] + bwt + wt]) -translate([0, 0, laser_holder_size()[2] / 2 + wt]) +module visualize_stand() { - scanner_side_hole_cutters(); + carriage(); - color("yellow", 0.2) - body_to_print(); -} + calibration_template(); + calibration_template_holder(); + *calibration_template_holder_to_print(); -//stand_top_m3_holes(); -//stand_top_m3_screw_holes(); + stand(); -color("grey", 0.6) -*base_to_print(); + union() + { + base(); + translate([0, sws[1], -20 + sws[2]]) + limit_switch(); + base_side_screw_holes(); + stand_top_m3_holes(); + } + + + + translate([0, -back_wall_offset + wt, -20 + sws[2] + bwt + wt]) + translate([0, 0, laser_holder_size()[2] / 2 + wt]) + { + scanner_side_hole_cutters(); + + color("yellow", 0.2) + body_to_print(); + color("green", 0.3) + + visualize_range(); + visualize_xz_range(); + + } + + //stand_top_m3_holes(); + //stand_top_m3_screw_holes(); + + color("grey", 0.6) + base_to_print(); + + //scanner_holder(); + scanner_holder_to_print(); +} -//scanner_holder(); -scanner_holder_to_print();
\ No newline at end of file +visualize_stand();
\ No newline at end of file |
