diff --git a/README.md b/README.md index 53328a47..c21fbc95 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ Too many dependencies? Because OpenSCAD doesn't provide namespace management, I - [ring_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-ring_extrude.html) - [helix_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-helix_extrude.html) - [golden_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-golden_spiral_extrude.html) + - [archimedean_spiral_extrude](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral_extrude.html) - Other - [turtle2d](https://openhome.cc/eGossip/OpenSCAD/lib-turtle2d.html) diff --git a/docs/images/lib-archimedean_spiral_extrude-1.JPG b/docs/images/lib-archimedean_spiral_extrude-1.JPG new file mode 100644 index 00000000..2bf45431 Binary files /dev/null and b/docs/images/lib-archimedean_spiral_extrude-1.JPG differ diff --git a/docs/lib-archimedean_spiral_extrude.md b/docs/lib-archimedean_spiral_extrude.md new file mode 100644 index 00000000..1a9f3a89 --- /dev/null +++ b/docs/lib-archimedean_spiral_extrude.md @@ -0,0 +1,51 @@ +# archimedean_spiral_extrude + +Extrudes a 2D shape along the path of an archimedean spiral. + +When using this module, you should use points to represent the 2D shape. You need to provide indexes of triangles, too. This module provides two prepared triangles indexes. One is `"RADIAL"`. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. + +Dependencies: `rotate_p`, `archimedean_spiral`, `cross_sections`, `polysections`. + +## Parameters + +- `shape_pts` : A list of points represent a shape. See the example below. +- `arm_distance`, `init_angle`, `point_distance`, `num_of_points` and `rt_dir` : See [archimedean_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-archimedean_spiral.html) for details. +- `twist` : The number of degrees of through which the shape is extruded. +- `scale` : Scales the 2D shape by this value over the length of the extrusion. Scale can be a scalar or a vector. +- `triangles` : `"RADIAL"` (default), `"HOLLOW"` or user-defined indexes. See [polysections](https://openhome.cc/eGossip/OpenSCAD/lib-polysections.html) for details. + +## Examples + + include ; + include ; + include ; + include ; + include ; + + + shape_pts = [ + [-5, 0], [-5, 4], + [-4, 4], [-4, 2], + [4, 2], [4, 4], + [5, 4], [5, 0] + ]; + + archimedean_spiral_extrude( + shape_pts, + arm_distance = 15, + init_angle = 180, + point_distance = 5, + num_of_points = 100, + scale = [1, 5], + triangles = [ + [0, 1, 2], + [0, 2, 3], + [0, 3, 4], + [0, 4, 7], + [4, 5, 6], + [4, 6, 7] + ] + ); + +![archimedean_spiral_extrude](images/lib-archimedean_spiral_extrude-1.JPG) +