Advertisement
Guest User

Untitled

a guest
Mar 1st, 2023
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. module object()
  2. {
  3. import("/Users/petarivcec/Desktop/art/king of sun/1.stl");
  4. }
  5.  
  6.  
  7. z_min = 0;
  8. z_max = 100;
  9. x_max = 50;
  10. y_max = 55;
  11. slice = 1;
  12.  
  13. n = floor(sqrt((z_max - z_min)/slice)+1);
  14. for(z = [-z_max:slice:z_min]) {
  15. i = (z + z_max) / slice;
  16. x = x_max * (i % n);
  17. y = Y_max * floor(i / n);
  18. translate([x,y,0]) {
  19. projection(cut=true)
  20. translate([0,0,z]) object();
  21. };
  22. };
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement