mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
supported tape triangles
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
function __triangles_tape(leng_pts) =
|
||||
function __triangles_tape(shape_pts) =
|
||||
let(leng = len(shape_pts))
|
||||
concat(
|
||||
[
|
||||
for(i = [0:leng_pts / 2 - 2])
|
||||
[i, leng_pts - i - 1, leng_pts - i - 2]
|
||||
for(i = [0:leng / 2 - 2])
|
||||
[i, leng - i - 1, leng - i - 2]
|
||||
],
|
||||
[
|
||||
for(i = [0:leng_pts / 2 - 2])
|
||||
[i, i + 1, leng_pts - i - 2]
|
||||
for(i = [0:leng / 2 - 2])
|
||||
[i, i + 1, leng - i - 2]
|
||||
]
|
||||
);
|
@@ -12,6 +12,7 @@
|
||||
**/
|
||||
|
||||
include <__private__/__triangles_radial.scad>;
|
||||
include <__private__/__triangles_tape.scad>;
|
||||
|
||||
module polysections(sections, triangles = "RADIAL") {
|
||||
module tri_sections(tri1, tri2) {
|
||||
@@ -46,8 +47,12 @@ module polysections(sections, triangles = "RADIAL") {
|
||||
) flat(pair_idxes);
|
||||
|
||||
function tris() = triangles == "RADIAL" ? __triangles_radial(sections[0]) :
|
||||
(triangles == "HOLLOW" ? hollow_tris() : triangles);
|
||||
|
||||
(
|
||||
triangles == "HOLLOW" ? hollow_tris() : (
|
||||
triangles == "TAPE" ? __triangles_tape(sections[0]) : triangles
|
||||
)
|
||||
);
|
||||
|
||||
module two_sections(section1, section2) {
|
||||
for(idx = tris()) {
|
||||
// hull is for preventing from WARNING: Object may not be a valid 2-manifold
|
||||
|
Reference in New Issue
Block a user