Add spool drivers. Polished animations. Added animation export.
This commit is contained in:
parent
9eac93893c
commit
923ada4ebe
20
anim.scad
20
anim.scad
@ -4,12 +4,13 @@ function get_anim_keys() = [
|
|||||||
0.1, // resting
|
0.1, // resting
|
||||||
0.25, // holodisk free-inserted
|
0.25, // holodisk free-inserted
|
||||||
0.3, // holodisk click-inserted
|
0.3, // holodisk click-inserted
|
||||||
0.4, // laser raised
|
0.4, // laser raised, waiting
|
||||||
0.5, // start playing
|
0.5, // start playing
|
||||||
0.7, // stop playing, start lowering laser
|
0.7, // stop playing, start lowering laser
|
||||||
0.8, // laser lowered, holodisk removing
|
0.75, // laser lowered, holodisk removing
|
||||||
0.85, // holodisk click-removed
|
0.8, // holodisk click-removed
|
||||||
1 // final, holodisk free-removed
|
0.95, // holodisk free-removed, NOPing
|
||||||
|
1 // final
|
||||||
];
|
];
|
||||||
|
|
||||||
function ANIM_START()=0;
|
function ANIM_START()=0;
|
||||||
@ -17,11 +18,12 @@ function ANIM_RESTING()=0;
|
|||||||
function ANIM_INSERTING()=1;
|
function ANIM_INSERTING()=1;
|
||||||
function ANIM_OPENING()=2;
|
function ANIM_OPENING()=2;
|
||||||
function ANIM_RAISING()=3;
|
function ANIM_RAISING()=3;
|
||||||
function ANIM_PLAYING()=4;
|
function ANIM_WAITING()=4;
|
||||||
function ANIM_LOWERING()=5;
|
function ANIM_PLAYING()=5;
|
||||||
function ANIM_CLOSING()=6;
|
function ANIM_LOWERING()=6;
|
||||||
function ANIM_REMOVING()=7;
|
function ANIM_CLOSING()=7;
|
||||||
function ANIM_END()=8;
|
function ANIM_REMOVING()=8;
|
||||||
|
function ANIM_END()=9;
|
||||||
|
|
||||||
function anim(key_from, key_to, KEYS=get_anim_keys())
|
function anim(key_from, key_to, KEYS=get_anim_keys())
|
||||||
= max(0, min(($t - KEYS[key_from]) / (KEYS[key_to] - KEYS[key_from]), 1));
|
= max(0, min(($t - KEYS[key_from]) / (KEYS[key_to] - KEYS[key_from]), 1));
|
||||||
|
3
create_gif.sh
Executable file
3
create_gif.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
convert -delay 10 -loop 0 *.png demo.gif
|
@ -13,3 +13,14 @@ use <anim.scad>
|
|||||||
|
|
||||||
include <holodisk.scad>
|
include <holodisk.scad>
|
||||||
include <reader.scad>
|
include <reader.scad>
|
||||||
|
|
||||||
|
/*/ read camera
|
||||||
|
echo($vpr);
|
||||||
|
echo($vpt);
|
||||||
|
echo($vpd);
|
||||||
|
/**/
|
||||||
|
// set camera
|
||||||
|
$vpr=[70.4, 0, 314.3];
|
||||||
|
$vpt=[35.2535, 26.4734, 12.9879];
|
||||||
|
$vpd=325.228;
|
||||||
|
/**/
|
@ -43,6 +43,7 @@ module holodisk_mechanism() {
|
|||||||
aux_spool_plate_hole_inner_rim=2;
|
aux_spool_plate_hole_inner_rim=2;
|
||||||
aux_spool_plate_hole_outer_rim=2;
|
aux_spool_plate_hole_outer_rim=2;
|
||||||
spindle_diam=get_holodisk_spools_spindle_diam();
|
spindle_diam=get_holodisk_spools_spindle_diam();
|
||||||
|
spindle_diff_scale=1.02;
|
||||||
tape_z=plate+spool_plate_height;
|
tape_z=plate+spool_plate_height;
|
||||||
|
|
||||||
module main_spool() {
|
module main_spool() {
|
||||||
@ -52,7 +53,12 @@ module holodisk_mechanism() {
|
|||||||
in_rim=spool_plate_hole_inner_rim,
|
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,
|
in_height=spool_inner_height,
|
||||||
spindle_traction=true);
|
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() {
|
module aux_spool() {
|
||||||
zrot(500*anim(ANIM_PLAYING(), ANIM_PLAYING()+1))
|
zrot(500*anim(ANIM_PLAYING(), ANIM_PLAYING()+1))
|
||||||
|
@ -88,4 +88,28 @@ function get_holodisk_spool2_socket_pos_center() = [
|
|||||||
|
|
||||||
function get_holodisk_spools_spindle_diam() = 3;
|
function get_holodisk_spools_spindle_diam() = 3;
|
||||||
|
|
||||||
|
function get_holodisk_spool_spindle_connection_driver_size() = [
|
||||||
|
get_holodisk_spools_spindle_diam()-1,
|
||||||
|
get_holodisk_spools_spindle_diam()-1,
|
||||||
|
3
|
||||||
|
];
|
||||||
|
|
||||||
|
module holodisk_spool_spindle_connection_driver_profile() {
|
||||||
|
circle(d=get_holodisk_spool_spindle_connection_driver_size().x, $fn=6);
|
||||||
|
}
|
||||||
|
*holodisk_spool_spindle_connection_driver_profile();
|
||||||
|
|
||||||
|
module holodisk_spool_spindle_connection_driver() {
|
||||||
|
h=get_holodisk_spool_spindle_connection_driver_size().z;
|
||||||
|
d=get_holodisk_spool_spindle_connection_driver_size().x;
|
||||||
|
intersection() {
|
||||||
|
linear_extrude(height=h, scale=0.8) {
|
||||||
|
holodisk_spool_spindle_connection_driver_profile();
|
||||||
|
}
|
||||||
|
cylinder(h=h*1.15, d1=d*1.15, d2=d/1.8, $fn=100);
|
||||||
|
cylinder(h=h*1.1, d1=d*1.8, d2=d*0.45, $fn=100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*holodisk_spool_spindle_connection_driver();
|
||||||
|
|
||||||
// -- END --
|
// -- END --
|
||||||
|
69
reader.scad
69
reader.scad
@ -9,7 +9,6 @@ include <anim.scad>
|
|||||||
tape_height=5;
|
tape_height=5;
|
||||||
tape_z=4;
|
tape_z=4;
|
||||||
|
|
||||||
|
|
||||||
module reader(disk_size) {
|
module reader(disk_size) {
|
||||||
width=disk_size.x;
|
width=disk_size.x;
|
||||||
depth=disk_size.y;
|
depth=disk_size.y;
|
||||||
@ -32,6 +31,15 @@ module reader(disk_size) {
|
|||||||
up(corner)
|
up(corner)
|
||||||
color("Red")
|
color("Red")
|
||||||
fwd(laser_cutout_size.y/3) cube(laser_size, center=true);
|
fwd(laser_cutout_size.y/3) cube(laser_size, center=true);
|
||||||
|
|
||||||
|
beam_anim=anim(ANIM_PLAYING(), ANIM_PLAYING()+1);
|
||||||
|
if (beam_anim > 0 && beam_anim < 1) {
|
||||||
|
color("red")
|
||||||
|
up(get_holodisk_laserwindow_size().x/4)
|
||||||
|
yrot(beam_anim*1234)
|
||||||
|
xrot(90)
|
||||||
|
cylinder(h=get_holodisk_laserwindow_size().y, d=get_holodisk_laserwindow_size().x/4, $fn=3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module laser_tower(corner=1) {
|
module laser_tower(corner=1) {
|
||||||
@ -69,15 +77,62 @@ module reader(disk_size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spindle_driver_shaft_diam = get_holodisk_spool_spindle_connection_driver_size().x;
|
||||||
|
module spindle_driver_shaft() {
|
||||||
|
h=10; // TODO
|
||||||
|
down(h) cylinder(d=spindle_driver_shaft_diam, h=h, $fn=100);
|
||||||
|
}
|
||||||
|
|
||||||
|
module spindle_driver() {
|
||||||
|
union() {
|
||||||
|
holodisk_spool_spindle_connection_driver();
|
||||||
|
spindle_driver_shaft();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module spindle_driver_space() {
|
||||||
|
s=get_holodisk_spool_spindle_connection_driver_size();
|
||||||
|
down(0.01) scale(1.01) cylinder(d=s.x, h=s.z, $fn=100);
|
||||||
|
}
|
||||||
|
|
||||||
|
anim_spindle_rot=100;
|
||||||
|
module spindle1_driver() {
|
||||||
|
translate(get_holodisk_spool1_socket_pos_center())
|
||||||
|
zrot(anim(ANIM_PLAYING(), ANIM_PLAYING()+1)*anim_spindle_rot)
|
||||||
|
spindle_driver();
|
||||||
|
}
|
||||||
|
|
||||||
|
module spindle1_driver_space() {
|
||||||
|
translate(get_holodisk_spool1_socket_pos_center())
|
||||||
|
spindle_driver_space();
|
||||||
|
}
|
||||||
|
|
||||||
|
module spindle2_driver() {
|
||||||
|
translate(get_holodisk_spool2_socket_pos_center())
|
||||||
|
zrot(anim(ANIM_PLAYING(), ANIM_PLAYING()+1)*anim_spindle_rot)
|
||||||
|
spindle_driver();
|
||||||
|
}
|
||||||
|
|
||||||
|
module spindle2_driver_space() {
|
||||||
|
translate(get_holodisk_spool2_socket_pos_center())
|
||||||
|
spindle_driver_space();
|
||||||
|
}
|
||||||
|
|
||||||
//head();
|
//head();
|
||||||
|
|
||||||
retraction=laser_tower_size.z;
|
retraction=laser_tower_size.z;
|
||||||
down(retraction)
|
down(retraction)
|
||||||
up(anim(2, 3)*retraction)
|
up(anim(ANIM_RAISING(), ANIM_RAISING()+1)*retraction)
|
||||||
down(anim(5, 6)*retraction)
|
down(anim(ANIM_LOWERING(), ANIM_LOWERING()+1)*retraction)
|
||||||
translate(laser_pos) {
|
union() {
|
||||||
laser();
|
translate(laser_pos) {
|
||||||
laser_tower();
|
laser();
|
||||||
|
laser_tower();
|
||||||
|
}
|
||||||
|
color("yellow") {
|
||||||
|
spindle1_driver();
|
||||||
|
spindle2_driver();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
color("DarkSlateBlue") {
|
color("DarkSlateBlue") {
|
||||||
@ -88,6 +143,8 @@ module reader(disk_size) {
|
|||||||
down(frame) difference() {
|
down(frame) difference() {
|
||||||
fwd(frame) cube([width, depth + frame, frame]);
|
fwd(frame) cube([width, depth + frame, frame]);
|
||||||
scale(1.01) down(0.01) laser_space();
|
scale(1.01) down(0.01) laser_space();
|
||||||
|
scale([1,1,5]) spindle1_driver_space();
|
||||||
|
scale([1,1,5]) spindle2_driver_space();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,11 +69,6 @@ module spool(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module spool_spindle() {
|
|
||||||
spindle_h=height-plate;
|
|
||||||
spindle(d=spindle_diam, h=spindle_h);
|
|
||||||
}
|
|
||||||
|
|
||||||
// test
|
// test
|
||||||
spindle_diam=2;
|
spindle_diam=2;
|
||||||
tape_height=5;
|
tape_height=5;
|
||||||
|
Loading…
Reference in New Issue
Block a user