1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-09 00:06:42 +02:00

intersection_for if not supported in 2020.12

This commit is contained in:
Justin Lin
2020-12-10 11:58:26 +08:00
parent 7f2f53014f
commit 70836f8fee

View File

@@ -25,15 +25,13 @@ module vrn3_from(points, spacing = 1) {
function normalize(v) = v / norm(v); function normalize(v) = v / norm(v);
module space(pt) { module space(pt) {
intersection_for(p = points) { intersection_for(p = [for(p = points) if(pt != p) p]) {
if(pt != p) { v = p - pt;
v = p - pt; ryz = __angy_angz(p, pt);
ryz = __angy_angz(p, pt);
translate((pt + p) / 2 - normalize(v) * offset_leng) translate((pt + p) / 2 - normalize(v) * offset_leng)
rotate([0, -ryz[0], ryz[1]]) rotate([0, -ryz[0], ryz[1]])
cube([space_size, double_space_size, double_space_size], center = true); cube([space_size, double_space_size, double_space_size], center = true);
}
} }
} }