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

refactor deps

This commit is contained in:
Justin Lin
2020-01-27 12:06:04 +08:00
parent 6a0694b81f
commit 69e8910c1b
2 changed files with 33 additions and 25 deletions

View File

@@ -8,7 +8,7 @@
*
**/
include <util/__comm__/__reverse.scad>;
use <util/reverse.scad>;
module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") {
@@ -75,12 +75,12 @@ module function_grapher(points, thickness, style = "FACES", slicing = "SLASH") {
offset_v = [leng_pts, leng_pts, leng_pts];
base_tri_faces1 = [
for(face = top_tri_faces1)
__reverse(face) + offset_v
reverse(face) + offset_v
];
base_tri_faces2 = [
for(face = top_tri_faces2)
__reverse(face) + offset_v
reverse(face) + offset_v
];
side_faces1 = [

View File

@@ -2,12 +2,9 @@ include <unittest.scad>;
include <line3d.scad>;
include <polyline3d.scad>;
include <hull_polyline3d.scad>;
module test_function_grapher_default() {
echo("==== test_function_grapher_default ====");
include <function_grapher.scad>;
module test_function_grapher_faces(points, faces) {
pts = [
[[0, 0, 1], [1, 0, 2], [2, 0, 2], [3, 0, 3]],
[[0, 1, 1], [1, 1, 4], [2, 1, 0], [3, 1, 3]],
@@ -17,7 +14,6 @@ module test_function_grapher_default() {
thickness = 0.5;
module test_function_grapher_faces(points, faces) {
expected_pts = concat([
for(row = pts)
for(pt = row)
@@ -37,6 +33,18 @@ module test_function_grapher_default() {
}
}
module test_function_grapher_default() {
echo("==== test_function_grapher_default ====");
pts = [
[[0, 0, 1], [1, 0, 2], [2, 0, 2], [3, 0, 3]],
[[0, 1, 1], [1, 1, 4], [2, 1, 0], [3, 1, 3]],
[[0, 2, 1], [1, 2, 3], [2, 2, 1], [3, 2, 3]],
[[0, 3, 1], [1, 3, 3], [2, 3, 1], [3, 3, 3]]
];
thickness = 0.5;
function_grapher(pts, thickness);
}