From c64fee4e522ca5047f21967dd3acad9fccd178e6 Mon Sep 17 00:00:00 2001 From: Dejvino Date: Tue, 22 Dec 2020 14:05:47 +0100 Subject: [PATCH] Initial disk and reader --- fallout_holodisk.scad | 53 ++++++++++++ holodisk.scad | 188 ++++++++++++++++++++++++++++++++++++++++++ reader.scad | 82 ++++++++++++++++++ tape.scad | 25 ++++++ 4 files changed, 348 insertions(+) create mode 100755 fallout_holodisk.scad create mode 100755 holodisk.scad create mode 100755 reader.scad create mode 100755 tape.scad diff --git a/fallout_holodisk.scad b/fallout_holodisk.scad new file mode 100755 index 0000000..b8c2558 --- /dev/null +++ b/fallout_holodisk.scad @@ -0,0 +1,53 @@ +/* + * 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 + */ + +width=55; +depth=100; +height=16; +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=depth*0.77; +spool2_depth=depth*0.40; +spool3_depth=(spool1_depth+spool2_depth)/2; +spool4_depth=depth*0.16; +main_spools_x=width * 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; + +// dependency: https://github.com/revarbat/BOSL +use +use +use + +include +include diff --git a/holodisk.scad b/holodisk.scad new file mode 100755 index 0000000..4157fc8 --- /dev/null +++ b/holodisk.scad @@ -0,0 +1,188 @@ +// dependency: https://github.com/revarbat/BOSL +use +use +use + +include + +module frame() { + tr=top_rim; + tc=tr*1.5; + fbd=front_body_depth; + bbr=back_bumpers_radius; + + 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() { + walls_height=height-plate*2; + up(plate) linear_extrude(height=walls_height) { + //back_bumpers(); + shell2d(thickness=-wall) { + square([width, depth]); + } + } + } + + module bottom_cover() { + linear_extrude(height=plate) { + back_bumpers(); + square([width, depth]); + } + } + + color("SaddleBrown") top_cover(); + color("grey") walls(); + color("SaddleBrown") bottom_cover(); + color("silver") back_bolts(); + color("silver") front_bolts(); +} + +module mechanism() { + 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); + } + 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); + } + + 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() { + #frame(); + mechanism(); +} + +holodisk(); diff --git a/reader.scad b/reader.scad new file mode 100755 index 0000000..7e81853 --- /dev/null +++ b/reader.scad @@ -0,0 +1,82 @@ +// dependency: https://github.com/revarbat/BOSL +use + +// outside config +width=60; +height=15; +depth=100; +tape_height=5; +tape_z=4; + +// local config +frame=5; +head_frame=2; +head_size=[14, 10, tape_height+head_frame*2]; +head_pos=[width/2, -frame+2, tape_z-head_frame]; +laser_size=[10, 2, tape_height]; +laser_pos=[head_pos.x, head_pos.y + 10 + head_size.y, tape_z]; +laser_tower_size=[laser_size.x+2, laser_size.y+1, 15]; + +module reader() { + module laser(corner=0.1) { + up(laser_size.z/2) + up(corner) + color("Red") + minkowski() { + s=[laser_size.x, laser_size.y, laser_size.z-corner*2]; + cube(s, center=true); + sphere(corner); + } + } + + module laser_tower(corner=2) { + color("DarkSlateBlue") + back(laser_tower_size.y-laser_size.y) + difference() { + minkowski() { + s=[laser_tower_size.x, laser_tower_size.y, laser_tower_size.z-corner*2]; + up(laser_size.z/2) + cube(s, center=true); + sphere(corner); + } + fwd(laser_tower_size.y) scale(1.05) laser(); + } + } + + 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); + } + + 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() { + up(head_size.z/2) cube(s, center=true); + head_space(); + } + sphere(corner); + } + } + + translate(head_pos) head(); + translate(laser_pos) { + laser(); + laser_tower(); + } + + color("DarkSlateBlue") { + difference() { + fwd(frame) cube([width, frame, height]); + translate(head_pos) head_space(); + } + fwd(frame) down(frame) cube([width, depth + frame, frame]); + } +} + +reader(); diff --git a/tape.scad b/tape.scad new file mode 100755 index 0000000..cb821f3 --- /dev/null +++ b/tape.scad @@ -0,0 +1,25 @@ +// dependency: https://github.com/revarbat/BOSL +use + +module tape(start, end, height = tape_height, thickness = 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 = tape_height, thickness = tape_thickness) { + color("RosyBrown") + up(thickness) minkowski() { + difference() { + cylinder(h=height - thickness, r=r_out); + cylinder(h=height - thickness, r=r_in); + } + sphere(thickness); + } +}