My self-made 3D-printable designs, mainly in OpenSCAD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lamp_mount.scad 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. plate = 250;
  2. mount_dist = 58;
  3. trans_width = 45;
  4. trans_depth = 30;
  5. trans_height = 20;
  6. hole = 5.0;
  7. hole_dist = 2;
  8. arm_len = 70 + (hole / 2) + hole_dist;
  9. height = 3;
  10. width = 9;
  11. arm_height = 25;
  12. top_arm_len = 35.1;
  13. hook_width_add = 3;
  14. hook_dia = 15;
  15. hook_height = width;
  16. hook_size = 2;
  17. hook_off = 15;
  18. print_dist = 10;
  19. print = true;
  20. $fn = 42;
  21. module mount(layer) {
  22. difference() {
  23. cube([width, arm_len, height]);
  24. translate([width / 2, hole / 2 + hole_dist, -1])
  25. cylinder(d = hole, h = height + 2);
  26. }
  27. difference() {
  28. translate([0, arm_len - height, 0]) {
  29. cube([width, height, arm_height + (layer * height)]);
  30. translate([0, 0, arm_height + (layer * height)])
  31. cube([width, top_arm_len, height]);
  32. }
  33. translate([0, arm_len - height, 0])
  34. translate([0, 0, arm_height + (layer * height)])
  35. translate([width / 2, top_arm_len - 4.5, -4 * height + 2])
  36. cylinder(d = hole, h = (height * 4) + 2);
  37. }
  38. }
  39. module circles() {
  40. translate([-hook_dia / 2 + hook_size, hook_height, 0])
  41. rotate([90, 0, -0])
  42. difference() {
  43. cylinder(d = hook_dia, h = hook_height);
  44. translate([0, 0, -1])
  45. cylinder(d = hook_dia - hook_size * 2, h = hook_height + 2);
  46. translate([-hook_dia / 2 - 1, -hook_dia, -1])
  47. cube([hook_dia + 2, hook_dia, hook_height + 2]);
  48. }
  49. }
  50. module hook() {
  51. difference() {
  52. cube([width + hook_size + hook_width_add, width, height]);
  53. translate([width / 2, width / 2, -1])
  54. cylinder(d = hole, h = height + 2);
  55. }
  56. translate([width + hook_width_add, width - hook_height, height])
  57. cube([hook_size, hook_height, hook_off]);
  58. translate([width + hook_width_add, width - hook_height, height + hook_off])
  59. circles();
  60. }
  61. module print_arrangement() {
  62. rotate([0, -90, 0])
  63. mount(0);
  64. translate([print_dist, 10, 0])
  65. rotate([0, -90, 0])
  66. mount(1);
  67. translate([print_dist * 2, 20, 0])
  68. rotate([0, -90, 0])
  69. mount(2);
  70. translate([print_dist * 3, 30, 0])
  71. rotate([0, -90, 0])
  72. mount(3);
  73. translate([25, 0, width])
  74. rotate([-90, 0, 0])
  75. hook();
  76. }
  77. module preview_arrangement() {
  78. // plate
  79. translate([-plate / 2, -plate / 2, 0])
  80. union() {
  81. color("purple")
  82. cube([plate, plate, 1]);
  83. color("green")
  84. translate([mount_dist, mount_dist, 1])
  85. cylinder(d = hole, h = height * 2);
  86. color("green")
  87. translate([plate - mount_dist, mount_dist, 1])
  88. cylinder(d = hole, h = height * 2);
  89. color("green")
  90. translate([mount_dist, plate - mount_dist, 1])
  91. cylinder(d = hole, h = height * 2);
  92. color("green")
  93. translate([plate - mount_dist, plate - mount_dist, 1])
  94. cylinder(d = hole, h = height * 2);
  95. color("orange")
  96. translate([(plate - trans_width) / 2, (plate - trans_depth) / 2, 0])
  97. cube([trans_width, trans_depth, trans_height]);
  98. }
  99. // arms
  100. for (i = [0 : 3]) {
  101. rotate([0, 0, 45 + (90 * i)])
  102. translate([-width / 2, -arm_len - 27.6, 0])
  103. mount(i);
  104. }
  105. translate([-4.5, -4.5, 37])
  106. hook();
  107. }
  108. if (print) {
  109. print_arrangement();
  110. } else {
  111. preview_arrangement();
  112. }