Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2021
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. BT = 21.0;
  2. BB = 42.0;
  3. HI = 153.0;
  4. TW = 1.8; // dimension walls
  5.  
  6. cs30 = cos(30);
  7.  
  8. rB = BB / ( 2 * cs30 );
  9. rT = BT / ( 2 * cs30 );
  10.  
  11. dB = TW / tan(30);
  12.  
  13. // External dimensions
  14. BBE = BB + ( 2 * dB);
  15. rBE = BBE / ( 2 * cs30 );
  16. BTE = BT + ( 2 * dB);
  17. rTE = BTE / ( 2 * cs30 );
  18.  
  19. dS = (BB - BT) / 2;
  20.  
  21. // Length of the angled side 2D
  22. // tnAv = tan(Av) = HI / dS
  23. Av = atan(HI / dS);
  24. // snAv = HI / SLv
  25. SLv = HI / sin(Av);
  26.  
  27. // Effective high of the box
  28. // csAsv3D = ( RB - RT ) / SLv;
  29. Asv3D = acos( ( rB - rT ) / SLv );
  30. // sin(Asv3D) = EHI / SLv;
  31. EHI = sin(Asv3D) * SLv;
  32.  
  33. // Angel of the side plates
  34. //sin(Apv3D) = EHI / HI;
  35. Apv3D = asin(EHI / HI);
  36.  
  37. /*
  38. translate([0,0,HI + ( 2 * TW )]){
  39. color([0.0,0.0,0.5])
  40. circle(rTE);
  41. }
  42. */
  43.  
  44. //color([0.0,0.5,0.0]) circle(rBE);
  45. module triabox() {
  46. difference() {
  47. cylinder(HI + ( 2 * TW ),rBE,rTE,$fn=3);
  48. translate([0,0,TW]){
  49. cylinder(HI,rB,rT,$fn=3);
  50. }
  51. //cylinder(HI + ( 2 * TW ),rBE,rTE,$fn=3);
  52. }
  53.  
  54. }
  55.  
  56. module wall() {
  57. translate([0,0,0]){
  58. cube([TW,BB/2-dS,HI], 0);
  59. //cylinder(HI,rTE,rT,$fn=1);
  60. };
  61. }
  62. //wall();
  63.  
  64. // Top and bottom plates
  65. //translate([HI + 10,0,00]){
  66. translate([-6,0,HI]){
  67. rotate([0,0,180]) {
  68. cylinder(TW,rT,rTE,$fn=3);
  69. }
  70. };
  71.  
  72. translate([0,0,0]){
  73. cylinder(TW,rBE,rB,$fn=3);
  74. };
  75.  
  76. //translate([0,0,-20]){
  77. //projection(cut = true)
  78. //rotate([0,0,0]) {
  79.  
  80. //difference(){
  81. intersection() {
  82. triabox();
  83. translate([0,0,10]){
  84. cylinder(TW,rBE,rB,$fn=3);
  85. }
  86. //triabox();
  87. //};
  88. };
  89.  
  90. // tan(x) = dS / HI
  91. x = atan(dS / HI);
  92.  
  93. module triapartL() {
  94. rotate([-x,0,0]) {
  95. translate([0,0,0]){
  96. cube([TW,dS,HI+TW], 0);
  97. };
  98. }
  99. }
  100.  
  101. module triapartR() {
  102. rotate([x,0,0]) {
  103. translate([0,0,0]){
  104. cube([TW,dS,HI+TW], 0);
  105. };
  106. }
  107. }
  108.  
  109.  
  110.  
  111. //triapart();
  112. //mirror([0,1,0])
  113. rotate([0,Apv3D-90,0]) {
  114. translate([0,-BB/2,0]){
  115. union() {
  116. intersection() {
  117. triapartL();
  118. wall();
  119. };
  120. translate([0,dS,0]){
  121. wall();
  122. }}}
  123. }
  124.  
  125. //mirror([0,5,0])
  126.  
  127. rotate([0,Apv3D-90,0]) {
  128. union() {
  129. translate([0,dS,0]){
  130. intersection() {
  131. triapartR();
  132. wall();
  133. };
  134. }
  135. wall();
  136. }
  137. }
  138.  
  139. module testR() {
  140. union() {
  141. translate([0,dS,0]){
  142. intersection() {
  143. triapartR();
  144. wall();
  145. };
  146. };
  147. wall();
  148. };
  149. }
  150.  
  151. module testL() {
  152. union() {
  153. intersection() {
  154. triapartL();
  155. wall();
  156. };
  157. };
  158. translate([0,dS,0]){
  159. wall();
  160. };
  161. }
  162.  
  163. module testS() {
  164. testL();
  165. translate([0,BB/2,0]){
  166. testR();
  167. };
  168. }
  169.  
  170. /*
  171. translate([-TW,0,0]){
  172. testS();
  173. };
  174. */
  175.  
  176. translate([0,-BB/2,0]){
  177. //rotate([0,Apv3D-90,60]) {
  178. rotate([0,90-Apv3D,60]) {
  179. translate([-TW,0,0]){
  180. testS();
  181. };
  182. }}
  183.  
  184.  
  185. module hm13z() {
  186. rotate([0,0,45]) {
  187. //cylinder(3.5,5.772,4.3,$fn=32);
  188. intersection() {
  189. cylinder(0.62,7.6,7.6,$fn=32);
  190. cylinder(0.62,10,10,$fn=4);
  191. }}}
  192.  
  193. module hm13zV() {
  194. rotate([0,90,0]) {
  195. //cylinder(3.5,5.772,4.3,$fn=32);
  196. intersection() {
  197. cylinder(0.62,7.6,7.6,$fn=32);
  198. cylinder(0.62,10,10,$fn=4);
  199. }}}
  200.  
  201. translate([30,0,0]){
  202. hm13z();
  203. hm13zV();
  204. }
  205.  
  206. module hm13combined() {
  207. hm13z();
  208. hm13zV();
  209. };
  210.  
  211. translate([90,0,0]){
  212. hm13combined();
  213. }
  214.  
  215.  
  216. translate([50,0,0]){
  217. rotate([0,0,45]) {
  218. //cylinder(3.5,5.772,4.3,$fn=32);
  219. intersection() {
  220. cylinder(0.62,7.6,7.6,$fn=32);
  221. cylinder(0.62,10,10,$fn=4);
  222. }
  223. }};
  224.  
  225.  
  226. module HM130Z0() {
  227. //rotate([92.16,0,50]) {
  228. translate([0,0,0.62]){
  229. // Conus
  230. cylinder(3.5,5.772,4.3,$fn=32);
  231. }
  232. translate([0,0,4.12]){
  233. // Magnet
  234. cylinder(2.5,4.3,4.3,$fn=32);
  235. }
  236. /*
  237. translate([0,0,13.55]){
  238. cylinder(1.5,6,6,$fn=32);
  239. }
  240. */
  241. // Front plate
  242. rotate([0,0,45]) {
  243. intersection() {
  244. cylinder(0.62,7.6,7.6,$fn=32);
  245. cylinder(0.62,10,10,$fn=4);
  246. }
  247. }
  248. translate([6.5,-1,-1]){
  249. rotate([180,0,180]) {
  250. //text("HM130Z0", size = 2);
  251. }
  252. }
  253. //}
  254. };
  255.  
  256. module HM170Z0() {
  257. //rotate([92.16,0,50]) {
  258. translate([0,0,0.9]){
  259. // Conus
  260. cylinder(3.95,7.2,4.8,$fn=32);
  261. }
  262. translate([0,0,4.85]){
  263. // Magnet
  264. cylinder(4.0,4.8,4.8,$fn=32);
  265. }
  266. /*
  267. translate([0,0,13.55]){
  268. cylinder(1.5,6,6,$fn=32);
  269. }
  270. */
  271. // Front plate
  272. rotate([0,0,45]) {
  273. intersection() {
  274. cylinder(0.9,8.65,8.65,$fn=32);
  275. //cylinder(0.62,10,10,$fn=4);
  276. }
  277. }
  278. translate([6.5,-1,-1]){
  279. rotate([180,0,180]) {
  280. //text("HM170Z0", size = 2);
  281. }
  282. }
  283. //}
  284. };
  285.  
  286. translate([70,0,0]){
  287. HM170Z0();
  288. }
  289.  
  290. module SS32WT00() {
  291. //rotate([92.16,0,90]) {
  292. translate([0,0,1]){
  293. cylinder(8.84,14.5,8,$fn=32);
  294. }
  295. translate([0,0,9.84]){
  296. cylinder(4.7,10,10,$fn=32);
  297. }
  298. translate([0,0,14.54]){
  299. cylinder(1.5,6,6,$fn=32);
  300. }
  301. cylinder(1,16,16,$fn=32);
  302. translate([7.5,-1,-1]){
  303. rotate([180,0,180]) {
  304. //text("SS32WT00", size = 2);
  305. }
  306. }
  307. //}
  308. }
  309.  
  310. module AMTbig() {
  311. translate([-5,-10,0]){
  312. cube([10,20,0.6], 0);
  313. };
  314. translate([-4,-8.6,0]){
  315. cube([8,17.2,2.4], 0);
  316. };
  317. translate([6,-1,-1]){
  318. rotate([180,0,180]) {
  319. //text("AMTPRO", size = 2);
  320. }
  321. }
  322. }
  323.  
  324. module LS10() {
  325. // Front plate
  326. cylinder(1.2,13.61,13.61,$fn=32);
  327. //rotate([92.16,0,90]) {
  328. // Conus part 1
  329. translate([0,0,1.2]){
  330. cylinder(3.5,11.925,11.925,$fn=12);
  331. }
  332. translate([0,0,4.7]){
  333. cylinder(3.75,11.925,11.925-3.75,$fn=12);
  334. }
  335. translate([4,-1,-1]){
  336. rotate([180,0,180]) {
  337. //text("LS10", size = 2);
  338. }
  339. }
  340. }
  341.  
  342. // Chassis as module
  343.  
  344. module chassis() {
  345. translate([TW+0.1,0,141.0]){
  346. rotate([90,0,-90]) {
  347. color([0,0,0]) AMTbig();
  348. }
  349. };
  350.  
  351.  
  352. translate([TW+0.1,0,122]){
  353. rotate([0,-90,0]) {
  354. color([0,0,0]) HM130Z0();
  355. }
  356. };
  357.  
  358. translate([TW+0.1,0,112]){
  359. rotate([0,-90,0]) {
  360. color([0,0,0]) HM170Z0();
  361. }
  362. };
  363.  
  364. translate([TW+0.1,0,63]){
  365. rotate([0,-90,0]) {
  366. color([0,0,0]) SS32WT00();
  367. }
  368. };
  369.  
  370. translate([TW+0.1,0,95]){
  371. rotate([0,-90,0]) {
  372. color([0,0,0]) LS10();
  373. }
  374. };
  375. }
  376.  
  377. rotate([0,Apv3D-90,0]) {
  378. chassis();
  379. }
  380.  
  381.  
  382. rotate([90,0,-90]) {
  383. translate([-14,168,0]) {
  384. color([0.5,0.5,0.75])
  385. text(str(dB), size = 5);
  386. text(str(round(100 * dB)/100), size = 10);
  387.  
  388. //round(100 * dB)/100
  389. }}
  390.  
  391. $fn=50;
  392. minkowski()
  393. {
  394. cube([20,10,1]);
  395. cylinder(r=1,h=1);
  396. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement