1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 17:54:18 +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,13 +19,11 @@ 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();
}
} }
} }