1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 01:04:07 +02:00

refactor: don't repeat it

This commit is contained in:
Justin Lin
2022-04-09 18:54:01 +08:00
parent 410c4153f4
commit 7af202f5e5

View File

@@ -14,10 +14,4 @@ function convex_intersection(shape1, shape2, epsilon = 0.0001) =
[for(i = [0:leng - 1]) each _intersection_ps(shape2, [pts[i], pts[i + 1]], epsilon)]
)
)
convex == [] ? [] : convex_ct_clk_order(
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, [pts[i], pts[i + 1]], epsilon)]
)
);
convex == [] ? [] : convex_ct_clk_order(convex);