Holodisk model from the Fallout and Fallout 2 games.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

91 lines
2.4 KiB

  1. // dependency: https://github.com/revarbat/BOSL
  2. use <BOSL/transforms.scad>
  3. use <holodisk_spec.scad>
  4. include <anim.scad>
  5. // outside config
  6. tape_height=5;
  7. tape_z=4;
  8. module reader(disk_size) {
  9. width=disk_size.x;
  10. depth=disk_size.y;
  11. height=disk_size.z;
  12. laser_cutout_size = get_holodisk_laser_cutout_size();
  13. laser_cutout_pos = get_holodisk_laser_cutout_pos_center();
  14. frame=5;
  15. head_frame=2;
  16. head_size=[14, 10, tape_height+head_frame*2];
  17. head_pos=[laser_cutout_pos.x, -frame+2, tape_z-head_frame];
  18. laser_size=[10, 2, tape_height];
  19. laser_offset=3;
  20. laser_pos=[laser_cutout_pos.x, laser_cutout_pos.y + laser_offset, tape_z];
  21. laser_tower_size=[laser_cutout_size.x - 1, laser_cutout_size.y - 1 - laser_offset, 15];
  22. module laser(corner=0.1) {
  23. up(laser_size.z/2)
  24. up(corner)
  25. color("Red")
  26. fwd(laser_cutout_size.y/3) cube(laser_size, center=true);
  27. }
  28. module laser_tower(corner=1) {
  29. color("DarkSlateBlue")
  30. difference() {
  31. up(laser_size.z/2)
  32. fwd(laser_offset/2) scale(0.99) cube(laser_tower_size, center=true);
  33. fwd(laser_size.y/3) scale(1.1) laser();
  34. }
  35. }
  36. module head_space() {
  37. /*stube=[head_size.x-head_frame*2, head_size.y+head_frame*3, head_size.z-head_frame*2];
  38. up(head_size.z/4 + head_frame)
  39. cube(stube, center=true);*/
  40. translate(get_holodisk_laserwindow_pos_center()) cube(get_holodisk_laserwindow_size(), center=true);
  41. }
  42. module head(corner=0.5) {
  43. up(corner)
  44. back(head_size.y/2)
  45. color("DarkSlateBlue")
  46. minkowski() {
  47. s=[head_size[0], head_size[1] + frame, head_size[2]-corner*2];
  48. difference() {
  49. translate(head_pos) up(head_size.z/2) cube(s, center=true);
  50. head_space();
  51. }
  52. sphere(corner);
  53. }
  54. }
  55. head();
  56. retraction=laser_tower_size.z;
  57. down(retraction)
  58. up(anim(2, 3)*retraction)
  59. down(anim(5, 6)*retraction)
  60. translate(laser_pos) {
  61. laser();
  62. laser_tower();
  63. }
  64. color("DarkSlateBlue") {
  65. difference() {
  66. fwd(frame) cube([width, frame, height]);
  67. head_space();
  68. }
  69. fwd(frame) down(frame) cube([width, depth + frame, frame]);
  70. }
  71. }
  72. holodisk_size = is_undef(disk_size) ? [50, 100, 20] : disk_size;
  73. reader(holodisk_size);