diff --git a/Makefile b/Makefile index cc35916..6646800 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,31 @@ include $(wildcard *.deps) ${OPENSCAD} -m make -o $@ -d $@.deps $< clean: - rm -f ${TARGETS} *.deps + rm -f ${TARGETS} *.deps snappy_rot*.png rendering: - ${OPENSCAD} -o wiki/snappy_full.png --imgsize=3200,3200 --projection=p --csglimit=100000 --camera=-100,200,150,65,0,120,3500 full_assembly.scad + ${OPENSCAD} -o wiki/snappy_full.png --imgsize=3200,3200 --projection=p --csglimit=100000 \ + --camera=0,0,160,65,0,120,3500 full_assembly.scad cp wiki/snappy_full.png wiki/snappy_small.png sips -Z 800 wiki/snappy_full.png sips -Z 200 wiki/snappy_small.png +ROTFILES=$(shell seq -f 'snappy_rot%03g.png' 0 15 359.99) + +${ROTFILES}: full_assembly.scad + ${OPENSCAD} -o $@ --imgsize=1280,1280 --projection=p --csglimit=100000 \ + --camera=0,0,160,65,0,$(subst snappy_rot,,$(subst .png,,$@)),3500 \ + full_assembly.scad + sips --deleteColorManagementProperties -Z 640 $@ + +wiki/snappy_animated.gif: ${ROTFILES} + convert -delay 33 -loop 0 ${ROTFILES} wiki/snappy_animated.gif + +wiki/snappy_anim_small.gif: ${ROTFILES} + convert -resize 200x200 -delay 33 -loop 0 ${ROTFILES} wiki/snappy_anim_small.gif + +animation: wiki/snappy_animated.gif wiki/snappy_anim_small.gif + + + diff --git a/acme_screw.scad b/acme_screw.scad index 6d82c60..4e880cf 100644 --- a/acme_screw.scad +++ b/acme_screw.scad @@ -1,3 +1,4 @@ +include use @@ -35,7 +36,7 @@ module acme_threaded_nut( h=10, threading=3.175, thread_depth=1, - slop=0.25 + slop=printer_slop ) { difference() { cylinder(r=od/2/cos(30), h=h, center=true, $fn=6); diff --git a/config.scad b/config.scad index d8b6a15..5df08ff 100644 --- a/config.scad +++ b/config.scad @@ -5,7 +5,6 @@ platform_length = 110; // mm. Must be a multiple of rack_tooth_size. platform_width = 150; // mm platform_height = 40; // mm platform_thick = 7; // mm -rack_tooth_size = 5; // mm per tooth. rail_length = 150; // mm rail_height = 50; // mm @@ -21,7 +20,11 @@ roller_angle = 30; // degrees joiner_angle = 30; // degrees joiner_width = 10; // mm -joiner_slop = 0.5; // mm + +rack_tooth_size = 5; // mm per tooth. +set_screw_size = 3; // mm size of set screw in drive gears, couplers, etc +motor_shaft_size = 5; // mm +motor_shaft_flatted = false; // boolean // Currently configured for 3/8" ACME threaded rod and matching 11/16" nut lifter_rod_diam = 9.5; // mm @@ -30,6 +33,10 @@ lifter_nut_size = 17.4; // mm lifter_nut_thick = 9.3; // mm lifter_thread_size = 3.175; // mm lift per revolution +// This is the slop needed to make parts fit more exactly, and may be +// printer dependant. Printing a slop calibration plate should help +// dial this setting in for your printer. +printer_slop = 0.25; // mm diff --git a/drive_gear_parts.scad b/drive_gear_parts.scad index da1414c..924993c 100644 --- a/drive_gear_parts.scad +++ b/drive_gear_parts.scad @@ -5,14 +5,15 @@ use module drive_gear() { h = 10; - shaft = 5.4; + shaft = motor_shaft_size + 2 * printer_slop; + color("Salmon") render(convexity=10) union() { difference() { // Herringbone gear mirror_copy([0, 0, 1]) { translate([0, 0, h/4]) { gear ( - mm_per_tooth = 5, + mm_per_tooth = rack_tooth_size, number_of_teeth = 9, thickness = h/2, hole_diameter = shaft, @@ -29,7 +30,7 @@ module drive_gear() { difference() { union() { // Fix up gear weirdness with solid center. - cylinder(h=h, r=5.5, center=true); + cylinder(h=h, r=shaft, center=true); // Base translate([0, 0, -(h+11)/2]) @@ -40,23 +41,25 @@ module drive_gear() { // Shaft hole cylinder(h=(h+5)*3, r=shaft/2, center=true, $fn=16); - // Shaft flat side. - translate([1.4*shaft, 0, 0]) - cube(size=[shaft*2, shaft*2, (h+6)*3], center=true); + if (motor_shaft_flatted) { + // Shaft flat side. + translate([1.4*shaft, 0, 0]) + cube(size=[shaft*2, shaft*2, (h+6)*3], center=true); + } } - translate([5/2+1, 0, -(h/2+5+11)/2]) { + translate([motor_shaft_size/2+1.5, 0, -(h/2+5+11)/2]) { yrot(90) { // Nut Slot scale([1.1, 1.1, 1.1]) hull() { - metric_nut(size=3, hole=false); + metric_nut(size=set_screw_size, hole=false); translate([5, 0, 0]) - metric_nut(size=3, hole=false); + metric_nut(size=set_screw_size, hole=false); } // Set screw hole. translate([0, 0, 2]) - cylinder(r=3.2/2, h=9, center=true, $fn=8); + cylinder(r=(set_screw_size+printer_slop)/2, h=9, center=true, $fn=8); } } } diff --git a/full_assembly.scad b/full_assembly.scad index 22655e2..d3e4810 100644 --- a/full_assembly.scad +++ b/full_assembly.scad @@ -188,7 +188,7 @@ module full_assembly() -full_assembly(); +translate([0,-1.5*rail_length,0]) full_assembly(); diff --git a/joiners.scad b/joiners.scad index 2600661..6a60fae 100644 --- a/joiners.scad +++ b/joiners.scad @@ -2,7 +2,7 @@ include use -module joiner(h=40, w=10, l=10, a=30, screwsize=3, guides=true) +module joiner(h=40, w=10, l=10, a=30, screwsize=3, guides=true, slop=printer_slop) { dmnd_height = h/2; dmnd_width = dmnd_height*tan(a); @@ -28,15 +28,15 @@ module joiner(h=40, w=10, l=10, a=30, screwsize=3, guides=true) // Make tab translate([0,0,dmnd_height/2]) { translate([0, -dmnd_width/4, 0]) - cube(size=[w/3-joiner_slop, dmnd_width/2, dmnd_height], center=true); - scale([w/3-joiner_slop, dmnd_width/2, dmnd_height/2]) xrot(45) + cube(size=[w/3-slop*2, dmnd_width/2, dmnd_height], center=true); + scale([w/3-slop*2, dmnd_width/2, dmnd_height/2]) xrot(45) cube(size=[1,sqrt(2),sqrt(2)], center=true); } // Guide ridges. if (guides == true) { translate([0,0,dmnd_height/2]) { - grid_of(xa=[-(w/6-joiner_slop/2), (w/6-joiner_slop/2)]) { + grid_of(xa=[-(w/6-slop), (w/6-slop)]) { // Guide ridge. scale([0.75, 1, 2]) yrot(45) cube(size=[guide_size/sqrt(2), dmnd_width, guide_size/sqrt(2)], center=true); diff --git a/lifter_rod_coupler_part.scad b/lifter_rod_coupler_part.scad index addcdad..f7261e2 100644 --- a/lifter_rod_coupler_part.scad +++ b/lifter_rod_coupler_part.scad @@ -6,8 +6,8 @@ use module lifter_rod_coupler() { h = 50; - shaft = 5.2; - setscrew = 3.2; + set_screw_rad = set_screw_size/2 + printer_slop; + shaft = motor_shaft_size + printer_slop; color("Lavender") difference() { // Coupler cylinder. @@ -18,9 +18,11 @@ module lifter_rod_coupler() // Stepper shaft hole cylinder(h=h/2, r=shaft/2, center=true, $fn=16); - // Shaft flat side. - translate([1.4*shaft, 0, 0]) - cube(size=[shaft*2, shaft*2, h/2+1], center=true); + if (motor_shaft_flatted == true) { + // Shaft flat side. + translate([1.4*shaft, 0, 0]) + cube(size=[shaft*2, shaft*2, h/2+1], center=true); + } } //Stepper set screw @@ -28,14 +30,14 @@ module lifter_rod_coupler() yrot(90) { // Nut Slot translate([0, 0, 1]) scale([1.1, 1.1, 1.1]) hull() { - metric_nut(size=3, hole=false); + metric_nut(size=set_screw_size, hole=false); translate([10, 0, 0]) - metric_nut(size=3, hole=false); + metric_nut(size=set_screw_size, hole=false); } // Set screw hole. translate([0, 0, 2.5]) - cylinder(r=setscrew/2, h=12, center=true, $fn=8); + cylinder(r=set_screw_rad, h=12, center=true, $fn=8); } } } @@ -49,14 +51,14 @@ module lifter_rod_coupler() yrot(90) { // Nut Slot translate([0, 0, 1]) scale([1.1, 1.1, 1.1]) hull() { - metric_nut(size=3, hole=false); + metric_nut(size=set_screw_size, hole=false); translate([-10, 0, 0]) - metric_nut(size=3, hole=false); + metric_nut(size=set_screw_size, hole=false); } // Set screw hole. translate([0, 0, 2.5]) - cylinder(r=setscrew/2, h=10, center=true, $fn=8); + cylinder(r=set_screw_rad, h=10, center=true, $fn=8); } } } diff --git a/nut_capture.scad b/nut_capture.scad index 2985563..fefe4ca 100644 --- a/nut_capture.scad +++ b/nut_capture.scad @@ -1,6 +1,7 @@ +include use -module nut_capture(nut_size=17.4, nut_thick=9.5, offset=18, slop=0.25, wall=3) +module nut_capture(nut_size=17.4, nut_thick=9.5, offset=18, slop=printer_slop, wall=3) { nut_rad = nut_size/cos(30)/2; base = (offset - nut_rad); diff --git a/roller_cap_parts.scad b/roller_cap_parts.scad index c8840bc..7424595 100644 --- a/roller_cap_parts.scad +++ b/roller_cap_parts.scad @@ -3,7 +3,7 @@ use -module roller_cap(r=5.0, h=10, wall=3, cap=2, lip=1.5, shelf=2.4, slop=0.25) +module roller_cap(r=5.0, h=10, wall=3, cap=2, lip=1.5, shelf=2.4, slop=printer_slop) { $fn = 16; color("Pink") difference() { diff --git a/tolerances_test_part.scad b/slop_calibration_parts.scad similarity index 62% rename from tolerances_test_part.scad rename to slop_calibration_parts.scad index 47ae7ac..672d09f 100644 --- a/tolerances_test_part.scad +++ b/slop_calibration_parts.scad @@ -43,7 +43,7 @@ module float_seven_segment(val=0.0, decim=2, size=10, h=1, suppress=false) } for (p = [mag:-1:-decim]) { translate([-0.8*size*(p+0.5), 0, 0]) { - assign(d = floor(abs(val)/pow(10, p)) % 10) { + assign(d = floor(abs(val)/pow(10, p)+0.000001) % 10) { if (p == -1) { translate([-0.8*size/2, -size/2, 0]) cube(size=[size*0.1, size*0.1, h], center=true); @@ -57,29 +57,39 @@ module float_seven_segment(val=0.0, decim=2, size=10, h=1, suppress=false) -module tolerances_test_part() { // make me - for (i = [0:5]) { - translate([-20*i, 0, 0]) - zrot(90) - difference() { - nut_capture( - nut_size=lifter_nut_size, - nut_thick=lifter_nut_thick, - offset=lifter_nut_size/2+5, - wall=3, - slop=0.05*i - ); - translate([lifter_nut_size/2+3, -6, 10]) { - zrot(90) xrot(90) float_seven_segment(val=0.05*i, decim=2, size=8, h=1, suppress=true); +module slop_calibration_parts() { // make me + rows = 5; + cols = 2; + r = 10; + h = 15; + step = 0.05; + spacing = r*2+10; + for (col = [0:cols-1]) { + translate([-col*spacing*1.25+(cols-1)*spacing*1.25/2, 0, h/2]) { + difference() { + cube(size=[spacing, rows*spacing, h], center=true); + for (row = [0:rows-1]) { + assign(slop = (step*rows*col)+step*row) { + translate([0, spacing*row-(rows-1)*spacing/2, 0]) { + cylinder(r=r+slop, h=h+1, center=true); + translate([spacing/2, -7, 0]) { + zrot(90) xrot(90) float_seven_segment(val=slop, decim=2, size=8, h=1, suppress=true); + } + } } } + } + } + } + translate([(cols+1)*1.25*spacing/2, 0, h/2]) { + cylinder(r=r, h=h, center=true); + translate([0,0,-h/4]) cylinder(r=r+2, h=h/2, center=true); } - translate([ 20, 0, 2]) yrot(180) zrot(90) lifter_nut_cap(); } -tolerances_test_part(); +slop_calibration_parts(); diff --git a/tslot.scad b/tslot.scad index 919403e..1deaaa7 100644 --- a/tslot.scad +++ b/tslot.scad @@ -25,7 +25,7 @@ module lock_tab(h=30, wall=3, slop=0.0) -module lock_slot(h=30, wall=3, backing=0, slop=0.3) +module lock_slot(h=30, wall=3, backing=0, slop=printer_slop) { s1 = 2*wall+slop/2; s2 = wall+slop/2; diff --git a/wiki b/wiki index a5c942e..2b39ba4 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit a5c942ebef2070384697702ef066d776f5928d7e +Subproject commit 2b39ba4f5ef1507ba7b14b29979a7cfe52895296