mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-13 18:24:28 +02:00
add doc
This commit is contained in:
@@ -242,7 +242,7 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
|
|||||||
### Voxel
|
### Voxel
|
||||||
|
|
||||||
- [vx_bezier](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_bezier.html)
|
- [vx_bezier](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_bezier.html)
|
||||||
- vx_curve
|
- [vx_curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-vx_curve.html)
|
||||||
- vx_contour
|
- vx_contour
|
||||||
|
|
||||||
### Maze
|
### Maze
|
||||||
|
BIN
docs/images/lib2x-vx_curve-1.JPG
Normal file
BIN
docs/images/lib2x-vx_curve-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
35
docs/lib2x-vx_curve.md
Normal file
35
docs/lib2x-vx_curve.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# vx_curve
|
||||||
|
|
||||||
|
Draws a voxel-by-voxel curve from control points. The curve is drawn only from the 2nd control point to the second-last control point. It's a voxel version of [curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-curve.html).
|
||||||
|
|
||||||
|
## Parameters
|
||||||
|
|
||||||
|
- `points` : A list of `[x, y]` or `[x, y, z]` control points.
|
||||||
|
- `tightness` : You can view it as the curve tigntness if you provide a value between 0.0 and 1.0. The default value is 0.0. See [curve](https://openhome.cc/eGossip/OpenSCAD/lib2x-curve.html) for details.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
use <voxel/vx_curve.scad>;
|
||||||
|
use <hull_polyline3d.scad>;
|
||||||
|
|
||||||
|
pts = [
|
||||||
|
[28, 2, 1],
|
||||||
|
[15, 8, -10],
|
||||||
|
[2, 14, 5],
|
||||||
|
[28, 14, 2],
|
||||||
|
[15, 21, 9],
|
||||||
|
[2, 28, 0]
|
||||||
|
];
|
||||||
|
|
||||||
|
for(pt = vx_curve(pts)) {
|
||||||
|
translate(pt)
|
||||||
|
cube(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#for(pt = pts) {
|
||||||
|
translate(pt)
|
||||||
|
sphere(1);
|
||||||
|
}
|
||||||
|
#hull_polyline3d(pts, .1);
|
||||||
|
|
||||||
|

|
Reference in New Issue
Block a user