1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 01:34:12 +02:00
This commit is contained in:
Justin Lin
2019-09-26 08:21:39 +08:00
parent 7333d474e1
commit 81cb948a53

View File

@@ -23,14 +23,13 @@ module voronoi2d(points, spacing = 1, r = 0, delta = 0, chamfer = false, region_
if(pt != p) {
v = p - pt;
translate((pt + p) / 2 - normalize(v) * offset_leng)
rotate(atan2(v[1], v[0]))
if(region_type == "square") {
square(region_size, center = true);
}
else if(region_type == "circle") {
circle(region_size / 2);
}
rotate(atan2(v[1], v[0]))
if(region_type == "square") {
square(region_size, center = true);
}
else if(region_type == "circle") {
circle(region_size / 2);
}
}
}
}