1
0

db25.scad 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. //
  2. // *SpHEAR Project (Spherical Harmonics Ears),
  3. //
  4. // db25 connector plate
  5. //
  6. // dimensions found here:
  7. // http://www.interfacebus.com/Connector_D-Sub_Mechanical_Dimensions.html
  8. //
  9. //
  10. // Copyright 2015-2016, Fernando Lopez-Lezcano, All Rights Reserved
  11. // nando@ccrma.stanford.edu
  12. //
  13. //
  14. // This program is free software: you can redistribute it and/or modify
  15. // it under the terms of the GNU General Public License as published by
  16. // the Free Software Foundation, either version 3 of the License, or
  17. // (at your option) any later version.
  18. //
  19. // This program is distributed in the hope that it will be useful,
  20. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. // GNU General Public License for more details.
  23. //
  24. // You should have received a copy of the GNU General Public License
  25. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  26. //
  27. //
  28. // 3d Models released under the Creative Commons license as follows:
  29. // Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
  30. // http://creativecommons.org/licenses/by-nc-sa/4.0/
  31. // size of connector
  32. B = 39.09;
  33. D = 8.48;
  34. // size of cutout
  35. H = 41.53;
  36. J = 10.97;
  37. // distance between mounting screws
  38. C = 47.17;
  39. // mount plate
  40. A = 53.42;
  41. E = 12.93;
  42. // depth of contacts
  43. c_depth = 9.5;
  44. // max size of shell
  45. shell_l = 55.0;
  46. shell_w = 8.2 * 2;
  47. ang = 10;
  48. d_s = 3.4 / 2;
  49. // thickness of plate
  50. t = 1.0;
  51. // mini-xlr diameter
  52. xlr_diam = 0.444 * 2.54;
  53. module db25_plate(width = E, th = t, border = 0) {
  54. linear_extrude(height = th) {
  55. polygon([
  56. [- (A/2 + border), width/2 + border],
  57. [A/2 + border, width/2 + border],
  58. [A/2 + border, - (width/2 + border)],
  59. [-(A/2 + border), - (width/2 + border)],
  60. ]);
  61. }
  62. }
  63. module db25_box(width = E, height, th = t) {
  64. linear_extrude(height = th) {
  65. polygon([
  66. [- A/2, width/2],
  67. [A/2, width/2],
  68. [A/2, - width/2],
  69. [-A/2, - width/2],
  70. ]);
  71. }
  72. // box walls
  73. *translate([-A/2, -(width/2) - th / 8, 0]) {
  74. cube([th, width, height + 4]);
  75. }
  76. *translate([A/2, -(width/2) - th/2, -6]) {
  77. cube([th, width, height]);
  78. }
  79. }
  80. module db25_cutout(th = t) {
  81. thin_mint = 0.001;
  82. hull() {
  83. // corners
  84. for (coord = [
  85. [- H/2 + d_s/2, J/2 - d_s/2],
  86. [H/2 - d_s/2, J/2 - d_s/2],
  87. [- H/2 + d_s/2 + J * tan(10), - J/2 + d_s/2],
  88. [H/2 - d_s/2 - J * tan(10), - J/2 + d_s/2],
  89. ]) {
  90. translate([coord[0], coord[1], -thin_mint]) {
  91. cylinder(r = d_s, h = th + thin_mint * 2, $fn = facets);
  92. }
  93. }
  94. }
  95. // holes for screws
  96. for (hole = [-C/2, C/2]) {
  97. translate([hole, 0, -thin_mint]) {
  98. cylinder(r = d_s, h = th + thin_mint * 2, $fn = facets);
  99. }
  100. }
  101. }
  102. *difference() {
  103. db25_plate();
  104. db25_cutout();
  105. }