1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01: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") {
for(row = marching_squares(points, 0.1)) {
for(line = row) {
p0 = [line[0][0], line[0][1]];
p1 = [line[1][0], line[1][1]];
hull_polyline2d([p0, p1], width = .1);
for(isoline = row) {
hull_polyline2d(isoline, width = .1);
}
}
}
else {
for(row = marching_squares(points, [-.2, .2])) {
for(iso_band = row) {
polygon([for(p = iso_band) [p[0], p[1]]]);
for(isoband = row) {
polygon([for(p = isoband) [p[0], p[1]]]);
}
}
}

View File

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