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
2020-03-22 17:31:30 +08:00
parent 8610c18bf0
commit 7ec1deb33a
2 changed files with 6 additions and 8 deletions

View File

@@ -14,17 +14,15 @@ points = [
if(style == "ISOLINES") { if(style == "ISOLINES") {
for(row = marching_squares(points, 0.1)) { for(row = marching_squares(points, 0.1)) {
for(line = row) { for(isoline = row) {
p0 = [line[0][0], line[0][1]]; hull_polyline2d(isoline, width = .1);
p1 = [line[1][0], line[1][1]];
hull_polyline2d([p0, p1], width = .1);
} }
} }
} }
else { else {
for(row = marching_squares(points, [-.2, .2])) { for(row = marching_squares(points, [-.2, .2])) {
for(iso_band = row) { for(isoband = row) {
polygon([for(p = iso_band) [p[0], p[1]]]); polygon([for(p = isoband) [p[0], p[1]]]);
} }
} }
} }

View File

@@ -112,8 +112,8 @@ points = [
for(z = [0:40:255]) { for(z = [0:40:255]) {
for(row = marching_squares(points, z)) { for(row = marching_squares(points, z)) {
for(line = row) { for(isoline = row) {
hull_polyline2d(line, width = .25); hull_polyline2d(isoline, width = .25);
} }
} }
} }