123 lines
4.1 KiB
OpenSCAD
Executable File
123 lines
4.1 KiB
OpenSCAD
Executable File
// dependency: https://github.com/revarbat/BOSL
|
|
use <BOSL/transforms.scad>
|
|
//use <BOSL/metric_screws.scad>
|
|
use <BOSL/masks.scad>
|
|
|
|
use <holodisk_spec.scad>
|
|
use <anim.scad>
|
|
|
|
include <tape.scad>
|
|
use <tape_spool.scad>
|
|
|
|
disk_size = get_holodisk_size();
|
|
holodisk_size = get_holodisk_size();
|
|
|
|
use <holodisk_frame.scad>
|
|
|
|
module holodisk_mechanism() {
|
|
size=get_holodisk_size();
|
|
width=size.x;
|
|
depth=size.y;
|
|
height=size.z;
|
|
|
|
plate=get_holodisk_bottom_thickness();
|
|
tape_height=get_holodisk_tape_height();
|
|
tape_thickness=get_holodisk_tape_thickness();
|
|
spool_tape_tolerance=1;
|
|
spool_inner_height=tape_height+spool_tape_tolerance;
|
|
spool_inner_radius=4;
|
|
spool_outer_radius=18;
|
|
spool_plate_height=2;
|
|
spool_plate_holes=3;
|
|
spool_plate_hole_inner_rim=1;
|
|
spool_plate_hole_outer_rim=4;
|
|
spool1_depth=get_holodisk_spool1_socket_pos_center().y;
|
|
spool2_depth=get_holodisk_spool2_socket_pos_center().y;
|
|
spool3_depth=(spool1_depth+spool2_depth)/2;
|
|
spool4_depth=disk_size.y*0.16;
|
|
main_spools_x=get_holodisk_spool1_socket_pos_center().x;
|
|
aux_spools_right_x=main_spools_x + spool_outer_radius + 1;
|
|
aux_spools_left_x=main_spools_x - 13;
|
|
middle_spool_in_r=2;
|
|
middle_spool_out_r=7;
|
|
aux_spool_plate_hole_inner_rim=2;
|
|
aux_spool_plate_hole_outer_rim=2;
|
|
spindle_diam=get_holodisk_spools_spindle_diam();
|
|
spindle_diff_scale=1.02;
|
|
tape_z=plate+spool_plate_height;
|
|
|
|
module main_spool() {
|
|
zrot(200*anim(ANIM_PLAYING(), ANIM_PLAYING()+1))
|
|
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,
|
|
in_height=spool_inner_height,
|
|
spindle_diam=spindle_diam, spindle_traction=true);
|
|
down(plate)
|
|
difference() {
|
|
spindle(h=height, d=spindle_diam, traction=true);
|
|
scale(spindle_diff_scale) holodisk_spool_spindle_connection_driver();
|
|
}
|
|
}
|
|
module aux_spool() {
|
|
zrot(500*anim(ANIM_PLAYING(), ANIM_PLAYING()+1))
|
|
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,
|
|
in_height=spool_inner_height,
|
|
spokes=4);
|
|
}
|
|
|
|
module spools() {
|
|
up(plate) {
|
|
right(main_spools_x) {
|
|
back(spool1_depth) main_spool();
|
|
back(spool2_depth) main_spool();
|
|
}
|
|
right(aux_spools_right_x) {
|
|
back(spool3_depth) aux_spool();
|
|
back(spool4_depth) aux_spool();
|
|
}
|
|
right(aux_spools_left_x) {
|
|
back(spool4_depth) aux_spool();
|
|
}
|
|
}
|
|
}
|
|
|
|
module tapes() {
|
|
spool1_tape_r = spool_outer_radius * 0.8;
|
|
spool2_tape_r = spool_outer_radius * 0.5;
|
|
up(plate + spool_plate_height) {
|
|
// main spools
|
|
right(main_spools_x) {
|
|
back(spool1_depth) tape_spool(r_in=spool_inner_radius, r_out=spool1_tape_r);
|
|
back(spool2_depth) tape_spool(r_in=spool_inner_radius, r_out=spool2_tape_r);
|
|
}
|
|
// TODO: convert to path
|
|
// main 1 --> middle
|
|
tape([main_spools_x + spool1_tape_r, spool1_depth, 0], [aux_spools_right_x + middle_spool_in_r, spool3_depth, 0]);
|
|
// --> right corner
|
|
right(aux_spools_right_x + middle_spool_in_r) tape([0, spool3_depth, 0], [0, spool4_depth, 0]);
|
|
// --> left corner
|
|
tape([aux_spools_left_x, spool4_depth - middle_spool_in_r, 0], [aux_spools_right_x, spool4_depth - middle_spool_in_r, 0]);
|
|
// --> main 2
|
|
tape([aux_spools_left_x - middle_spool_in_r, spool4_depth, 0], [main_spools_x - spool2_tape_r, spool2_depth, 0]);
|
|
}
|
|
}
|
|
|
|
spools();
|
|
tapes();
|
|
}
|
|
|
|
module holodisk() {
|
|
holodisk_frame();
|
|
holodisk_mechanism();
|
|
}
|
|
|
|
// test
|
|
retraction=get_holodisk_size().y+10;
|
|
back((1-anim(ANIM_INSERTING(), ANIM_RAISING())) * retraction) // anim insert
|
|
back(anim(ANIM_CLOSING(), ANIM_END()) * retraction) // anim remove
|
|
holodisk();
|