mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-05 22:37:35 +02:00
refactor
This commit is contained in:
@@ -245,36 +245,45 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") {
|
|||||||
if(style == "FACES") {
|
if(style == "FACES") {
|
||||||
faces();
|
faces();
|
||||||
} else {
|
} else {
|
||||||
if(slicing == "SLASH") {
|
twintri_lt = slicing == "SLASH" ?
|
||||||
for(yi = yi_range) {
|
[
|
||||||
for(xi = xi_range) {
|
for(yi = yi_range)
|
||||||
tri_to_graph([
|
for(xi = xi_range)
|
||||||
points[yi][xi],
|
[
|
||||||
points[yi][xi + 1],
|
[
|
||||||
points[yi + 1][xi + 1]
|
points[yi][xi],
|
||||||
], [
|
points[yi][xi + 1],
|
||||||
points[yi][xi],
|
points[yi + 1][xi + 1]
|
||||||
points[yi + 1][xi + 1],
|
],
|
||||||
points[yi + 1][xi]
|
[
|
||||||
]);
|
points[yi][xi],
|
||||||
}
|
points[yi + 1][xi + 1],
|
||||||
}
|
points[yi + 1][xi]
|
||||||
}
|
]
|
||||||
else {
|
]
|
||||||
for(yi = yi_range) {
|
]
|
||||||
for(xi = xi_range) {
|
:
|
||||||
tri_to_graph([
|
[
|
||||||
points[yi][xi],
|
for(yi = yi_range)
|
||||||
points[yi][xi + 1],
|
for(xi = xi_range)
|
||||||
points[yi + 1][xi]
|
[
|
||||||
], [
|
[
|
||||||
points[yi + 1][xi],
|
points[yi][xi],
|
||||||
points[yi][xi + 1],
|
points[yi][xi + 1],
|
||||||
points[yi + 1][xi + 1]
|
points[yi + 1][xi]
|
||||||
]);
|
],
|
||||||
}
|
[
|
||||||
}
|
points[yi + 1][xi],
|
||||||
}
|
points[yi][xi + 1],
|
||||||
|
points[yi + 1][xi + 1]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
for(twintri = twintri_lt) {
|
||||||
|
tri_to_graph(twintri[0], twintri[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user