My self-made 3D-printable designs, mainly in OpenSCAD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

valve-mount2.scad 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. width = 19;
  2. height = 25;
  3. hole_dia = 3.3;
  4. hole_off_x = 9.7;
  5. hole_off_y = 14.5;
  6. dist = 1;
  7. wall = 4;
  8. base_depth = 20;
  9. support_l = 5;
  10. add_height = 2;
  11. ground_height = support_l + 15 - add_height;
  12. valve_count = 4;
  13. $fn = 42;
  14. w = width;
  15. h = height + ground_height;
  16. l_all = valve_count * w + (valve_count - 1) * dist;
  17. module prism(l, w, h) {
  18. polyhedron(
  19. points = [[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
  20. faces = [[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
  21. );
  22. }
  23. module section(l) {
  24. translate([0, 0, wall])
  25. cube([l, wall, h]);
  26. cube([l, base_depth, wall]);
  27. translate([l, wall + support_l, wall])
  28. rotate([0, 0, 180])
  29. prism(l, support_l, support_l * 2);
  30. }
  31. module holes() {
  32. translate([-hole_off_x / 2, 0, -hole_off_y / 2])
  33. rotate([-90, 0, 0])
  34. cylinder(d = hole_dia, h = wall + 2);
  35. translate([hole_off_x / 2, 0, hole_off_y / 2])
  36. rotate([-90, 0, 0])
  37. cylinder(d = hole_dia, h = wall + 2);
  38. }
  39. module valve() {
  40. difference() {
  41. translate([0, 0, -wall])
  42. section(w);
  43. translate([w / 2, -1, ground_height + (add_height + height) / 2]) {
  44. //holes();
  45. scale([-1, 1, 1])
  46. holes();
  47. }
  48. }
  49. }
  50. module all_valves() {
  51. difference() {
  52. translate([0, 0, wall])
  53. for (i = [0 : valve_count - 1]) {
  54. if (i == 0) {
  55. translate([i * w, 0, 0])
  56. valve();
  57. } else {
  58. translate([i * w + (i - 1) * dist, 0, -wall])
  59. section(dist);
  60. translate([i * w + (i - 1) * dist + dist, 0, 0])
  61. valve();
  62. }
  63. }
  64. for (i = [0 : valve_count - 1]) {
  65. translate([i * w + (i - 1) * dist + dist + w / 2, wall + support_l + (base_depth - wall - support_l) / 2, -1])
  66. cylinder(d = hole_dia, h = wall + 2);
  67. }
  68. }
  69. }
  70. //rotate([0, -90, 0])
  71. all_valves();