vulcan_

rotate_extrude changes with $fn even odd

Sep 17th, 2025
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.54 KB | Source Code | 0 0
  1.  
  2. rotang=360;     // [-400:10:400]
  3. rotsta=  0;     // [-400:20:400]
  4. rotfn =  0;     // [0:50]
  5. rotgiv=true;
  6.  
  7. /* [Hidden] */
  8. $fa=.5;
  9. $fs=1;
  10.  
  11. module base_shape() {
  12.     translate([4,4,0]){
  13.             square(4);
  14.         translate([4,4,0]*1.5)
  15.             circle(4);
  16.         }
  17.     children();
  18.     }
  19. color("red")
  20.     base_shape();
  21. color("yellow")
  22.     rotate([90,0,0]) base_shape();
  23.  
  24. if( rotgiv )
  25.     %rotate_extrude( a=rotang, start=rotsta, $fn=rotfn )
  26.         base_shape();
  27. else
  28.     %rotate_extrude( $fn=rotfn )
  29.         base_shape();
  30.  
Advertisement
Add Comment
Please, Sign In to add comment