mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
add doc
This commit is contained in:
BIN
docs/images/lib3x-tri_subdivide-1.JPG
Normal file
BIN
docs/images/lib3x-tri_subdivide-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
31
docs/lib3x-tri_subdivide.md
Normal file
31
docs/lib3x-tri_subdivide.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# tri_subdivide
|
||||
|
||||
Subdivide a triangle `n` times.
|
||||
|
||||
**Since:** 3.3
|
||||
|
||||
## Parameters
|
||||
|
||||
- `shape_pts` : the vertices of a 2D or 3D triangle.
|
||||
- `n` : subdivide a triangle `n` times. Default to 1.
|
||||
|
||||
## Examples
|
||||
|
||||
use <shape_circle.scad>
|
||||
use <triangle/tri_subdivide.scad>
|
||||
|
||||
radius = 10;
|
||||
tri = shape_circle(radius, $fn = 3);
|
||||
|
||||
polygon(tri);
|
||||
|
||||
for(n = [1:3]) {
|
||||
subdivided = tri_subdivide(tri, n);
|
||||
translate([radius * 2 * n, 0])
|
||||
for(t = subdivided) {
|
||||
offset(-.1)
|
||||
polygon(t);
|
||||
}
|
||||
}
|
||||
|
||||

|
Reference in New Issue
Block a user