1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-18 04:21:16 +02:00

intersection_for not supported in 2020.12

This commit is contained in:
Justin Lin
2020-12-10 11:56:43 +08:00
parent f93b255c60
commit 7f2f53014f

View File

@@ -19,15 +19,13 @@ module vrn2_from(points, spacing = 1, r = 0, delta = 0, chamfer = false, region_
function normalize(v) = v / norm(v); function normalize(v) = v / norm(v);
module region(pt) { module region(pt) {
intersection_for(p = points) { intersection_for(p = [for(p = points) if(pt != p) p]) {
if(pt != p) {
v = p - pt; v = p - pt;
translate((pt + p) / 2 - normalize(v) * offset_leng) translate((pt + p) / 2 - normalize(v) * offset_leng)
rotate(atan2(v[1], v[0])) rotate(atan2(v[1], v[0]))
children(); children();
} }
} }
}
module offseted_region(pt) { module offseted_region(pt) {
if(r != 0) { if(r != 0) {