merte_edenflower

Openscad polyhedron

Jul 11th, 2022
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. width = 200;
  2. height= 200;
  3. depth = 4;
  4. butt = 100;
  5. taper = 30;
  6. difference(){
  7. polyhedron(
  8. points = [
  9. [0,0,0], //0
  10. [width + 2, 0,0], //1
  11. [width + 2, 10, 0], //2
  12. [(width/2)+1+10, butt + 10, 2 + taper], //3
  13. [(width/2)-1-10, butt + 10, 2 + taper], //4
  14. [0,10,0], //5
  15. [0,0,height + 4], //6
  16. [width + 2, 0, height + 4], //7
  17. [width + 2, 10, height + 4], //8
  18. [(width/2)+1+10, butt + 10, height + 5 - taper],//9
  19. [(width/2)-1-10, butt + 10, height + 5 - taper],//10
  20. [0,10,height + 4]], //11
  21. faces = [
  22. [0,1,2,5], //bottom front
  23. [2, 3, 4, 5], //bottom back
  24. [6, 7, 8, 11], //top front
  25. [8, 9, 10, 11], //top back
  26. [6, 7, 1, 0], //front
  27. [7, 8, 2, 1], //right front
  28. [8, 9, 3, 2], //right back
  29. [9,10, 4, 3], //back
  30. [10, 11, 5, 4], //left back
  31. [11,6,0,5]] //left front
  32. );
  33. color("blue", 1.0){
  34. polyhedron(
  35. points = [
  36. [2,-1,2], //0
  37. [width + 0.2, -1, 2], //1
  38. [width + 0.2,10, 2], //2
  39. [(width/2)+10.1, butt + 8, 5 + taper], //3
  40. [(width/2)-10.1, butt + 8, 5 + taper], //4
  41. [2,10,2], //5
  42. [2,-1,height + 2.2], //6
  43. [width + 0.2, -1, height + 2.2], //7
  44. [width + 0.2, 10, height + 2.2], //8
  45. [(width/2)+10.1, butt + 8, height + 2 - taper],//9
  46. [(width/2)-10.1, butt + 8, height + 2 - taper],//10
  47. [2,10,height + 2]], //11
  48. faces = [
  49. [0,1,2,5], //bottom front
  50. [2, 3, 4, 5], //bottom back
  51. [6, 7, 8, 11], //top front
  52. [8, 9, 10, 11], //top back
  53. [6, 7, 1, 0], //front
  54. [7, 8, 2, 1], //right front
  55. [8, 9, 3, 2], //right back
  56. [9,10, 4, 3], //back
  57. [10, 11, 5, 4], //left back
  58. [11,6,0,5]] //left front
  59. );
  60. };
  61. };
Advertisement
Add Comment
Please, Sign In to add comment