1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 01:34:12 +02:00

update to 3.0

This commit is contained in:
Justin Lin
2021-02-17 11:38:31 +08:00
parent a735ab0365
commit e74eeb4265
13 changed files with 15 additions and 15 deletions

View File

@@ -49,9 +49,9 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
- [hull_polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-hull_polyline2d.html)
- [line2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-line2d.html)
- [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib3x-multi_line_text.html)
- [pie](https://openhome.cc/eGossip/OpenSCAD/lib2x-pie.html)
- [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline2d.html)
- [polygon_hull](https://openhome.cc/eGossip/OpenSCAD/lib2x-polygon_hull.html)
- [pie](https://openhome.cc/eGossip/OpenSCAD/lib3x-pie.html)
- [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyline2d.html)
- [polygon_hull](https://openhome.cc/eGossip/OpenSCAD/lib3x-polygon_hull.html)
- [rounded_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_square.html)
### 3D Module

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,6 +1,6 @@
# pie
Creates a pie (circular sector). You can pass a 2 element vector to define the central angle. Its `$fa`, `$fs` and `$fn` parameters are consistent with the `circle` module.
Creates a pie (circular sector). Its `$fa`, `$fs` and `$fn` are consistent with the `circle` module.
## Parameters
@@ -16,5 +16,5 @@ Creates a pie (circular sector). You can pass a 2 element vector to define the c
translate([-15, 0, 0]) pie(radius = 20, angle = [45, 135]);
translate([15, 0, 0]) pie(radius = 20, angle = [45, 135], $fn = 12);
![pie](images/lib2x-pie-1.JPG)
![pie](images/lib3x-pie-1.JPG)

View File

@@ -20,4 +20,4 @@ Create a convex polygon by hulling a list of points. It avoids using `hull` and
[-1, -1]
]);
![polygon_hull](images/lib2x-polygon_hull-1.JPG)
![polygon_hull](images/lib3x-polygon_hull-1.JPG)

View File

@@ -5,7 +5,7 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are
## Parameters
- `points` : The list of `[x, y]` points of the polyline. The points are indexed from 0 to n-1.
- `width` : The line width.
- `width` : The line width. Default to 1.
- `startingStyle` : The end-cap style of the starting point. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- `endingStyle` : The end-cap style of the ending point. The value must be `"CAP_BUTT"`, `"CAP_SQUARE"` or `"CAP_ROUND"`. The default value is `"CAP_SQUARE"`.
- `joinStyle`: Applies to the vertex where two lines join. The value must be `"JOIN_ROUND"`, `"JOIN_MITER"` or `"JOIN_BEVEL"`. The default value is `"JOIN_ROUND"`. Since 2.4.
@@ -18,7 +18,7 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are
$fn = 24;
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
![polyline2d](images/lib2x-polyline2d-1.JPG)
![polyline2d](images/lib3x-polyline2d-1.JPG)
use <polyline2d.scad>;
@@ -26,7 +26,7 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
endingStyle = "CAP_ROUND");
![polyline2d](images/lib2x-polyline2d-2.JPG)
![polyline2d](images/lib3x-polyline2d-2.JPG)
use <polyline2d.scad>;
@@ -34,8 +34,8 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND");
![polyline2d](images/lib2x-polyline2d-3.JPG)
![polyline2d](images/lib3x-polyline2d-3.JPG)
About `joinStyle`:
![polyline2d](images/lib2x-polyline2d-4.JPG)
![polyline2d](images/lib3x-polyline2d-4.JPG)

View File

@@ -4,7 +4,7 @@
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-pie.html
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-pie.html
*
**/

View File

@@ -4,7 +4,7 @@
* @copyright Justin Lin, 2020
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-polygon_hull.html
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-polygon_hull.html
*
**/

View File

@@ -4,14 +4,14 @@
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline2d.html
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-polyline2d.html
*
**/
use <line2d.scad>;
use <pie.scad>;
module polyline2d(points, width, startingStyle = "CAP_SQUARE", endingStyle = "CAP_SQUARE", joinStyle = "JOIN_ROUND") {
module polyline2d(points, width = 1, startingStyle = "CAP_SQUARE", endingStyle = "CAP_SQUARE", joinStyle = "JOIN_ROUND") {
leng_pts = len(points);
s_styles = [startingStyle, "CAP_BUTT"];