Advertisement
Guest User

openscad parametric wheel

a guest
Dec 19th, 2017
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. $fn=48;
  2.  
  3. base_d = 50;
  4. base_h = 10;
  5.  
  6. center_d = 10;
  7.  
  8. axes_count = 5;
  9. angle = 360/axes_count;
  10.  
  11. difference(){
  12. union(){
  13. difference(){
  14. union(){
  15. difference(){
  16. cylinder(d=base_d, h=base_h);
  17.  
  18. translate([0,0,-base_h])
  19. cylinder(d=base_d*0.8, h=base_h*3);
  20. };
  21.  
  22. for(a=[0:axes_count-1]){
  23. rotate([0,0,a*angle])
  24. linear_extrude(height=base_h)
  25. polygon([[0,0], [base_d/10, base_d/2*0.9], [-base_d/10, base_d/2*0.9]]);
  26. };
  27. };
  28.  
  29. translate([0,0,base_h*0.9])
  30. cylinder(d=base_d*0.9, h=base_h*3);
  31. };
  32.  
  33. cylinder(d=center_d, h=base_h);
  34. };
  35.  
  36. translate([0,0,-base_h])
  37. cylinder(d=center_d*0.5, h=base_h*3);
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement