1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib-helix.md

40 lines
1.1 KiB
Markdown
Raw Normal View History

2017-04-07 14:28:55 +08:00
# helix
2017-03-23 15:03:35 +08:00
2017-03-30 14:22:48 +08:00
Gets 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.
2017-03-23 15:03:35 +08:00
## Parameters
- `radius` : The radius of the cylinder.
- `levels` : The level count is performed every 360 degrees.
- `level_dist` : The distance between two vertial points.
2017-03-30 12:17:51 +08:00
- `vt_dir` : `"SPI_DOWN"` for spiraling down. `"SPI_UP"` for spiraling up. The default value is `"SPI_DOWN"`.
- `rt_dir` : `"CT_CLK"` for counterclockwise. `"CLK"` for clockwise. The default value is `"CT_CLK"`.
2017-03-23 15:03:35 +08:00
- `$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>;
2017-04-07 14:28:55 +08:00
include <helix.scad>;
2017-03-23 15:03:35 +08:00
include <hull_polyline3d.scad>;
$fn = 12;
2017-04-07 14:28:55 +08:00
points = helix(
2017-03-23 15:03:35 +08:00
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);
2017-04-07 14:28:55 +08:00
![helix](images/lib-helix-1.JPG)
2017-03-23 15:03:35 +08:00