My self-made 3D-printable designs, mainly in OpenSCAD
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

skr_mini_mount.scad 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. pcb_width = 70.25;
  2. pcb_height = 103.75;
  3. pcb_depth = 2;
  4. pcb_holes = [
  5. [ 32.05, 5.53 ],
  6. [ 29.41, 37.34 ],
  7. [ pcb_width - 3.22, 23.39 ],
  8. [ pcb_width - 3.02, pcb_height - 18.20 ],
  9. [ 2.56, pcb_height - 2.53 ]
  10. ];
  11. hole_support_dia = 2.53 * 2; // min value of pcb_holes * 2
  12. pcb_dia = 3.2;
  13. wall = 5.0;
  14. pcb_wall_dist = 15;
  15. pcb_mount_dist = 5.0;
  16. mount_dia = 4.2;
  17. mounting_holes = [
  18. pcb_height * 1 / 8,
  19. pcb_height * 4 / 8,
  20. pcb_height * 7 / 8
  21. ];
  22. cutouts = [
  23. [ 12.5, 2, 10, -30 ],
  24. [ 12.5, 2, 35, -30 ],
  25. [ 12.5, 2, -15, -30 ],
  26. [ 12.5, 2, 10, -5 ],
  27. [ 12.5, 2, 35, -5 ],
  28. [ 12.5, 2, -15, -5 ],
  29. [ 12.5, 2, 10, 30 ],
  30. [ 12.5, 2, 35, 30 ],
  31. [ 12.5, 2, -15, 30 ],
  32. /*
  33. [ 20, 4, -5, -22.5 ],
  34. [ 20, 4, 35, -22.5 ],
  35. [ 25, 4, 32.5, 22.5 ],
  36. [ 10, 4, -12.5, 35 ],
  37. [ 10, 4, -12.5, 10 ],
  38. */
  39. ];
  40. $fn = 42;
  41. module prism(l, w, h) {
  42. polyhedron(
  43. points = [[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
  44. faces = [[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
  45. );
  46. }
  47. module holes(dia, height) {
  48. for (h = [0 : len(pcb_holes) - 1])
  49. translate([pcb_width - pcb_holes[h][0], pcb_holes[h][1], 0])
  50. cylinder(d = dia, h = height);
  51. }
  52. module pcb() {
  53. cube([pcb_width, pcb_height, pcb_depth]);
  54. translate([0, 0, -pcb_mount_dist - wall - 1])
  55. holes(pcb_dia - 0.2, pcb_mount_dist + wall + 1);
  56. }
  57. module mount() {
  58. translate([0, -wall, 0])
  59. difference() {
  60. union() {
  61. cube([pcb_width + pcb_wall_dist + 20, wall, pcb_height]);
  62. translate([pcb_width + pcb_wall_dist + 7.5, wall, 0])
  63. cube([5, 1, pcb_height]);
  64. translate([0, wall, pcb_height])
  65. rotate([-90, 0, 0])
  66. holes(hole_support_dia, pcb_mount_dist);
  67. }
  68. for (i = mounting_holes)
  69. translate([pcb_width + pcb_wall_dist + 10, -1, i])
  70. rotate([-90, 0, 0])
  71. cylinder(d = mount_dia, h = wall + 3);
  72. translate([0, -1, pcb_height])
  73. rotate([-90, 0, 0])
  74. holes(pcb_dia, wall + pcb_mount_dist + 2);
  75. for (c = [0 : len(cutouts) - 1])
  76. for (i = [0, 1, 2, 3])
  77. translate([pcb_width / 2 + cutouts[c][2], 0, pcb_height / 2 + cutouts[c][3]])
  78. rotate([0, 90 * i, 0])
  79. translate([cutouts[c][0] * sqrt(2) / 2 + cutouts[c][1], -1, -cutouts[c][0] * sqrt(2) / 2])
  80. rotate([45, 0, 90])
  81. prism(wall + 2, cutouts[c][0], cutouts[c][0]);
  82. }
  83. }
  84. module assembly() {
  85. %translate([0, pcb_mount_dist, pcb_height])
  86. rotate([-90, 0, 0])
  87. pcb();
  88. mount();
  89. }
  90. //translate([0, 0, pcb_height])
  91. //rotate([0, 180, 0])
  92. rotate([90, 0, 0])
  93. assembly();