mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2024-11-23 07:13:51 -05:00
Added convexity parameter to sweep.
This commit is contained in:
parent
df43fe7dc6
commit
34b58e3b64
@ -5664,7 +5664,7 @@ An additional twist around the path can be specified. If the path is closed this
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```sweep(path, profile, loop = false, twist = 0)``` | Draw a polyhedron that is the swept volume |
|
||||
| ```sweep(path, profile, loop = false, twist = 0, convexity = 1)``` | Draw a polyhedron that is the swept volume |
|
||||
|
||||
![sweep](tests/png/sweep.png)
|
||||
|
||||
|
@ -152,10 +152,10 @@ function sweep(path, profile, loop = false, twist = 0) = //! Generate the point
|
||||
faces = loop ? skin_faces : concat([cap(facets)], skin_faces, [cap(facets, npoints - 1)])
|
||||
) [points, faces];
|
||||
|
||||
module sweep(path, profile, loop = false, twist = 0) { //! Draw a polyhedron that is the swept volume
|
||||
module sweep(path, profile, loop = false, twist = 0, convexity = 1) { //! Draw a polyhedron that is the swept volume
|
||||
mesh = sweep(path, profile, loop, twist);
|
||||
|
||||
polyhedron(points = mesh[0], faces = mesh[1]);
|
||||
polyhedron(points = mesh[0], faces = mesh[1], convexity = convexity);
|
||||
}
|
||||
|
||||
function path_length(path, i = 0, length = 0) = //! Calculated the length along a path
|
||||
|
Loading…
Reference in New Issue
Block a user