diff --git a/holodisk.scad b/holodisk.scad index 3745bd1..882f490 100755 --- a/holodisk.scad +++ b/holodisk.scad @@ -7,6 +7,7 @@ use use include +use disk_size = get_holodisk_size(); holodisk_size = get_holodisk_size(); @@ -235,7 +236,7 @@ module frame(size) { module laserwindow_slider_cover() { cover_size=[ get_holodisk_laserwindow_size().x, - rails_size.y + overlap*2, + get_holodisk_slide_slider_size().x, get_holodisk_slide_slider_size().z ]; cover_plate=[cover_size.x, rail_size.y, cover_size.z]; @@ -247,7 +248,7 @@ module frame(size) { translate(cover_pos) hull() { fwd(cover_plate.y) cube(cover_plate); - fwd(cover_top.y) up((cover_plate.z-cover_top.z)/2) cube(cover_top); + right(overlap/2) fwd(cover_top.y) up((cover_plate.z-cover_top.z)/2) cube(cover_top); } } @@ -270,52 +271,19 @@ module mechanism(size) { depth=size.y; height=size.z; - module spool(r_in, r_out, in_rim, out_rim) { - module spindle(d, h) { - color("Sienna") cylinder(h=h, d=d); - } - - module spool_plate() { - difference() { - cylinder(h=spool_plate_height, r=r_out); - if (!$preview && r_out - r_in > out_rim) { - angle=spool_plate_hole_angle; - difference() { - for (i = [1:spool_plate_holes]) { - zrot(360/spool_plate_holes * i) { - angle_pie_mask(r=r_out - out_rim, l=spool_plate_height, ang=angle, center=false); - } - } - cylinder(h=spool_plate_height, r=r_in + in_rim); - } - } - } - } - - spindle_h=height-plate; - difference() { - color("Azure") { - spool_plate(); - up(spool_plate_height) cylinder(h=spool_inner_height, r=r_in); - up(spool_plate_height + spool_inner_height) spool_plate(); - } - up(spool_plate_height + spool_inner_height/2) cube([r_in*2, spool_slit_depth, spool_inner_height], center=true); - // TODO: spindle height - spindle(d=spindle_diam+spindle_diam_tolerance, h=spindle_h); - } - spindle(d=spindle_diam, h=spindle_h); - } - module main_spool() { spool(r_in=spool_inner_radius, r_out=spool_outer_radius, in_rim=spool_plate_hole_inner_rim, - out_rim=spool_plate_hole_outer_rim); + out_rim=spool_plate_hole_outer_rim, + in_height=spool_inner_height); } module aux_spool() { spool(r_in=middle_spool_in_r, r_out=middle_spool_out_r, in_rim=aux_spool_plate_hole_inner_rim, - out_rim=aux_spool_plate_hole_outer_rim); + out_rim=aux_spool_plate_hole_outer_rim, + in_height=spool_inner_height, + spokes=4); } module spools() { diff --git a/tape_spool.scad b/tape_spool.scad new file mode 100644 index 0000000..09a4af8 --- /dev/null +++ b/tape_spool.scad @@ -0,0 +1,82 @@ +spool_tape_tolerance=1; +spool_inner_radius=4; +spool_outer_radius=18; +spool_plate_height=2; +spool_plate_holes=3; +spool_plate_hole_angle=360/spool_plate_holes * 0.5; +spool_plate_hole_inner_rim=1; +spool_plate_hole_outer_rim=4; +spindle_diam_tolerance=0.2; + +// dependency: https://github.com/revarbat/BOSL +use + +module spindle(d, h, traction=false) { + color("Sienna") cylinder(h=h, d=d, $fn=(traction ? 6 : 20)); +} + +module spool( + r_in, r_out, + in_rim=1, out_rim=4, + in_height=5, plate_height=1, + center=false, slit_depth=0.5, + spindle_diam=3, spindle_diam_tolerance=0.1, spindle_traction=false, + spokes=3 + ) { + height = plate_height*2 + in_height; + tape_height=in_height; + module spool_plate() { + $fn = ($preview ? 18 : 100); + if (/*!$preview &&*/ spokes > 0 && r_out - r_in > out_rim) { + union() { + cylinder(h=plate_height, r=r_in + in_rim); + intersection() { + cylinder(h=plate_height, r=r_out - out_rim); + for (i = [1:spokes]) { + zrot(360/spokes * i) { + right(r_out/2) up(plate_height/2) + cube([r_out, r_in, plate_height], center=true); + } + } + + } + difference() { + cylinder(h=plate_height, r=r_out); + cylinder(h=plate_height, r=r_out - out_rim); + } + } + } else { + cylinder(h=plate_height, r=r_out); + } + } + + module spool_inner() { + $fn = ($preview ? 10 : 60); + cylinder(h=in_height, r=r_in); + } + + down(center ? height/2 : 0) + difference() { + color("Azure") { + spool_plate(); + up(plate_height) spool_inner(); + up(plate_height + in_height) spool_plate(); + } + if (slit_depth > 0) { + up(plate_height + in_height/2) cube([r_in*2, slit_depth, in_height], center=true); + } + down(height) scale(1 + spindle_diam_tolerance/spindle_diam) spindle(d=spindle_diam+spindle_diam_tolerance, h=height*3, traction=spindle_traction); + } +} + +module spool_spindle() { + spindle_h=height-plate; + spindle(d=spindle_diam, h=spindle_h); +} + +// test +spindle_diam=2; +tape_height=5; +traction=true; +spool(r_in=4, r_out=20, in_height=tape_height, spindle_diam=spindle_diam, spindle_traction=traction); +down(3) spindle(d=spindle_diam, h=tape_height + 8, traction=traction); \ No newline at end of file