Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. $fn = 120;
  2. thickness = 8;
  3. height = 12;
  4. width = 2;
  5.  
  6. module zero() {
  7. difference() {
  8. translate([0, 0, -.5*thickness])
  9. cylinder(h=thickness, d=height);
  10. translate([0, 0, -.5*thickness-1])
  11. cylinder(h=thickness+2, d=height - 2*width);
  12. }
  13. }
  14.  
  15. module zerohole() {
  16. translate([0, 0, -.5*thickness - 3])
  17. cylinder(h=thickness+6, d=height - .5);
  18. }
  19.  
  20. module one() {
  21. translate([-.5*width, -.5*height, -.5*thickness])
  22. cube([width, height, thickness]);
  23. translate([-1.5*width, .5*height - width, -.5*thickness])
  24. cube([2*width, width, thickness]);
  25. }
  26.  
  27. module widget() {
  28. translate([-.5*height - 2, 0, 0]) zero();
  29. one();
  30. translate([.5*height + 2, 0, 0]) zero();
  31. difference() {
  32. intersection() {
  33. translate([-10, 0, -.5*width])
  34. cube([20, 13, width]);
  35. translate([0, 17, -20])
  36. rotate(225, [0, 0, 1])
  37. cube([50, 50, 50]);
  38. }
  39. translate([-.5*height - 2, 0, 0]) zerohole();
  40. translate([.5*height + 2, 0, 0]) zerohole();
  41. translate([0, 9, -10]) cylinder(d=4, h=20);
  42. }
  43. }
  44.  
  45. step = 30;
  46. for (x = [-100:step:101]) {
  47. for (y = [-100:step:101]) {
  48. translate([x, y, 0]) widget();
  49. }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement