1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-07 15:26:39 +02:00
This commit is contained in:
Justin Lin
2022-08-16 10:36:34 +08:00
parent 40dfebe040
commit 174eb609d5
5 changed files with 50 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View 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);
}
}
![tri_subdivide](images/lib3x-tri_subdivide-1.JPG)