OpenSCAD 3D models for use with PD Buddy devices
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

sink_bracket.scad 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. include <MCAD/polyholes.scad>;
  2. include <MCAD/units.scad>;
  3. include <truncated_teardrop.scad>;
  4. sink_0_1 = [26*mm, 49*mm, 18*mm, 4*mm, 10*mm];
  5. sink_0_2 = [26*mm, 48*mm, 18*mm, 4*mm, 10*mm];
  6. sink_0_3 = [25*mm, 30*mm, 17*mm, 4*mm, 10*mm];
  7. function sink_width(board) = board[0];
  8. function sink_length(board) = board[1];
  9. function sink_screw_spacing(board) = board[2];
  10. function sink_screw_distance(board) = board[3];
  11. function sink_connector_cutout(board) = board[4];
  12. /*
  13. * A general-purpose mount for the PD Buddy Sink
  14. */
  15. module sink_mount(layer_thickness=0.25*mm, height=8*mm, nut_depth=4*mm,
  16. cutout=0.5*mm, bolt_tolerance=0.3*mm, nut_tolerance=0.05*mm,
  17. board=sink_0_3) {
  18. w = sink_width(board);
  19. difference() {
  20. /* Body of the mount */
  21. cube([8*mm, w, height]);
  22. /* Bolt hole bottom height. Leave one layer_thickness as a bridge. */
  23. bhbot = nut_depth + layer_thickness;
  24. /* Bolt holes */
  25. translate([4*mm, (w - sink_screw_spacing(board))/2, bhbot])
  26. polyhole(d=3*mm + bolt_tolerance, h=height - bhbot + epsilon);
  27. translate([4*mm, (w + sink_screw_spacing(board))/2, bhbot])
  28. polyhole(d=3*mm + bolt_tolerance, h=height - bhbot + epsilon);
  29. /* Nut holes */
  30. translate([4*mm, (w - sink_screw_spacing(board))/2, -epsilon])
  31. rotate([0, 0, 30])
  32. cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
  33. translate([4*mm, (w + sink_screw_spacing(board))/2, -epsilon])
  34. rotate([0, 0, 30])
  35. cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
  36. /* Small cutout to clear any solder bulges under the USB connector */
  37. translate([-epsilon, (w - sink_connector_cutout(board))/2, height - cutout])
  38. cube([8*mm + 2*epsilon, sink_connector_cutout(board), cutout + epsilon]);
  39. }
  40. }
  41. /*
  42. * A bracket for mounting the PD Buddy Sink on a panel
  43. */
  44. module sink_bracket(layer_thickness=0.25*mm, height=8*mm, nut_depth=4*mm,
  45. cutout=0.5*mm, bolt_tolerance=0.3*mm, nut_tolerance=0.05*mm,
  46. board=sink_0_3) {
  47. w = sink_width(board);
  48. halfend_width = 8*mm;
  49. bracket_width = w + 2*halfend_width;
  50. mount_distance = 5*mm;
  51. difference() {
  52. union() {
  53. cube([8*mm, halfend_width, height]);
  54. translate([0, halfend_width, 0])
  55. sink_mount(layer_thickness=layer_thickness, height=height,
  56. nut_depth=nut_depth, cutout=cutout,
  57. bolt_tolerance=bolt_tolerance,
  58. nut_tolerance=nut_tolerance,
  59. board=board);
  60. translate([0, halfend_width + w, 0])
  61. cube([8*mm, halfend_width, height]);
  62. }
  63. /* Bolt holes */
  64. translate([-epsilon, mount_distance, height/2])
  65. truncated_teardrop(radius=(3*mm + bolt_tolerance)/2,
  66. length=8*mm + 2*epsilon);
  67. translate([-epsilon, bracket_width - mount_distance, height/2])
  68. truncated_teardrop(radius=(3*mm + bolt_tolerance)/2,
  69. length=8*mm + 2*epsilon);
  70. /* Nut holes */
  71. translate([4*mm, mount_distance, height/2])
  72. rotate([0, 90, 0])
  73. rotate([0, 0, 30])
  74. cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
  75. translate([4*mm, bracket_width - mount_distance, height/2])
  76. rotate([0, 90, 0])
  77. rotate([0, 0, 30])
  78. cylinder(r=6.4*mm / 2 + nut_tolerance, h=nut_depth + epsilon, $fn=6);
  79. }
  80. }
  81. sink_bracket(layer_thickness=0.25);