mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 16:26:47 +02:00
added cylinder_spiral
This commit is contained in:
@@ -26,3 +26,4 @@ I've been using OpenSCAD for years and created some funny things. Some of them i
|
|||||||
- Path
|
- Path
|
||||||
- [circle_path](https://openhome.cc/eGossip/OpenSCAD/lib-circle_path.html)
|
- [circle_path](https://openhome.cc/eGossip/OpenSCAD/lib-circle_path.html)
|
||||||
- [bezier](https://openhome.cc/eGossip/OpenSCAD/lib-bezier.html)
|
- [bezier](https://openhome.cc/eGossip/OpenSCAD/lib-bezier.html)
|
||||||
|
- [cylinder_spiral](https://openhome.cc/eGossip/OpenSCAD/lib-cylinder_spiral.html)
|
BIN
docs/images/lib-cylinder_spiral-1.JPG
Normal file
BIN
docs/images/lib-cylinder_spiral-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
39
docs/lib-cylinder_spiral.md
Normal file
39
docs/lib-cylinder_spiral.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# cylinder_spiral
|
||||||
|
|
||||||
|
Get all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module. It depends on the `circle_path` module so you have to include circle_path.scad.
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
- `radius` : The radius of the cylinder.
|
||||||
|
- `levels` : The level count is performed every 360 degrees.
|
||||||
|
- `level_dist` : The distance between two vertial points.
|
||||||
|
- `vt_dir` : `"CT_CLK"` for counterclockwise. `"CLK"` for clockwise. The default value is `"CT_CLK"`.
|
||||||
|
- `rt_dir` : `"SPI_DOWN"` for spiraling down. `"SPI_UP"` for spiraling up. The default value is `"SPI_DOWN"`.
|
||||||
|
- `$fa`, `$fs`, `$fn` : Check [the cylinder module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder) for more details.
|
||||||
|
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
include <circle_path.scad>;
|
||||||
|
include <cylinder_spiral.scad>;
|
||||||
|
include <hull_polyline3d.scad>;
|
||||||
|
|
||||||
|
$fn = 12;
|
||||||
|
|
||||||
|
points = cylinder_spiral(
|
||||||
|
radius = 40,
|
||||||
|
levels = 10,
|
||||||
|
level_dist = 10,
|
||||||
|
vt_dir = "SPI_UP",
|
||||||
|
rt_dir = "CLK"
|
||||||
|
);
|
||||||
|
|
||||||
|
for(p = points) {
|
||||||
|
translate(p) sphere(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
hull_polyline3d(points, 2);
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
Reference in New Issue
Block a user