mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 23:06:43 +02:00
add doc
This commit is contained in:
@@ -355,8 +355,8 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp
|
||||
|
||||
Signature | Description
|
||||
--|--
|
||||
**triangle/tri_circumcenter**(shape_pts) | return the circumcenter of a triangle.
|
||||
**triangle/tri_incenter**(shape_pts) | return the incenter of a triangle.
|
||||
[**triangle/tri_circumcenter**(shape_pts)](https://openhome.cc/eGossip/OpenSCAD/lib3x-tri_circumcenter.html) | return the circumcenter of a triangle.
|
||||
[**triangle/tri_incenter**(shape_pts)](https://openhome.cc/eGossip/OpenSCAD/lib3x-tri_incenter.html) | return the incenter of a triangle.
|
||||
**triangle/tri_ear_clipping**(shape_pts, ret = "TRI_INDICES", ...) | triangulation by [ear clipping](https://en.wikipedia.org/wiki/Polygon_triangulation#Ear_clipping_method).
|
||||
**triangle/tri_delaunay**(points, ret = "TRI_INDICES") | return the [Delaunay triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation) of the points.
|
||||
**triangle/tri_delaunay_indices**(d) | return triangle indices from a delaunay object.
|
||||
|
15
docs/lib3x-tri_circumcenter.md
Normal file
15
docs/lib3x-tri_circumcenter.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# tri_circumcenter
|
||||
|
||||
The `tri_circumcenter` function returns the circumcenter of a 2D triangle.
|
||||
|
||||
**Since:** 3.1
|
||||
|
||||
## Parameters
|
||||
|
||||
- `shape_pts` : the vertices of a 2D triangle.
|
||||
|
||||
## Examples
|
||||
|
||||
use <triangle/tri_circumcenter.scad>;
|
||||
|
||||
assert(tri_circumcenter([[0, 0], [10, 20], [15, 10]]) == [3.75, 10.625]);
|
15
docs/lib3x-tri_incenter.md
Normal file
15
docs/lib3x-tri_incenter.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# tri_incenter
|
||||
|
||||
The `tri_incenter` function returns the incenter of a 2D triangle.
|
||||
|
||||
**Since:** 3.1
|
||||
|
||||
## Parameters
|
||||
|
||||
- `shape_pts` : the vertices of a 2D triangle.
|
||||
|
||||
## Examples
|
||||
|
||||
use <triangle/tri_incenter.scad>;
|
||||
|
||||
assert(tri_incenter([[0, 0], [15, 0], [0, 20]]) == [5, 5]);
|
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* tri_circumcenter.scad
|
||||
*
|
||||
* @copyright Justin Lin, 2021
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-tri_circumcenter.html
|
||||
*
|
||||
**/
|
||||
|
||||
function tri_circumcenter(shape_pts) =
|
||||
let(
|
||||
p0 = shape_pts[0],
|
||||
|
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* tri_incenter.scad
|
||||
*
|
||||
* @copyright Justin Lin, 2021
|
||||
* @license https://opensource.org/licenses/lgpl-3.0.html
|
||||
*
|
||||
* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-tri_incenter.html
|
||||
*
|
||||
**/
|
||||
|
||||
function tri_incenter(shape_pts) =
|
||||
let(
|
||||
pa = shape_pts[0],
|
||||
|
Reference in New Issue
Block a user