1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-07 07:16:36 +02:00
This commit is contained in:
Justin Lin
2022-04-14 10:36:13 +08:00
parent d6b2e40d8d
commit 2b58eb7528
4 changed files with 0 additions and 49 deletions

View File

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

View File

@@ -1,12 +0,0 @@
use <lines_intersection.scad>;
function _intersection_ps(shape, line_pts, epsilon) =
let(
leng = len(shape),
pts = [each shape, shape[0]]
)
[
for(i = [0:leng - 1])
let(p = lines_intersection(line_pts, [pts[i], pts[i + 1]], epsilon = epsilon))
if(p != []) p
];

View File

@@ -1,17 +0,0 @@
use <in_shape.scad>;
use <experimental/_impl/_convex_intersection_impl.scad>;
use <experimental/convex_ct_clk_order.scad>;
function convex_intersection(shape1, shape2, epsilon = 0.0001) =
(shape1 == [] || shape2 == []) ? [] :
let(
leng = len(shape1),
convex = concat(
[for(p = shape1) if(in_shape(shape2, p, include_edge = true)) p],
[for(p = shape2) if(in_shape(shape1, p, include_edge = true)) p],
[for(i = [0:leng - 1]) each _intersection_ps(shape2, [shape1[i], shape1[i + 1]], epsilon)],
_intersection_ps(shape2, [shape1[len(shape1) - 1], shape1[0]], epsilon)
)
)
convex == [] ? [] : convex_ct_clk_order(convex);

View File

@@ -1,10 +0,0 @@
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
);