Compare commits

..

No commits in common. "39c0d94cdbffbb55894ca6e5e6de81cc0d10aa07" and "a70a7307e49061723828dffa88560224d11f460d" have entirely different histories.

11 changed files with 1 additions and 880 deletions

View File

@ -1,16 +1,3 @@
# Holodisk
Holodisk model from the Fallout and Fallout 2 games.
![Model Preview](demo.gif)
## Dependencies
- OpenScad
- [BOSL library](https://github.com/revarbat/BOSL)
## Credits & Related
- Main source: [Holotape at fallout.fandom.com/wiki](https://fallout.fandom.com/wiki/Holotape)
- ![Holodisk icon from Falout](https://static.wikia.nocookie.net/fallout/images/1/1c/TAPE3.gif/revision/latest/scale-to-width-down/128)
- [Inspiration](https://www.artstation.com/artwork/R14Y)
- [Real-life Holotape](http://cedmagic.com/history/holotape.html)
Holodisk model from the Fallout and Fallout 2 games.

View File

@ -1,29 +0,0 @@
// animation
function get_anim_keys() = [
0, // initial
0.1, // resting
0.25, // holodisk free-inserted
0.3, // holodisk click-inserted
0.4, // laser raised, waiting
0.5, // start playing
0.7, // stop playing, start lowering laser
0.75, // laser lowered, holodisk removing
0.8, // holodisk click-removed
0.95, // holodisk free-removed, NOPing
1 // final
];
function ANIM_START()=0;
function ANIM_RESTING()=0;
function ANIM_INSERTING()=1;
function ANIM_OPENING()=2;
function ANIM_RAISING()=3;
function ANIM_WAITING()=4;
function ANIM_PLAYING()=5;
function ANIM_LOWERING()=6;
function ANIM_CLOSING()=7;
function ANIM_REMOVING()=8;
function ANIM_END()=9;
function anim(key_from, key_to, KEYS=get_anim_keys())
= max(0, min(($t - KEYS[key_from]) / (KEYS[key_to] - KEYS[key_from]), 1));

View File

@ -1,3 +0,0 @@
#!/bin/bash
convert -delay 10 -loop 0 *.png demo.gif

BIN
demo.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

View File

@ -1,26 +0,0 @@
/*
* Holodisk from Fallout 1 and Fallout 2
*
* Main source: https://fallout.fandom.com/wiki/Holotape
* Inspiration: https://www.artstation.com/artwork/R14Y
* Related: http://cedmagic.com/history/holotape.html
*/
// dependency: https://github.com/revarbat/BOSL
use <holodisk_spec.scad>
use <anim.scad>
include <holodisk.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;
/**/

View File

@ -1,122 +0,0 @@
// 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();

View File

@ -1,313 +0,0 @@
// dependency: https://github.com/revarbat/BOSL
use <BOSL/transforms.scad>
//use <BOSL/metric_screws.scad>
use <BOSL/masks.scad>
use <holodisk_spec.scad>
use <tape_spool.scad>
use <anim.scad>
module holodisk_frame() {
size = get_holodisk_size();
disk_size = get_holodisk_size();
holodisk_size = get_holodisk_size();
width=size.x;
depth=size.y;
height=size.z;
wall=3;
plate=3;
top_rim=2;
bolt_headtype="hex";
front_body_depth=12;
front_body_bolt_offset=8;
back_bumpers_radius=5;
back_bumpers_bolt_size=3;
tape_height=5;
tape_thickness=0.2;
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_angle=360/spool_plate_holes * 0.5;
spool_plate_hole_inner_rim=1;
spool_plate_hole_outer_rim=4;
spool_slit_depth=0.8;
spool1_depth=disk_size.y*0.77;
spool2_depth=disk_size.y*0.40;
spool3_depth=(spool1_depth+spool2_depth)/2;
spool4_depth=disk_size.y*0.16;
main_spools_x=disk_size.x*0.45;
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=2;
spindle_diam_tolerance=0.2;
tape_z=plate+spool_plate_height;
tr=top_rim;
tc=tr*1.5;
fbd=front_body_depth;
bbr=back_bumpers_radius;
walls_height=height-plate*2;
module back_bumpers() {
module bumper() { back_half() circle(r=bbr); }
back(depth) {
right(bbr) bumper();
right(width-bbr) bumper();
}
}
module bolt() { metric_bolt(size=back_bumpers_bolt_size, headtype=bolt_headtype, l=height, pitch=0); }
module nut() { metric_nut(size=back_bumpers_bolt_size, pitch=0); }
module back_bolts() {
back(depth) {
right(bbr) {
up(height) bolt();
nut();
}
right(width-bbr) {
up(height) bolt();
nut();
}
}
}
module front_bolts() {
bolt_offset=front_body_bolt_offset;
back(front_body_depth/2) {
right(bolt_offset) {
up(height) bolt();
nut();
}
right(width-bolt_offset) {
up(height) bolt();
nut();
}
}
}
module top_cover() {
up(height-plate) linear_extrude(height=plate) {
back_bumpers();
polygon(points=[
// frame
[0, 0], [0, depth],
[width, depth], [width, 0],
// window
[tr, tr+fbd], [tr, depth-tr-tc], [tr+tc, depth-tr],
[width-tr-tc, depth-tr], [width-tr, depth-tr-tc], [width-tr, tr+fbd]
],
paths=[
[0,1,2,3], [4,5,6,7,8,9]
]);
}
}
module walls() {
difference() {
up(plate) linear_extrude(height=walls_height) {
//back_bumpers();
shell2d(thickness=-wall) {
square([width, depth]);
}
}
translate(get_holodisk_laserwindow_pos_center()) cube(get_holodisk_laserwindow_size(), center=true);
}
}
module front_plates() {
th = get_holodisk_front_plate_thickness();
slide_pos = get_holodisk_slide_pos();
offset=4.5;
plate_len_side=slide_pos.y - offset/2;
plate_len_left=plate_len_side/2;
plate_len_right=plate_len_side + 5;
// front
fwd(th) left(th) up(offset) {
cube([plate_len_left + th*2, th, height - offset*2]);
}
fwd(th) right(width-plate_len_right-th) up(offset) {
cube([plate_len_right + th*2, th, height - offset*2]);
}
// left
fwd(th) left(th) up(offset) {
cube([th, plate_len_side, height - offset*2]);
}
// right
fwd(th) right(width) up(offset) {
cube([th, plate_len_side, height - offset*2]);
}
}
module slides() {
slide_size = get_holodisk_slide_size();
slide_pos = get_holodisk_slide_pos();
slide_plate_size = [0.1, slide_size.y, slide_size.z];
sliding_size = get_holodisk_slide_sliding_size();
sliding_pos = get_holodisk_slide_sliding_pos();
module slide() {
hull() {
translate(sliding_pos) cube(sliding_size);
translate(slide_pos) cube(slide_plate_size);
}
}
module slider() {
slider_size = get_holodisk_slide_slider_size();
slider_pos = get_holodisk_slide_slider_pos();
slider_plate_size = [0.1, slider_size.y, slider_size.z];
slider_top_size = [slider_size.x, slider_size.y, sliding_size.z];
hull() {
up((slider_size.z-sliding_size.z)/2) translate(slider_pos) cube(slider_top_size);
translate(slider_pos) cube(slider_plate_size);
}
}
module slider_anim() {
back(anim(ANIM_OPENING(),ANIM_OPENING()+1)*get_holodisk_slide_slider_travel()) // anim insert
fwd(anim(ANIM_CLOSING(),ANIM_CLOSING()+1)*get_holodisk_slide_slider_travel()) // anim remove
slider();
}
right(get_holodisk_size().x) {
slide();
slider_anim();
}
scale([-1,1,1]) {
slide();
slider_anim();
}
right(get_holodisk_laserwindow_pos_center().x) zrot(-90) {
scale([1, 0.7, 1]) {
slider();
}
}
}
module sliding_cover() {
thickness=1;
overlap=2;
cover_size=[
get_holodisk_size().x+thickness*2,
get_holodisk_laser_cutout_size().y+overlap*2,
thickness
];
cover_posc=[
get_holodisk_laser_cutout_pos_center().x,
get_holodisk_laser_cutout_pos_center().y,
cover_size.z/2
];
cover_side_size=[thickness, cover_size.y, get_holodisk_slide_slider_pos().z];
cover_side_left_posd=[-cover_size.x/2+thickness/2, 0, cover_side_size.z/2];
cover_side_right_posd=[cover_size.x/2-thickness/2, 0, cover_side_size.z/2];
translate(cover_posc) {
cube(cover_size, center=true);
translate(cover_side_left_posd) cube(cover_side_size, center=true);
translate(cover_side_right_posd) cube(cover_side_size, center=true);
}
}
module sliding_cover_anim() {
back(anim(ANIM_OPENING(),ANIM_OPENING()+1)*get_holodisk_slide_slider_travel()) // anim insert
fwd(anim(ANIM_CLOSING(),ANIM_CLOSING()+1)*get_holodisk_slide_slider_travel()) // anim remove
sliding_cover();
}
module laserwindow_door() {
door_size = [
get_holodisk_laserwindow_size().x,
1,
get_holodisk_laserwindow_size().z
];
door_pos = [
get_holodisk_laserwindow_pos_center().x,
get_holodisk_laserwindow_pos_center().y + door_size.y/2,
get_holodisk_laserwindow_pos_center().z
];
translate(door_pos) scale(0.98) down(door_size.z/2) xrot(anim(ANIM_OPENING(),ANIM_OPENING()+1)*-90) xrot(anim(ANIM_CLOSING(),ANIM_CLOSING()+1)*90) up(door_size.z/2) cube(door_size, center=true);
}
module bottom_cover() {
difference() {
linear_extrude(height=plate) {
back_bumpers();
square([width, depth]);
}
// laser cutout
down(0.1) translate(get_holodisk_laser_cutout_pos()) cube(get_holodisk_laser_cutout_size());
// sliding cover
sliding_cover();
back(get_holodisk_slide_slider_travel()*0.5) sliding_cover();
back(get_holodisk_slide_slider_travel()) sliding_cover();
// spool spindles
translate(get_holodisk_spool1_socket_pos_center()) spindle(h=height, d=get_holodisk_spools_spindle_diam());
translate(get_holodisk_spool2_socket_pos_center()) spindle(h=height, d=get_holodisk_spools_spindle_diam());
}
}
{
overlap=1;
rails_size = [
get_holodisk_laserwindow_size().x * 2 + overlap*2,
1,
walls_height
];
rail_size = [rails_size.x, rails_size.y, 2];
rails_pos = [get_holodisk_laserwindow_pos().x - rails_size.x/2,
-rails_size.y, plate];
rail1_pos = [rails_pos.x, rails_pos.y, rails_pos.z];
rail2_pos = [rails_pos.x, rails_pos.y, rails_pos.z + rails_size.z - rail_size.z];
module laserwindow_slider_rails() {
translate(rail1_pos) cube(rail_size);
translate(rail2_pos) cube(rail_size);
}
module laserwindow_slider_cover() {
cover_size=[
get_holodisk_laserwindow_size().x,
get_holodisk_slide_slider_size().x,
get_holodisk_slide_slider_size().z
];
cover_plate=[cover_size.x, rail_size.y, cover_size.z];
cover_top=[cover_size.x - overlap, cover_size.y, cover_size.z - overlap];
/*cover_pos=[rails_pos.x+overlap, rails_pos.y + rails_size.y, rails_pos.z];*/
cover_pos=[get_holodisk_laserwindow_pos().x, rails_pos.y + rails_size.y, rails_pos.z];
left(anim(ANIM_RESTING(),ANIM_RESTING()+1)*get_holodisk_laserwindow_size().x)
right(anim(ANIM_REMOVING(), ANIM_REMOVING()+1)*get_holodisk_laserwindow_size().x)
translate(cover_pos)
hull() {
fwd(cover_plate.y) cube(cover_plate);
right(overlap/2) fwd(cover_top.y) up((cover_plate.z-cover_top.z)/2) cube(cover_top);
}
}
color("red") laserwindow_slider_rails();
color("red") laserwindow_slider_cover();
}
color("SaddleBrown") top_cover();
color("grey") walls();
color("gold") laserwindow_door();
color("Silver") slides();
color("Silver") sliding_cover_anim();
color("SaddleBrown") bottom_cover();
color("SaddleBrown") front_plates();
//color("silver") back_bolts();
//color("silver") front_bolts();
}
// test
holodisk_frame();

View File

@ -1,115 +0,0 @@
/*
* Technical Specification for Wattz Electronics Holodisk (AKA Holotape or THT)
*
*/
// -- core dimensions --
function get_holodisk_size() = [55, 100, 16];
function get_holodisk_bottom_thickness() = 3;
function get_holodisk_front_plate_thickness() = 1;
// -- tape --
function get_holodisk_tape_height() = 5;
function get_holodisk_tape_thickness() = 0.2;
// -- slide --
spz = 8;
function get_holodisk_slide_size() = [2, 35, get_holodisk_size().z - spz];
function get_holodisk_slide_pos() = [0, 6, spz/2];
sy = 2;
sz = 4;
function get_holodisk_slide_sliding_size() = [get_holodisk_slide_size().x, get_holodisk_slide_size().y - sy, get_holodisk_slide_size().z - sz];
function get_holodisk_slide_sliding_pos() = [get_holodisk_slide_pos().x, get_holodisk_slide_pos().y + sy/2, get_holodisk_slide_pos().z + sz/2];
srx = 2;
srz = 2;
function get_holodisk_slide_slider_size() = [get_holodisk_slide_size().x + srx, 13, get_holodisk_slide_size().z + srz];
sliding_reserve=3;
function get_holodisk_slide_slider_pos() = [get_holodisk_slide_sliding_pos().x, get_holodisk_slide_sliding_pos().y + sliding_reserve, get_holodisk_slide_sliding_pos().z - get_holodisk_slide_slider_size().z/2 + srz];
function get_holodisk_slide_slider_travel() = get_holodisk_slide_sliding_size().y - get_holodisk_slide_slider_size().y - 2*sliding_reserve;
// -- laser --
function get_holodisk_laser_cutout_size() = [12, 9, 20];
function get_holodisk_laser_cutout_pos() = [
get_holodisk_size().x/2 - get_holodisk_laser_cutout_size().x/2,
12,
0];
function get_holodisk_laser_cutout_pos_center() = [
get_holodisk_laser_cutout_pos().x + get_holodisk_laser_cutout_size().x/2,
get_holodisk_laser_cutout_pos().y + get_holodisk_laser_cutout_size().y/2,
get_holodisk_laser_cutout_pos().z + get_holodisk_laser_cutout_size().z/2];
// -- laser-window --
function get_holodisk_laserwindow_pos() = [
get_holodisk_laserwindow_pos_center().x - get_holodisk_laserwindow_size().x/2,
get_holodisk_laserwindow_pos_center().y - get_holodisk_laserwindow_size().y/2,
get_holodisk_laserwindow_pos_center().z - get_holodisk_laserwindow_size().z/2,
];
function get_holodisk_laserwindow_pos_center() = [
get_holodisk_laser_cutout_pos_center().x,
0,
6.5
];
function get_holodisk_laserwindow_size() = [
get_holodisk_laser_cutout_size().x,
30,
get_holodisk_tape_height() + 2
];
// -- spools --
function get_holodisk_spool1_socket_pos_center() = [
get_holodisk_size().x*0.45,
get_holodisk_size().y*0.77,
0
];
function get_holodisk_spool2_socket_pos_center() = [
get_holodisk_spool1_socket_pos_center().x,
get_holodisk_size().y*0.40,
0
];
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 --

View File

@ -1,154 +0,0 @@
// dependency: https://github.com/revarbat/BOSL
use <BOSL/transforms.scad>
use <holodisk_spec.scad>
include <anim.scad>
// outside config
tape_height=5;
tape_z=4;
module reader(disk_size) {
width=disk_size.x;
depth=disk_size.y;
height=disk_size.z;
laser_cutout_size = get_holodisk_laser_cutout_size();
laser_cutout_pos = get_holodisk_laser_cutout_pos_center();
frame=5;
head_frame=2;
head_size=[14, 10, tape_height+head_frame*2];
head_pos=[laser_cutout_pos.x, -frame+2, tape_z-head_frame];
laser_size=[10, 2, tape_height];
laser_offset=3;
laser_pos=[laser_cutout_pos.x, laser_cutout_pos.y + laser_offset, tape_z];
laser_tower_size=[laser_cutout_size.x - 1, laser_cutout_size.y - 1 - laser_offset, 15];
module laser(corner=0.1) {
up(laser_size.z/2)
up(corner)
color("Red")
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) {
color("DarkSlateBlue")
difference() {
up(laser_size.z/2)
fwd(laser_offset/2) scale(0.99) cube(laser_tower_size, center=true);
fwd(laser_size.y/3) scale(1.1) laser();
}
}
module laser_space() {
translate(get_holodisk_laser_cutout_pos_center()) cube(get_holodisk_laser_cutout_size(), center=true);
}
module head_space() {
/*stube=[head_size.x-head_frame*2, head_size.y+head_frame*3, head_size.z-head_frame*2];
up(head_size.z/4 + head_frame)
cube(stube, center=true);*/
translate(get_holodisk_laserwindow_pos_center()) cube(get_holodisk_laserwindow_size(), center=true);
}
module head(corner=0.5) {
up(corner)
back(head_size.y/2)
color("DarkSlateBlue")
minkowski() {
s=[head_size[0], head_size[1] + frame, head_size[2]-corner*2];
difference() {
translate(head_pos) up(head_size.z/2) cube(s, center=true);
head_space();
}
sphere(corner);
}
}
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();
retraction=laser_tower_size.z;
down(retraction)
up(anim(ANIM_RAISING(), ANIM_RAISING()+1)*retraction)
down(anim(ANIM_LOWERING(), ANIM_LOWERING()+1)*retraction)
union() {
translate(laser_pos) {
laser();
laser_tower();
}
color("yellow") {
spindle1_driver();
spindle2_driver();
}
}
color("DarkSlateBlue") {
difference() {
fwd(frame) cube([width, frame, height]);
head_space();
}
down(frame) difference() {
fwd(frame) cube([width, depth + frame, frame]);
scale(1.01) down(0.01) laser_space();
scale([1,1,5]) spindle1_driver_space();
scale([1,1,5]) spindle2_driver_space();
}
}
}
holodisk_size = is_undef(disk_size) ? [50, 100, 20] : disk_size;
reader(holodisk_size);

View File

@ -1,27 +0,0 @@
// dependency: https://github.com/revarbat/BOSL
use <BOSL/transforms.scad>
use <holodisk_spec.scad>
module tape(start, end, height = get_holodisk_tape_height(), thickness = get_holodisk_tape_thickness()) {
color("RosyBrown")
up(thickness) hull() {
translate(start) sphere(thickness);
translate(end) sphere(thickness);
up(height - thickness) {
translate(start) sphere(thickness);
translate(end) sphere(thickness);
}
}
}
module tape_spool(r_in, r_out, height = get_holodisk_tape_height(), thickness = get_holodisk_tape_thickness()) {
color("RosyBrown")
up(thickness) minkowski() {
difference() {
cylinder(h=height - thickness, r=r_out);
cylinder(h=height - thickness, r=r_in);
}
sphere(thickness);
}
}

View File

@ -1,77 +0,0 @@
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 <BOSL/transforms.scad>
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 (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);
scale(1.01) 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);
}
}
// 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);