1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-13 10:14:41 +02:00

add convex_intersection_for

This commit is contained in:
Justin Lin
2020-02-22 12:08:31 +08:00
parent f206de4a1a
commit f0d77c242f
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
use <experimental/convex_intersection.scad>;
function _convex_intersection_for(shapes, pre, leng, i = 2) =
i == leng ? pre :
_convex_intersection_for(shapes,
convex_intersection(pre, shapes[i]),
leng, i + 1
);

View File

@@ -0,0 +1,10 @@
use <experimental/convex_intersection.scad>;
use <experimental/_impl/_convex_intersection_for_impl.scad>;
function convex_intersection_for(shapes) =
let(leng = len(shapes))
_convex_intersection_for(
shapes,
convex_intersection(shapes[0], shapes[1]),
leng
);