Learning
Model downloaden
spiral_extrude()
48
Downloads
38
Likes
3
Makes
This is a library function that fits between linear_extrude() and rotate_extrude(). It takes a 2D object and extrudes it in a spiral. Unlike linear_extrude, the 2D object is perpendicular to the path of the extrusion.
This would have been much easier if OpenSCAD would allow me to access the points that make up the 2D objects the function is operating on.
Comment out the example before using this as a library. I left it uncommented so that Thingiverse would show a picture of the example.
Update: I found a bug where when the radius was less than 20, it would fail to generate anything. I found that the calculation inside the asin() function was resulting in 1+1e-14 which is not allowed for the asin() function, so it was returning nan. I have limited the result to a range of -1 to 1 to fix the problem.
Update 2: Adjusted the size of the spiral segments so the segments slightly overlap (eliminates gaps in spiral). Added render() to segment because OpenSCAD was complaining of too
This would have been much easier if OpenSCAD would allow me to access the points that make up the 2D objects the function is operating on.
Comment out the example before using this as a library. I left it uncommented so that Thingiverse would show a picture of the example.
Update: I found a bug where when the radius was less than 20, it would fail to generate anything. I found that the calculation inside the asin() function was resulting in 1+1e-14 which is not allowed for the asin() function, so it was returning nan. I have limited the result to a range of -1 to 1 to fix the problem.
Update 2: Adjusted the size of the spiral segments so the segments slightly overlap (eliminates gaps in spiral). Added render() to segment because OpenSCAD was complaining of too
Heb je dit model geprint? Inloggen en deel je make!
Log in om een reactie achter te laten
InloggenNog geen reacties – wees de eerste!