mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 14:18:13 +01:00
update to 3.0
This commit is contained in:
parent
a7cc2f7295
commit
d3385b1c2c
@ -57,7 +57,7 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
|
||||
### 3D Module
|
||||
- [crystal_ball](https://openhome.cc/eGossip/OpenSCAD/lib3x-crystal_ball.html)
|
||||
- [function_grapher](https://openhome.cc/eGossip/OpenSCAD/lib3x-function_grapher.html)
|
||||
- [hull_polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-hull_polyline3d.html)
|
||||
- [hull_polyline3d](https://openhome.cc/eGossip/OpenSCAD/lib3x-hull_polyline3d.html)
|
||||
- [line3d](https://openhome.cc/eGossip/OpenSCAD/lib2x-line3d.html)
|
||||
- [loft](https://openhome.cc/eGossip/OpenSCAD/lib2x-loft.html)
|
||||
- [polyhedron_hull](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyhedron_hull.html)
|
||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
@ -5,7 +5,7 @@ Creates a 3D polyline from a list of `[x, y, z]` coordinates. As the name says,
|
||||
## Parameters
|
||||
|
||||
- `points` : The list of `[x, y, z]` points of the polyline. The points are indexed from 0 to n-1.
|
||||
- `thickness` : The line thickness.
|
||||
- `diameter` : The line diameter. Default to 1.
|
||||
- `$fa`, `$fs`, `$fn` : Check [the sphere module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere) for more details.
|
||||
|
||||
## Examples
|
||||
@ -19,11 +19,11 @@ Creates a 3D polyline from a list of `[x, y, z]` coordinates. As the name says,
|
||||
[-1, -3, -5],
|
||||
[0, 0, 0]
|
||||
],
|
||||
thickness = 1,
|
||||
diameter = 1,
|
||||
$fn = 3
|
||||
);
|
||||
|
||||
![polyline3d](images/lib2x-hull_polyline3d-1.JPG)
|
||||
![polyline3d](images/lib3x-hull_polyline3d-1.JPG)
|
||||
|
||||
use <hull_polyline3d.scad>;
|
||||
|
||||
@ -42,4 +42,4 @@ Creates a 3D polyline from a list of `[x, y, z]` coordinates. As the name says,
|
||||
hull_polyline3d(points, 2, $fn = 3);
|
||||
}
|
||||
|
||||
![polyline3d](images/lib2x-hull_polyline3d-2.JPG)
|
||||
![polyline3d](images/lib3x-hull_polyline3d-2.JPG)
|
@ -4,12 +4,12 @@
|
||||
* @copyright Justin Lin, 2017
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-hull_polyline3d.html
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-hull_polyline3d.html
|
||||
*
|
||||
**/
|
||||
|
||||
module hull_polyline3d(points, thickness) {
|
||||
half_thickness = thickness / 2;
|
||||
module hull_polyline3d(points, diameter = 1) {
|
||||
radius = diameter / 2;
|
||||
leng = len(points);
|
||||
|
||||
module hull_line3d(index) {
|
||||
@ -18,13 +18,13 @@ module hull_polyline3d(points, thickness) {
|
||||
|
||||
hull() {
|
||||
translate(point1)
|
||||
sphere(half_thickness);
|
||||
sphere(radius);
|
||||
translate(point2)
|
||||
sphere(half_thickness);
|
||||
sphere(radius);
|
||||
}
|
||||
|
||||
// hook for testing
|
||||
test_hull_polyline3d_line_segment(index, point1, point2, half_thickness);
|
||||
test_hull_polyline3d_line_segment(index, point1, point2, radius);
|
||||
}
|
||||
|
||||
module polyline3d_inner(index) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user