My self-made 3D-printable designs, mainly in OpenSCAD
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.

display_unit.scad 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. // sparkfun 20x4 serial lcd
  2. lcd_pcb_width = 105;
  3. lcd_pcb_depth = 60;
  4. lcd_pcb_height = 1.6;
  5. lcd_bezel_width = 87.5;
  6. lcd_bezel_depth = 41.85;
  7. lcd_bezel_height = 9.4;
  8. lcd_bezel_off_x = 5.4;
  9. lcd_bezel_off_y = 9.05;
  10. lcd_hole_dia = 2.9;
  11. lcd_hole_off = 2.5;
  12. lcd_hole_dist_x = 95.75 - lcd_hole_dia;
  13. lcd_hole_dist_y = 58 - lcd_hole_dia;
  14. lcd_negative_dist = 2.0;
  15. lcd_spacer_height = 3;
  16. lcd_spacer_dia = lcd_hole_dia + 5.0;
  17. lcd_spacer_hole_dia = lcd_hole_dia + 0.3;
  18. lcd_negative_width = lcd_bezel_width + lcd_negative_dist;
  19. lcd_negative_depth = lcd_bezel_depth + lcd_negative_dist;
  20. lcd_negative_off_x = lcd_bezel_off_x - (lcd_negative_width - lcd_bezel_width) / 2;
  21. lcd_negative_off_y = lcd_bezel_off_y - (lcd_negative_depth - lcd_bezel_depth) / 2;
  22. keypad_base_width = 51.2;
  23. keypad_base_depth = 64.1;
  24. keypad_base_height = 3.1;
  25. keypad_top_width = 46.0;
  26. keypad_top_depth = 57.3;
  27. keypad_top_height = 5.2;
  28. keypad_top_off_x = 2.5;
  29. keypad_top_off_y = 3.4;
  30. keypad_hole_dia = 2.7;
  31. keypad_hole_off_x = 1.45 + keypad_hole_dia / 2;
  32. keypad_hole_off_y = 1.35 + keypad_hole_dia / 2;
  33. keypad_hole_dist_x = 48.9 - keypad_hole_dia;
  34. keypad_hole_dist_y = 61.4 - keypad_hole_dia;
  35. keypad_negative_dist = 1.0;
  36. keypad_spacer_dia = keypad_hole_dia + 2.0;
  37. keypad_spacer_hole_dia = keypad_hole_dia;
  38. keypad_spacer_height = 0; // TODO too big and not needed
  39. voltmeter_width = 22.85;
  40. voltmeter_depth = 11.1;
  41. voltmeter_height = 1.0;
  42. voltmeter_display_height = 6.4;
  43. voltmeter_tab_width = 3.65;
  44. voltmeter_tab_depth = 4.4;
  45. voltmeter_hole_dia = 2.25;
  46. voltmeter_spacer_hole_dia = voltmeter_hole_dia;
  47. voltmeter_negative_add = 0.5;
  48. voltmeter_off_x = 15;
  49. voltmeter_off_y = 6;
  50. voltmeter_dist = voltmeter_depth + 2;
  51. switch_width = 18.2;
  52. switch_depth = 11.5;
  53. switch_height = 11.0;
  54. switch_top_width = 20.8;
  55. switch_top_depth = 14.8;
  56. switch_top_height = 2.1;
  57. switch_off_x = 18;
  58. switch_off_y = 3;
  59. switch_add_negative = 1.0;
  60. mount_dist = 5;
  61. mount_support_prism = 10;
  62. mount_width = lcd_pcb_width + mount_dist;
  63. mount_depth = lcd_pcb_depth + keypad_base_depth + mount_dist * 2 + mount_support_prism;
  64. mount_height = 5;
  65. mount_support_usable_depth = 15;
  66. mount_support_depth = mount_height + mount_support_prism + mount_support_usable_depth;
  67. mount_hole_dia = 4.3;
  68. mount_hole_off = 30;
  69. wall = 5;
  70. wall_hole = 4.3;
  71. wall_prism = 5;
  72. wall_height = 30;
  73. wall_mount_off_x = 1;
  74. wall_mount_off_y = 1;
  75. wall_width = mount_width + wall + wall_prism + wall_mount_off_x;
  76. wall_depth = mount_support_depth + wall + wall_mount_off_y;
  77. text_bottom = "Gieß-o-mat";
  78. text_bottom_font = "Liberation Sans:style=Bold";
  79. text_bottom_h = 10;
  80. text_bottom_d = 0.5;
  81. text_bottom_off = 3.5;
  82. text_bottom_spacing = 1.3;
  83. text_side = "xythobuz";
  84. text_side_font = "Liberation Sans:style=Bold";
  85. text_side_h = 7;
  86. text_side_d = 0.5;
  87. text_side_off = 4.2;
  88. text_side_spacing = 1.0;
  89. voltmeter_text_left_1 = "Co";
  90. voltmeter_text_left_2 = "Va";
  91. voltmeter_text_left_3 = "Re";
  92. voltmeter_text_left_4 = "Pu";
  93. voltmeter_text_left_font = "Liberation Sans:style=Bold";
  94. voltmeter_text_left_h = 8;
  95. voltmeter_text_left_d = 0.5;
  96. voltmeter_text_left_off_x = 11.5;
  97. voltmeter_text_left_off_y = 1.5;
  98. voltmeter_text_left_spacing = 1.0;
  99. voltmeter_text_right = "V";
  100. voltmeter_text_right_font = "Liberation Sans:style=Bold";
  101. voltmeter_text_right_h = 8;
  102. voltmeter_text_right_d = 0.5;
  103. voltmeter_text_right_off_x = 4.4;
  104. voltmeter_text_right_off_y = 1.5;
  105. voltmeter_text_right_spacing = 1.0;
  106. switch_text_left = "Off";
  107. switch_text_right = "On";
  108. switch_text_font = "Liberation Sans:style=Bold";
  109. switch_text_h = 6.5;
  110. switch_text_d = 0.5;
  111. switch_text_off_x = 10.5;
  112. switch_text_off_y = 2.5;
  113. switch_text_dist_x = switch_top_width + 16.0;
  114. switch_text_spacing = 1.0;
  115. $fn = 42;
  116. module prism(l, w, h) {
  117. polyhedron(
  118. points = [[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
  119. faces = [[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
  120. );
  121. }
  122. module spacer(do, di, h) {
  123. difference() {
  124. cylinder(d = do, h = h);
  125. translate([0, 0, -1])
  126. cylinder(d = di, h = h + 2);
  127. }
  128. }
  129. module lcd() {
  130. difference() {
  131. cube([lcd_pcb_width, lcd_pcb_depth, lcd_pcb_height]);
  132. translate([lcd_hole_off, lcd_hole_off, -1])
  133. cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
  134. translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off, -1])
  135. cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
  136. translate([lcd_hole_off, lcd_hole_off + lcd_hole_dist_y, -1])
  137. cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
  138. translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off + lcd_hole_dist_y, -1])
  139. cylinder(d = lcd_hole_dia, h = lcd_pcb_height + 2);
  140. }
  141. translate([lcd_bezel_off_x, lcd_bezel_off_y, lcd_pcb_height])
  142. cube([lcd_bezel_width, lcd_bezel_depth, lcd_bezel_height]);
  143. }
  144. module keypad(l = 0, a = 0) {
  145. difference() {
  146. // TODO rounded corners
  147. cube([keypad_base_width, keypad_base_depth, keypad_base_height]);
  148. translate([keypad_hole_off_x, keypad_hole_off_y, -1])
  149. cylinder(d = keypad_hole_dia, keypad_base_height + 2);
  150. translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y, -1])
  151. cylinder(d = keypad_hole_dia, keypad_base_height + 2);
  152. translate([keypad_hole_off_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
  153. cylinder(d = keypad_hole_dia, keypad_base_height + 2);
  154. translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
  155. cylinder(d = keypad_hole_dia, keypad_base_height + 2);
  156. }
  157. // TODO rounded corners!
  158. translate([keypad_top_off_x - a / 2, keypad_top_off_y - a / 2, keypad_base_height])
  159. cube([keypad_top_width + a, keypad_top_depth + a, keypad_top_height + l]);
  160. }
  161. module voltmeter_tab() {
  162. difference() {
  163. translate([0, -voltmeter_tab_depth / 2, 0])
  164. cube([voltmeter_tab_width, voltmeter_tab_depth, voltmeter_height]);
  165. translate([voltmeter_tab_width / 2, 0, -1])
  166. cylinder(d = voltmeter_hole_dia, h = voltmeter_height + 2);
  167. }
  168. }
  169. module voltmeter() {
  170. cube([voltmeter_width, voltmeter_depth, voltmeter_height + voltmeter_display_height]);
  171. translate([-voltmeter_tab_width, voltmeter_depth / 2, 0])
  172. voltmeter_tab();
  173. translate([voltmeter_width, voltmeter_depth / 2, 0])
  174. voltmeter_tab();
  175. }
  176. module mount_voltmeters() {
  177. for (i = [0 : 3]) {
  178. translate([0, -voltmeter_dist * i, -1]) {
  179. translate([-voltmeter_negative_add / 2, -voltmeter_negative_add / 2, 0])
  180. cube([voltmeter_width + voltmeter_negative_add, voltmeter_depth + voltmeter_negative_add, mount_height + 2]);
  181. translate([-voltmeter_tab_width / 2, voltmeter_depth / 2, 0])
  182. cylinder(d = voltmeter_spacer_hole_dia, h = mount_height + 2);
  183. translate([voltmeter_width + voltmeter_tab_width / 2, voltmeter_depth / 2, 0])
  184. cylinder(d = voltmeter_spacer_hole_dia, h = mount_height + 2);
  185. }
  186. }
  187. }
  188. module switch(s = 0) {
  189. translate([-s / 2, -s / 2, s - switch_height])
  190. cube([switch_width + s, switch_depth + s, switch_height]);
  191. translate([-(switch_top_width - switch_width) / 2, -(switch_top_depth - switch_depth) / 2, s])
  192. cube([switch_top_width, switch_top_depth, switch_top_height]);
  193. }
  194. switch_mount_base = 11;
  195. switch_mount_hole = 3.2;
  196. switch_mount_base_height = 2;
  197. switch_mount_wall = 3;
  198. switch_mount_add = 3;
  199. switch_mount_width = switch_top_width + 2 * switch_mount_add;
  200. switch_mount_depth = switch_top_depth + 2 * switch_mount_add;
  201. switch_mount_height = 20;
  202. module switch_mount() {
  203. translate([switch_mount_wall, 0, 0])
  204. difference() {
  205. union() {
  206. cube([switch_mount_base + switch_mount_base_height, switch_mount_base, switch_mount_base_height]);
  207. translate([switch_mount_base_height, 0, switch_mount_base_height])
  208. rotate([0, 0, 90])
  209. prism(switch_mount_base, switch_mount_base_height, switch_mount_base_height);
  210. }
  211. translate([switch_mount_base / 2 + switch_mount_base_height, switch_mount_base / 2, -1])
  212. cylinder(d = switch_mount_hole, h = switch_mount_base_height + 2);
  213. }
  214. cube([switch_mount_wall, switch_mount_base, switch_mount_height]);
  215. translate([0, switch_mount_wall, switch_mount_height])
  216. //scale([-1, 1, 1])
  217. rotate([90, 0, 0])
  218. difference() {
  219. translate([0, 0, -switch_mount_base + switch_mount_wall])
  220. union() {
  221. cube([switch_mount_width, switch_mount_depth, switch_mount_base]);
  222. translate([switch_mount_wall, -switch_mount_base_height, switch_mount_base])
  223. rotate([0, 90, 0])
  224. prism(switch_mount_base, switch_mount_base_height, switch_mount_base_height);
  225. }
  226. translate([(switch_mount_width - switch_width) / 2, (switch_mount_depth - switch_depth) / 2, switch_mount_wall]) {
  227. scale([1, 1, 10])
  228. switch(switch_add_negative);
  229. %switch();
  230. }
  231. }
  232. }
  233. module mount_part() {
  234. translate([0, mount_height, 0])
  235. difference() {
  236. // baseplate
  237. cube([mount_width, mount_depth, mount_height]);
  238. translate([mount_dist / 2, keypad_base_depth + mount_support_prism + mount_dist * 3 / 2, 0]) {
  239. // hole for lcd bezel
  240. translate([lcd_negative_off_x, lcd_negative_off_y, -1])
  241. cube([lcd_negative_width, lcd_negative_depth, mount_height + 2]);
  242. // holes for lcd screws
  243. translate([lcd_hole_off, lcd_hole_off, -1])
  244. cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
  245. translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off, -1])
  246. cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
  247. translate([lcd_hole_off, lcd_hole_off + lcd_hole_dist_y, -1])
  248. cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
  249. translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off + lcd_hole_dist_y, -1])
  250. cylinder(d = lcd_spacer_hole_dia, h = mount_height + 2);
  251. }
  252. translate([lcd_pcb_width - keypad_base_width + mount_dist / 2, mount_support_prism + mount_dist / 2, 0]) {
  253. // hole for keypad upper part
  254. translate([0, 0, -keypad_base_height - 1])
  255. keypad(mount_height, keypad_negative_dist);
  256. // holes for keypad screws
  257. translate([keypad_hole_off_x, keypad_hole_off_y, -1])
  258. cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
  259. translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y, -1])
  260. cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
  261. translate([keypad_hole_off_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
  262. cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
  263. translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y + keypad_hole_dist_y, -1])
  264. cylinder(d = keypad_spacer_hole_dia, h = mount_height + 2);
  265. }
  266. // holes for voltmeters
  267. translate([mount_dist / 2 + voltmeter_tab_width + voltmeter_off_x, mount_support_prism + keypad_base_depth + voltmeter_off_y - voltmeter_depth, 0])
  268. mount_voltmeters();
  269. // hole for switch
  270. translate([mount_dist / 2 + switch_off_x, mount_support_prism + switch_off_y, mount_height])
  271. switch(switch_add_negative);
  272. }
  273. // lcd spacers
  274. translate([0, mount_height, -lcd_spacer_height])
  275. translate([mount_dist / 2, keypad_base_depth + mount_support_prism + mount_dist * 3 / 2, 0]) {
  276. translate([lcd_hole_off, lcd_hole_off, 0])
  277. spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
  278. translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off, 0])
  279. spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
  280. translate([lcd_hole_off, lcd_hole_off + lcd_hole_dist_y, 0])
  281. spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
  282. translate([lcd_hole_off + lcd_hole_dist_x, lcd_hole_off + lcd_hole_dist_y, 0])
  283. spacer(lcd_spacer_dia, lcd_spacer_hole_dia, lcd_spacer_height);
  284. }
  285. // keypad spacers
  286. translate([0, mount_height, -keypad_spacer_height])
  287. translate([lcd_pcb_width - keypad_base_width + mount_dist / 2, mount_support_prism + mount_dist / 2, 0]) {
  288. translate([keypad_hole_off_x, keypad_hole_off_y, 0])
  289. spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
  290. translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y, 0])
  291. spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
  292. translate([keypad_hole_off_x, keypad_hole_off_y + keypad_hole_dist_y, 0])
  293. spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
  294. translate([keypad_hole_off_x + keypad_hole_dist_x, keypad_hole_off_y + keypad_hole_dist_y, 0])
  295. spacer(keypad_spacer_dia, keypad_spacer_hole_dia, keypad_spacer_height);
  296. }
  297. // bottom mounting plate
  298. translate([0, 0, mount_height - mount_support_depth])
  299. difference() {
  300. cube([mount_width, mount_height, mount_support_depth]);
  301. translate([mount_hole_off, -1, mount_support_usable_depth / 2])
  302. rotate([-90, 0, 0])
  303. cylinder(d = mount_hole_dia, h = mount_height + 2);
  304. translate([mount_width - mount_hole_off, -1, mount_support_usable_depth / 2])
  305. rotate([-90, 0, 0])
  306. cylinder(d = mount_hole_dia, h = mount_height + 2);
  307. }
  308. // prism support
  309. translate([0, mount_support_prism + mount_height, 0])
  310. rotate([180, 0, 0])
  311. prism(mount_width, mount_support_prism, mount_support_prism);
  312. }
  313. module texts_voltmeters() {
  314. for (i = [0 : 3])
  315. translate([voltmeter_width + voltmeter_text_right_off_x, voltmeter_text_right_off_y - voltmeter_dist * i, -voltmeter_text_right_d]) {
  316. linear_extrude(height = voltmeter_text_right_d + 0.1)
  317. text(voltmeter_text_right, font = voltmeter_text_right_font, size = voltmeter_text_right_h, spacing = voltmeter_text_right_spacing, halign = "center");
  318. }
  319. translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 0, -voltmeter_text_left_d])
  320. linear_extrude(height = voltmeter_text_left_d + 0.1)
  321. text(voltmeter_text_left_1, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
  322. translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 1, -voltmeter_text_left_d])
  323. linear_extrude(height = voltmeter_text_left_d + 0.1)
  324. text(voltmeter_text_left_2, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
  325. translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 2, -voltmeter_text_left_d])
  326. linear_extrude(height = voltmeter_text_left_d + 0.1)
  327. text(voltmeter_text_left_3, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
  328. translate([-voltmeter_tab_width - voltmeter_text_left_off_x, voltmeter_text_left_off_y - voltmeter_dist * 3, -voltmeter_text_left_d])
  329. linear_extrude(height = voltmeter_text_left_d + 0.1)
  330. text(voltmeter_text_left_4, font = voltmeter_text_left_font, size = voltmeter_text_left_h, spacing = voltmeter_text_left_spacing, halign = "center");
  331. }
  332. module mount() {
  333. difference() {
  334. mount_part();
  335. translate([mount_width / 2, text_bottom_off, mount_height - text_bottom_d])
  336. linear_extrude(height = text_bottom_d + 0.1)
  337. text(text_bottom, font = text_bottom_font, size = text_bottom_h, spacing = text_bottom_spacing, halign = "center");
  338. translate([mount_width - text_side_off, mount_height + keypad_base_depth + mount_support_prism + mount_dist * 3 / 2 + lcd_hole_off + lcd_hole_dist_y / 2, mount_height - text_side_d])
  339. rotate([0, 0, 90])
  340. linear_extrude(height = text_side_d + 0.1)
  341. text(text_side, font = text_side_font, size = text_side_h, spacing = text_side_spacing, halign = "center");
  342. translate([mount_dist / 2 + 2 * voltmeter_tab_width + voltmeter_off_x, mount_height + mount_support_prism + keypad_base_depth + voltmeter_off_y - voltmeter_depth, mount_height])
  343. texts_voltmeters();
  344. translate([switch_text_off_x, mount_height + mount_support_prism + switch_off_y + switch_text_off_y, mount_height - switch_text_d]) {
  345. linear_extrude(height = switch_text_d + 0.1)
  346. text(switch_text_left, font = switch_text_font, size = switch_text_h, spacing = switch_text_spacing, halign = "center");
  347. translate([switch_text_dist_x, 0, 0])
  348. linear_extrude(height = switch_text_d + 0.1)
  349. text(switch_text_right, font = switch_text_font, size = switch_text_h, spacing = switch_text_spacing, halign = "center");
  350. }
  351. }
  352. }
  353. module assembly_voltmeters() {
  354. for (i = [0 : 3]) {
  355. translate([0, -voltmeter_dist * i, 0])
  356. voltmeter();
  357. }
  358. }
  359. module wall_tab() {
  360. difference() {
  361. cube([wall, wall_depth, wall_height]);
  362. translate([-1, wall_depth / 2, wall_height / 2])
  363. rotate([0, 90, 0])
  364. cylinder(d = wall_hole, h = wall + 2);
  365. }
  366. }
  367. module wall_support() {
  368. difference() {
  369. prism(wall, wall_height, wall_width - wall);
  370. translate([-1, wall, 0])
  371. prism(wall + 2, wall_height - wall, wall_width - wall * 4);
  372. }
  373. }
  374. module wall() {
  375. difference() {
  376. cube([wall_width, wall_depth, wall]);
  377. translate([wall + wall_prism + wall_mount_off_x + mount_hole_off, mount_support_depth - mount_support_usable_depth / 2, -1])
  378. cylinder(d = mount_hole_dia, h = wall + 2);
  379. translate([wall + wall_prism + wall_mount_off_x + mount_width - mount_hole_off, mount_support_depth - mount_support_usable_depth / 2, -1])
  380. cylinder(d = mount_hole_dia, h = wall + 2);
  381. }
  382. translate([0, 0, wall])
  383. wall_tab();
  384. translate([0, 0, -wall_height])
  385. wall_tab();
  386. translate([wall, 0, -wall])
  387. rotate([90, 0, 90])
  388. prism(wall_depth, wall_prism, wall_prism);
  389. translate([wall + wall_prism, 0, wall])
  390. rotate([0, 0, 90])
  391. prism(wall_depth, wall_prism, wall_prism);
  392. translate([wall, wall_depth - wall, -wall_height])
  393. rotate([90, 0, 90])
  394. wall_support();
  395. translate([wall, wall_depth, wall_height + wall])
  396. rotate([-90, 0, -90])
  397. wall_support();
  398. }
  399. module assembly() {
  400. color("purple")
  401. wall();
  402. translate([wall + wall_prism + wall_mount_off_x, mount_height, wall])
  403. rotate([90, 0, 0]) {
  404. mount();
  405. color("yellow")
  406. translate([mount_dist / 2, keypad_base_depth + mount_support_prism + mount_height + mount_dist * 3 / 2, -lcd_pcb_height - lcd_spacer_height])
  407. lcd();
  408. color("red")
  409. translate([lcd_pcb_width - keypad_base_width + mount_dist / 2, mount_height + mount_support_prism + mount_dist / 2, -keypad_base_height - keypad_spacer_height])
  410. keypad();
  411. color("green")
  412. translate([mount_dist / 2 + voltmeter_tab_width + voltmeter_off_x, mount_height + mount_support_prism + keypad_base_depth + voltmeter_off_y - voltmeter_depth, -voltmeter_height - 0])
  413. assembly_voltmeters();
  414. color("blue")
  415. translate([mount_dist / 2 + switch_off_x, mount_height + mount_support_prism + switch_off_y, mount_height])
  416. switch();
  417. }
  418. }
  419. module print() {
  420. translate([0, mount_height, mount_width])
  421. rotate([0, 90, -90])
  422. mount();
  423. translate([20, wall_height + mount_support_depth, wall_depth])
  424. rotate([-90, 0, 0])
  425. wall();
  426. translate([0, -10, 0])
  427. rotate([90, 0, 0])
  428. switch_mount();
  429. }
  430. //lcd();
  431. //keypad();
  432. //voltmeter();
  433. //switch();
  434. //switch_mount();
  435. assembly();
  436. //print();