Pip-Boy inspired phone holder built around the PINE64 PinePhone
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

102 行
3.1 KiB

  1. // dependency: https://github.com/revarbat/BOSL
  2. include <BOSL/constants.scad>
  3. use <BOSL/transforms.scad>
  4. use <BOSL/shapes.scad>
  5. use <BOSL/masks.scad>
  6. use <BOSL/sliders.scad>
  7. // DEBUG:
  8. //validation = 1;
  9. //xray = 1;
  10. // EXPORT:
  11. MODEL_STRAP_PLATFORM_BASE=10;
  12. MODEL_STRAP_PLATFORM_RIB=11;
  13. MODEL_STRAP_PLATFORM_RIB_BRACE=12;
  14. export=0; // [0:20]
  15. function is_not_export() = is_undef(export) || export == 0;
  16. function is_export() = !is_not_export();
  17. function is_model_strict(m) = is_export() && export == m;
  18. function is_model(m) = is_not_export() || export == m;
  19. function get_phone_size() = [160, 76.7, 10];
  20. module arm() {
  21. $fn=$preview ? 10 : 30;
  22. arm_size=[200, 55, 40];
  23. color("gray")
  24. down(arm_size.z/2) cuboid(arm_size, fillet=16, edges=EDGES_X_ALL);
  25. }
  26. module strap_platform() {
  27. base_size=[40, 70, 2];
  28. rib_thickness=2;
  29. rib_height=20;
  30. rib_pos=[base_size.x/2 - rib_thickness, 0, -1.3];
  31. brace_size=[base_size.x, 3.6, 4.8];
  32. brace_pos=[0, base_size.y/2 - 4, -1.3];
  33. module platform_base() {
  34. difference() {
  35. down(base_size.z/2) cuboid(base_size, fillet=2, edges=EDGES_Z_ALL);
  36. down(base_size.z/2) scale([0.75, 0.85, 2]) cuboid(base_size, fillet=2, edges=EDGES_Z_ALL);
  37. model_rib_left(socket=true);
  38. model_rib_right(socket=true);
  39. }
  40. }
  41. module platform_rib(socket=false) {
  42. rib_size=[rib_thickness, base_size.y - 2, rib_height];
  43. difference() {
  44. union() {
  45. difference() {
  46. down(rib_size.z/2) scale(socket ? 1.01 : 1) sparse_strut(h=rib_size.z, l=rib_size.y, thick=rib_size.x, strut=1.2, maxang=40, max_bridge=4);
  47. arm();
  48. }
  49. difference() {
  50. intersection() {
  51. down(rib_size.z/2) cube(rib_size, center=true);
  52. scale(1.07) arm();
  53. }
  54. down(2) scale(1.0) arm();
  55. }
  56. }
  57. fwd(brace_pos.y) platform_rib_brace(socket=true);
  58. back(brace_pos.y) platform_rib_brace(socket=true);
  59. }
  60. }
  61. module platform_rib_brace(socket=false) {
  62. down(rib_height - 1.2 - brace_size.z/2) scale(socket ? 1.02 : 1) cuboid(brace_size, fillet=1, edges=EDGES_X_ALL);
  63. }
  64. module model_rib_left(socket=false) {
  65. left(rib_pos.x) up(rib_pos.z) platform_rib(socket=socket);
  66. }
  67. module model_rib_right(socket=false) {
  68. right(rib_pos.x) up(rib_pos.z) platform_rib(socket=socket);
  69. }
  70. module model_brace_front() {
  71. fwd(brace_pos.y) up(brace_pos.z) platform_rib_brace();
  72. }
  73. module model_brace_back() {
  74. back(brace_pos.y) up(brace_pos.z) platform_rib_brace();
  75. }
  76. if (is_model(MODEL_STRAP_PLATFORM_BASE)) platform_base();
  77. if (is_model(MODEL_STRAP_PLATFORM_RIB)) model_rib_left();
  78. if (is_model(MODEL_STRAP_PLATFORM_RIB_BRACE)) model_brace_front();
  79. if (is_not_export()) {
  80. model_rib_right();
  81. model_brace_back();
  82. }
  83. }
  84. module model_strap_platform() {
  85. strap_platform();
  86. }
  87. module model_arm() {
  88. if (is_not_export()) down(3) arm();
  89. }
  90. model_strap_platform();
  91. model_arm();