mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
updated docs
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
# helix
|
||||
|
||||
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.
|
||||
Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `radius` : The radius of the cylinder.
|
||||
- `radius` : The radius of the cylinder. It also accepts a vector `[r1, r2]`. `r1` is the bottom radius and `r2` the top radius of a cone.
|
||||
- `levels` : The level count is performed every 360 degrees.
|
||||
- `level_dist` : The distance between two vertial points.
|
||||
- `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"`.
|
||||
- `$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 <helix.scad>;
|
||||
include <hull_polyline3d.scad>;
|
||||
|
||||
@@ -34,6 +32,23 @@ Gets all points on the path of a spiral around a cylinder. Its `$fa`, `$fs` and
|
||||
|
||||
hull_polyline3d(points, 2);
|
||||
|
||||
|
||||

|
||||
|
||||
include <helix.scad>;
|
||||
include <hull_polyline3d.scad>;
|
||||
|
||||
$fn = 12;
|
||||
|
||||
points = helix(
|
||||
radius = [40, 20],
|
||||
levels = 10,
|
||||
level_dist = 10,
|
||||
vt_dir = "SPI_UP",
|
||||
rt_dir = "CLK"
|
||||
);
|
||||
|
||||
hull_polyline3d(points, 2);
|
||||
|
||||
%cylinder(h = 100, r1 = 40, r2 = 20);
|
||||
|
||||

|
||||
|
@@ -6,12 +6,12 @@ When using this module, you should use points to represent the 2D shape. You nee
|
||||
|
||||
Its `$fa`, `$fs` and `$fn` parameters are consistent with the `cylinder` module.
|
||||
|
||||
Dependencies: `circle_path`, `helix`, `rotate_p.scad`, `cross_sections`, `polysections`.
|
||||
Dependencies: `helix`, `rotate_p.scad`, `cross_sections`, `polysections`.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `shape_pts` : A list of points represent a shape. See the example below.
|
||||
- `radius` : The radius of the cylinder.
|
||||
- `radius` : The radius of the cylinder. The radius of the cylinder. It also accepts a vector `[r1, r2]`. `r1` is the bottom radius and `r2` the top radius of a cone.
|
||||
- `levels` : The level count is performed every 360 degrees.
|
||||
- `level_dist` : The distance between two vertial points.
|
||||
- `vt_dir` : `"SPI_DOWN"` for spiraling down. `"SPI_UP"` for spiraling up. The default value is `"SPI_DOWN"`.
|
||||
@@ -23,7 +23,6 @@ Dependencies: `circle_path`, `helix`, `rotate_p.scad`, `cross_sections`, `polyse
|
||||
|
||||
## Examples
|
||||
|
||||
include <circle_path.scad>;
|
||||
include <helix.scad>;
|
||||
include <rotate_p.scad>;
|
||||
include <cross_sections.scad>;
|
||||
@@ -54,3 +53,40 @@ Dependencies: `circle_path`, `helix`, `rotate_p.scad`, `cross_sections`, `polyse
|
||||
|
||||

|
||||
|
||||
include <helix.scad>;
|
||||
include <rotate_p.scad>;
|
||||
include <cross_sections.scad>;
|
||||
include <polysections.scad>;
|
||||
include <helix_extrude.scad>;
|
||||
|
||||
r1 = 40;
|
||||
r2 = 20;
|
||||
levels = 5;
|
||||
level_dist = 10;
|
||||
|
||||
shape_pts = [
|
||||
[0, -2], [0, 2],
|
||||
[1, 2], [1, 0],
|
||||
[9, 0], [9, 2],
|
||||
[10, 2], [10, -2]
|
||||
];
|
||||
|
||||
helix_extrude(shape_pts,
|
||||
radius = [r1, r2],
|
||||
levels = levels,
|
||||
level_dist = level_dist,
|
||||
vt_dir = "SPI_UP",
|
||||
triangles = [
|
||||
[0, 1, 2],
|
||||
[0, 2, 3],
|
||||
[0, 3, 4],
|
||||
[0, 4, 7],
|
||||
[4, 5, 6],
|
||||
[4, 6, 7]
|
||||
]
|
||||
);
|
||||
|
||||
%cylinder(h = levels * level_dist, r1 = r1, r2 = r2);
|
||||
|
||||

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