mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-06 07:27:23 +02:00
Added convexity parameter to sweep.
This commit is contained in:
@@ -5664,7 +5664,7 @@ An additional twist around the path can be specified. If the path is closed this
|
|||||||
### Modules
|
### Modules
|
||||||
| Module | Description |
|
| 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 |
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@@ -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)])
|
faces = loop ? skin_faces : concat([cap(facets)], skin_faces, [cap(facets, npoints - 1)])
|
||||||
) [points, faces];
|
) [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);
|
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
|
function path_length(path, i = 0, length = 0) = //! Calculated the length along a path
|
||||||
|
Reference in New Issue
Block a user