update to 3.0
@@ -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)
|
- [hull_polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-hull_polyline2d.html)
|
||||||
- [line2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-line2d.html)
|
- [line2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-line2d.html)
|
||||||
- [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib3x-multi_line_text.html)
|
- [multi_line_text](https://openhome.cc/eGossip/OpenSCAD/lib3x-multi_line_text.html)
|
||||||
- [pie](https://openhome.cc/eGossip/OpenSCAD/lib2x-pie.html)
|
- [pie](https://openhome.cc/eGossip/OpenSCAD/lib3x-pie.html)
|
||||||
- [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib2x-polyline2d.html)
|
- [polyline2d](https://openhome.cc/eGossip/OpenSCAD/lib3x-polyline2d.html)
|
||||||
- [polygon_hull](https://openhome.cc/eGossip/OpenSCAD/lib2x-polygon_hull.html)
|
- [polygon_hull](https://openhome.cc/eGossip/OpenSCAD/lib3x-polygon_hull.html)
|
||||||
- [rounded_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_square.html)
|
- [rounded_square](https://openhome.cc/eGossip/OpenSCAD/lib2x-rounded_square.html)
|
||||||
|
|
||||||
### 3D Module
|
### 3D Module
|
||||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@@ -1,6 +1,6 @@
|
|||||||
# pie
|
# 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
|
## 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]);
|
||||||
translate([15, 0, 0]) pie(radius = 20, angle = [45, 135], $fn = 12);
|
translate([15, 0, 0]) pie(radius = 20, angle = [45, 135], $fn = 12);
|
||||||
|
|
||||||

|

|
||||||
|
|
@@ -20,4 +20,4 @@ Create a convex polygon by hulling a list of points. It avoids using `hull` and
|
|||||||
[-1, -1]
|
[-1, -1]
|
||||||
]);
|
]);
|
||||||
|
|
||||||

|

|
@@ -5,7 +5,7 @@ Creates a polyline from a list of `x`, `y` coordinates. When the end points are
|
|||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
- `points` : The list of `[x, y]` points of the polyline. The points are indexed from 0 to n-1.
|
- `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"`.
|
- `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"`.
|
- `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.
|
- `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;
|
$fn = 24;
|
||||||
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
|
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1);
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
use <polyline2d.scad>;
|
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,
|
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
|
||||||
endingStyle = "CAP_ROUND");
|
endingStyle = "CAP_ROUND");
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
use <polyline2d.scad>;
|
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,
|
polyline2d(points = [[1, 2], [-5, -4], [-5, 3], [5, 5]], width = 1,
|
||||||
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND");
|
startingStyle = "CAP_ROUND", endingStyle = "CAP_ROUND");
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
About `joinStyle`:
|
About `joinStyle`:
|
||||||
|
|
||||||

|

|
@@ -4,7 +4,7 @@
|
|||||||
* @copyright Justin Lin, 2017
|
* @copyright Justin Lin, 2017
|
||||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
* @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
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
* @copyright Justin Lin, 2020
|
* @copyright Justin Lin, 2020
|
||||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
* @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
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@@ -4,14 +4,14 @@
|
|||||||
* @copyright Justin Lin, 2017
|
* @copyright Justin Lin, 2017
|
||||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
* @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 <line2d.scad>;
|
||||||
use <pie.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);
|
leng_pts = len(points);
|
||||||
|
|
||||||
s_styles = [startingStyle, "CAP_BUTT"];
|
s_styles = [startingStyle, "CAP_BUTT"];
|
||||||
|