mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 16:26:47 +02:00
delete trianglate
This commit is contained in:
@@ -79,7 +79,6 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
|
|||||||
- [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-in_shape.html)
|
- [in_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-in_shape.html)
|
||||||
- [lines_intersection](https://openhome.cc/eGossip/OpenSCAD/lib2x-lines_intersection.html)
|
- [lines_intersection](https://openhome.cc/eGossip/OpenSCAD/lib2x-lines_intersection.html)
|
||||||
- [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-trim_shape.html)
|
- [trim_shape](https://openhome.cc/eGossip/OpenSCAD/lib2x-trim_shape.html)
|
||||||
- [triangulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-triangulate.html)
|
|
||||||
|
|
||||||
### 2D/3D Function
|
### 2D/3D Function
|
||||||
- [bezier_surface](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_surface.html)
|
- [bezier_surface](https://openhome.cc/eGossip/OpenSCAD/lib2x-bezier_surface.html)
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 40 KiB |
@@ -1,41 +0,0 @@
|
|||||||
# triangulate
|
|
||||||
|
|
||||||
Given a 2D shape. This function performs a simple polygon triangulation algorithm and returns the indices of each triangle.
|
|
||||||
|
|
||||||
**Since:** 1.3.
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
- `shape_pts` : The shape points.
|
|
||||||
- `epsilon` : An upper bound on the relative error due to rounding in floating point arithmetic. Default to 0.0001.
|
|
||||||
|
|
||||||
## Examples
|
|
||||||
|
|
||||||
use <triangulate.scad>;
|
|
||||||
|
|
||||||
shape = [
|
|
||||||
[0, 0],
|
|
||||||
[10, 0],
|
|
||||||
[12, 5],
|
|
||||||
[5, 10],
|
|
||||||
[10, 15],
|
|
||||||
[0, 20],
|
|
||||||
[-5, 18],
|
|
||||||
[-18, 3],
|
|
||||||
[-4, 10]
|
|
||||||
];
|
|
||||||
|
|
||||||
tris = triangulate(shape);
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
polygon(shape);
|
|
||||||
|
|
||||||
for(tri = tris) {
|
|
||||||
offset(-.2)
|
|
||||||
polygon([for(idx = tri) shape[idx]]);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||

|
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
to_do:
|
to_do:
|
||||||
|
|
||||||
- deprecate `trianglate`, use `tri_ear_clipping`.
|
|
||||||
|
|
||||||
dotSCAD 3.0 Dev
|
dotSCAD 3.0 Dev
|
||||||
|
|
||||||
@@ -19,3 +19,4 @@ New modules/functions
|
|||||||
- `util/every`
|
- `util/every`
|
||||||
- `util/some`
|
- `util/some`
|
||||||
|
|
||||||
|
- delete `trianglate`, use `tri_ear_clipping`?
|
||||||
|
Reference in New Issue
Block a user