Guest User

Untitled

a guest
Jan 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. const thickness = 3;
  2. const side_height = 20;
  3. const len = 210;
  4. const wid = 155;
  5. const pole_radius = 22;
  6. const pole_height = 75;
  7. const screw_hole_radius = 2.5;
  8. const screw_hole_separation = 189;
  9.  
  10. function screwHole() {
  11. return rotate([0,90,0],
  12. cylinder({r: screw_hole_radius, h: thickness, center: [true, true, true] })
  13. );
  14. }
  15. function side() {
  16. return difference(
  17. cube({
  18. size: [thickness, len, side_height],
  19. center: [true, true, false]
  20. }),
  21. screwHole().translate([0,screw_hole_separation/2,side_height/2]),
  22. screwHole().translate([0,screw_hole_separation/-2,side_height/2])
  23. );
  24. }
  25.  
  26. function main () {
  27. return difference(
  28. union(
  29. cube({size: [wid, len, thickness], center: [true, true, false]}),
  30. cylinder({r: pole_radius+6, h: pole_height, center: [true, true, false] }),
  31. side().translate([wid/2,0,0]),
  32. side().translate([wid/-2,0,0])
  33. ),
  34. cylinder({r: pole_radius, h: pole_height, center: [true, true, false] }),
  35. rotate([0,90,0],cylinder({r: 1.5, h: pole_radius*2+12, center: [true,true,true] } ))
  36. .translate([0,0,pole_height/2]),
  37. cube({size: [100,50, 15], center: [true, true, false]})
  38. .translate([0,-65,0]),
  39. cube({size: [100,50, 15], center: [true, true, false]})
  40. .translate([0,65,0])
  41. );
  42. }
Add Comment
Please, Sign In to add comment