1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-10-04 02:01:55 +02:00
This commit is contained in:
Justin Lin
2020-12-22 09:08:36 +08:00
parent fe9e90fede
commit 92d8c05fa9

View File

@@ -1,4 +1,5 @@
use <../../util/dedup.scad>;
use <../../lines_intersection.scad>;
use <_convex_ct_clk_order.scad>;
@@ -20,11 +21,11 @@ function _intersection_ps(shape, line_pts, epsilon) =
leng = len(shape),
pts = concat(shape, [shape[0]])
)
[
dedup([
for(i = [0:leng - 1])
let(p = lines_intersection(line_pts, [pts[i], pts[i + 1]], epsilon = epsilon))
if(p != []) p
];
]);
function _convex_intersection(shape1, shape2, epsilon = 0.0001) =
(shape1 == [] || shape2 == []) ? [] :