diff options
Diffstat (limited to 'tests/regression')
30 files changed, 478 insertions, 29 deletions
diff --git a/tests/regression/cgalpngtest/resize-2d-tests-expected.png b/tests/regression/cgalpngtest/resize-2d-tests-expected.png Binary files differnew file mode 100644 index 0000000..44e9598 --- /dev/null +++ b/tests/regression/cgalpngtest/resize-2d-tests-expected.png diff --git a/tests/regression/cgalpngtest/resize-tests-expected.png b/tests/regression/cgalpngtest/resize-tests-expected.png Binary files differnew file mode 100644 index 0000000..8f994bf --- /dev/null +++ b/tests/regression/cgalpngtest/resize-tests-expected.png diff --git a/tests/regression/dumptest/example010-expected.txt b/tests/regression/dumptest/example010-expected.txt index 55d2481..d0039ef 100644 --- a/tests/regression/dumptest/example010-expected.txt +++ b/tests/regression/dumptest/example010-expected.txt @@ -1,6 +1,6 @@ intersection() { surface(file = "example010.dat", center = true); - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { surface(file = "example010.dat", center = true); } } diff --git a/tests/regression/dumptest/example014-expected.txt b/tests/regression/dumptest/example014-expected.txt index 9a65acd..2b9e21e 100644 --- a/tests/regression/dumptest/example014-expected.txt +++ b/tests/regression/dumptest/example014-expected.txt @@ -2,13 +2,13 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.469846, 0.882564, 0.0180283, 0], [-0.813798, 0.44097, -0.378522, 0], [-0.34202, 0.163176, 0.925417, 0], [0, 0, 0, 1]]) { + multmatrix([[0.46984631039, 0.88256411925, 0.01802831123, 0], [-0.81379768134, 0.44096961053, -0.37852230637, 0], [-0.34202014332, 0.16317591116, 0.92541657839, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.417218, 0.668356, -0.615817, 0], [0.642459, -0.696172, -0.320299, 0], [-0.642788, -0.262003, -0.719846, 0], [0, 0, 0, 1]]) { + multmatrix([[0.41721770627, 0.66835566162, -0.61581660836, 0], [0.64245892818, -0.69617191219, -0.32029860173, 0], [-0.64278760968, -0.26200263022, -0.71984631039, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.0190076, -0.601928, 0.798324, 0], [0.0292692, 0.798461, 0.601335, 0], [-0.999391, 0.0119363, 0.0327948, 0], [0, 0, 0, 1]]) { + multmatrix([[0.0190076282, -0.60192849838, 0.7983237394, 0], [0.02926918072, 0.79846077351, 0.60133493846, 0], [-0.99939082701, 0.01193633086, 0.03279479952, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } } diff --git a/tests/regression/dumptest/example015-expected.txt b/tests/regression/dumptest/example015-expected.txt index e1434e8..defedcd 100644 --- a/tests/regression/dumptest/example015-expected.txt +++ b/tests/regression/dumptest/example015-expected.txt @@ -11,14 +11,14 @@ square(size = [15, 15], center = true); } } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, -15], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [100, 30], center = false); } } } } - multmatrix([[0.707107, 0.707107, 0, 0], [-0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0.70710678118, 0, 0], [-0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[0.7, 0, 0, 0], [0, 1.3, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { circle($fn = 0, $fa = 12, $fs = 2, r = 5); } diff --git a/tests/regression/dumptest/example018-expected.txt b/tests/regression/dumptest/example018-expected.txt index 6691d38..9e6ee4f 100644 --- a/tests/regression/dumptest/example018-expected.txt +++ b/tests/regression/dumptest/example018-expected.txt @@ -11,13 +11,13 @@ multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } @@ -37,13 +37,13 @@ multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } @@ -63,13 +63,13 @@ multmatrix([[1, 0, 0, -150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } @@ -101,13 +101,13 @@ multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } diff --git a/tests/regression/dumptest/include-tests-expected.txt b/tests/regression/dumptest/include-tests-expected.txt index 644c7c7..47f731e 100644 --- a/tests/regression/dumptest/include-tests-expected.txt +++ b/tests/regression/dumptest/include-tests-expected.txt @@ -60,7 +60,7 @@ } group(); multmatrix([[1, 0, 0, -6], [0, 1, 0, 0], [0, 0, 1, 19], [0, 0, 0, 1]]) { - multmatrix([[2.22045e-16, -2.22045e-16, 1, 0], [1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { + multmatrix([[0, 0, 1, 0], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) { group() { linear_extrude(height = 12, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { polygon(points = [[0, 0], [18, 0], [0, 4]], paths = [[0, 1, 2]], convexity = 1); diff --git a/tests/regression/dumptest/intersection_for-tests-expected.txt b/tests/regression/dumptest/intersection_for-tests-expected.txt index 30d0bd3..8f500c9 100644 --- a/tests/regression/dumptest/intersection_for-tests-expected.txt +++ b/tests/regression/dumptest/intersection_for-tests-expected.txt @@ -4,13 +4,13 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.469846, 0.882564, 0.0180283, 0], [-0.813798, 0.44097, -0.378522, 0], [-0.34202, 0.163176, 0.925417, 0], [0, 0, 0, 1]]) { + multmatrix([[0.46984631039, 0.88256411925, 0.01802831123, 0], [-0.81379768134, 0.44096961053, -0.37852230637, 0], [-0.34202014332, 0.16317591116, 0.92541657839, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.417218, 0.668356, -0.615817, 0], [0.642459, -0.696172, -0.320299, 0], [-0.642788, -0.262003, -0.719846, 0], [0, 0, 0, 1]]) { + multmatrix([[0.41721770627, 0.66835566162, -0.61581660836, 0], [0.64245892818, -0.69617191219, -0.32029860173, 0], [-0.64278760968, -0.26200263022, -0.71984631039, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.0190076, -0.601928, 0.798324, 0], [0.0292692, 0.798461, 0.601335, 0], [-0.999391, 0.0119363, 0.0327948, 0], [0, 0, 0, 1]]) { + multmatrix([[0.0190076282, -0.60192849838, 0.7983237394, 0], [0.02926918072, 0.79846077351, 0.60133493846, 0], [-0.99939082701, 0.01193633086, 0.03279479952, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } } diff --git a/tests/regression/dumptest/projection-tests-expected.txt b/tests/regression/dumptest/projection-tests-expected.txt index 69cd4f6..69cb49c 100644 --- a/tests/regression/dumptest/projection-tests-expected.txt +++ b/tests/regression/dumptest/projection-tests-expected.txt @@ -29,7 +29,7 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, -22], [0, 0, 1, 0], [0, 0, 0, 1]]) { linear_extrude(height = 5, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -5], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -4.999999], [0, 0, 0, 1]]) { cube(size = [10, 10, 10], center = true); } } diff --git a/tests/regression/dumptest/resize-2d-tests-expected.txt b/tests/regression/dumptest/resize-2d-tests-expected.txt new file mode 100644 index 0000000..0bbdd66 --- /dev/null +++ b/tests/regression/dumptest/resize-2d-tests-expected.txt @@ -0,0 +1,175 @@ + color([1, 0, 0, 1]) { + multmatrix([[1, 0, 0, -16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[3, 0, 0, 0], [0, 3, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 10, $fa = 12, $fs = 2, r = 1); + } + } + } + } + } + multmatrix([[1, 0, 0, -16], [0, 1, 0, 16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[3, 0, 0, 0], [0, 3, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + } + } + } + } + multmatrix([[1, 0, 0, -16], [0, 1, 0, 32], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[3, 0, 0, 0], [0, 3, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 0], [0, 1, 0, 2.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [5, 1], center = false); + } + } + } + } + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [15,15,0], auto = [0,0,0]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 10, $fa = 12, $fs = 2, r = 1); + } + } + } + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [15,15,0], auto = [0,0,0]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + } + } + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 32], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [15,15,0], auto = [0,0,0]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 0], [0, 1, 0, 2.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [5, 1], center = false); + } + } + } + } + } + color([0, 0.501961, 0, 1]) { + multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [15,0,0], auto = [1,1,1]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 10, $fa = 12, $fs = 2, r = 1); + } + } + } + } + } + multmatrix([[1, 0, 0, 16], [0, 1, 0, 16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,15,0], auto = [1,1,1]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + } + } + } + } + multmatrix([[1, 0, 0, 16], [0, 1, 0, 32], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,15,0], auto = [1,0,0]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 0], [0, 1, 0, 2.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [5, 1], center = false); + } + } + } + } + } + } + color([1, 0.752941, 0.796078, 1]) { + multmatrix([[1, 0, 0, 32], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,0,0], auto = [0,1,0]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 10, $fa = 12, $fs = 2, r = 1); + } + } + } + } + } + multmatrix([[1, 0, 0, 32], [0, 1, 0, 16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,0,15], auto = [1,1,1]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [1, 1], center = false); + } + } + } + } + } + multmatrix([[1, 0, 0, 32], [0, 1, 0, 32], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,0,15], auto = [0,0,0]) { + group() { + difference() { + square(size = [5, 5], center = false); + multmatrix([[1, 0, 0, 0], [0, 1, 0, 2.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + square(size = [5, 1], center = false); + } + } + } + } + } + } + diff --git a/tests/regression/dumptest/resize-tests-expected.txt b/tests/regression/dumptest/resize-tests-expected.txt new file mode 100644 index 0000000..f31290c --- /dev/null +++ b/tests/regression/dumptest/resize-tests-expected.txt @@ -0,0 +1,270 @@ + color([1, 0, 0, 1]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [1, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [5, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [1, 6, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 30], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [1, 1, 7], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 40], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [5, 6, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 60], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [1, 6, 7], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 50], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [5, 1, 7], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 70], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [8, 9, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 80], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [9, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 90], [0, 0, 1, -10], [0, 0, 0, 1]]) { + cube(size = [5, 6, 7], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + cube(size = [1, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,6,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 30], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,0,7], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,6,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 60], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,6,7], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 50], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,0,7], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [8,9,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 80], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [9,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 90], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,6,7], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + color([0, 0, 1, 1]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) { + cube(size = [1, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 10.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [5,0,0], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 0.5], [0, 1, 0, 23], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [0,6,0], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 0.5], [0, 1, 0, 30.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [0,0,7], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 43], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [5,6,0], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 50.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [5,0,7], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 0.5], [0, 1, 0, 63], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [0,6,7], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 4], [0, 1, 0, 74.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [8,9,0], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 4.5], [0, 1, 0, 80.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [9,0,0], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 93], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [5,6,7], auto = [0,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); + } + } + } + color([0, 0.501961, 0, 1]) { + multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + cube(size = [1, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,0,0], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,6,0], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 30], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,0,7], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,6,0], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 50], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,0,7], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 60], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [0,6,7], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [8,9,0], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 80], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [9,0,0], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 90], [0, 0, 1, 0], [0, 0, 0, 1]]) { + resize(newsize = [5,6,7], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + } + color([0.501961, 0, 0.501961, 1]) { + multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) { + cube(size = [1, 1, 1], center = false); + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [5,0,0], auto = [1,1,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 20], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [6,0,0], auto = [1,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 13.5], [0, 1, 0, 33.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [7,0,0], auto = [1,0,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 1); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 40], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [6,0,0], auto = [1,0,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 50], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [7,0,7], auto = [0,1,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 13.5], [0, 1, 0, 63.5], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [7,0,0], auto = [0,1,0]) { + sphere($fn = 8, $fa = 12, $fs = 2, r = 1); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 70], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [8,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 80], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [9,0,0], auto = [0,0,1]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 90], [0, 0, 1, 10], [0, 0, 0, 1]]) { + resize(newsize = [0,0,7], auto = [1,1,0]) { + cube(size = [1, 1, 1], center = false); + } + } + } + color([1, 0.752941, 0.796078, 1]) { + multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [4,4,4], auto = [0,0,0]) { + resize(newsize = [5000,100,1000], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [-5,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 20], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [-5,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 30], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [0,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 40], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [0,0,0], auto = [0,0,0]) { + cube(size = [1, 1, 1], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 50], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [0.5,0,7], auto = [0,0,0]) { + cube(size = [0.5, 1, 1000], center = false); + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 60], [0, 0, 1, -10], [0, 0, 0, 1]]) { + resize(newsize = [0,0,0.5], auto = [0,0,0]) { + cube(size = [6, 6, 1e+10], center = false); + } + } + } + diff --git a/tests/regression/dumptest/scale2D-tests-expected.txt b/tests/regression/dumptest/scale2D-tests-expected.txt index aa1eca2..6d4c096 100644 --- a/tests/regression/dumptest/scale2D-tests-expected.txt +++ b/tests/regression/dumptest/scale2D-tests-expected.txt @@ -1,10 +1,10 @@ - multmatrix([[2, 0, 0, 0], [0, 1.33333, 0, 0], [0, 0, 2, 0], [0, 0, 0, 1]]) { + multmatrix([[2, 0, 0, 0], [0, 1.33333333333, 0, 0], [0, 0, 2, 0], [0, 0, 0, 1]]) { group() { square(size = [2, 3], center = true); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - multmatrix([[2, 0, 0, 0], [0, 1.33333, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[2, 0, 0, 0], [0, 1.33333333333, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { square(size = [2, 3], center = true); } diff --git a/tests/regression/dumptest/use-tests-expected.txt b/tests/regression/dumptest/use-tests-expected.txt index ed903b9..dce0b7d 100644 --- a/tests/regression/dumptest/use-tests-expected.txt +++ b/tests/regression/dumptest/use-tests-expected.txt @@ -37,15 +37,15 @@ } multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { - multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { + multmatrix([[0, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 0, 0], [0, 0, 0, 1]]) { union() { linear_extrude(height = 1.5, center = true, convexity = 1, twist = 0, slices = 2, $fn = 0, $fa = 12, $fs = 2) { circle($fn = 30, $fa = 12, $fs = 2, r = 0.3); } linear_extrude(height = 1.5, center = true, convexity = 1, twist = 0, slices = 2, $fn = 0, $fa = 12, $fs = 2) { projection(cut = false, convexity = 0) { - multmatrix([[2.22045e-16, 0, -1, 0], [0, 1, 0, 0], [1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.318198], [0, 0, 0, 1]]) { + multmatrix([[0, 0, -1, 0], [0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.31819805153], [0, 0, 0, 1]]) { cylinder($fn = 30, $fa = 12, $fs = 2, h = 0.212132, r1 = 0.212132, r2 = 0, center = true); } } @@ -79,7 +79,7 @@ } group(); multmatrix([[1, 0, 0, -6], [0, 1, 0, 0], [0, 0, 1, 19], [0, 0, 0, 1]]) { - multmatrix([[2.22045e-16, -2.22045e-16, 1, 0], [1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { + multmatrix([[0, 0, 1, 0], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) { group() { linear_extrude(height = 12, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { polygon(points = [[0, 0], [18, 0], [0, 4]], paths = [[0, 1, 2]], convexity = 1); diff --git a/tests/regression/echotest/value-reassignment-tests-expected.txt b/tests/regression/echotest/value-reassignment-tests-expected.txt new file mode 100644 index 0000000..05a6741 --- /dev/null +++ b/tests/regression/echotest/value-reassignment-tests-expected.txt @@ -0,0 +1 @@ +ECHO: 4 diff --git a/tests/regression/opencsgtest/resize-2d-tests-expected.png b/tests/regression/opencsgtest/resize-2d-tests-expected.png Binary files differnew file mode 100644 index 0000000..d3bda96 --- /dev/null +++ b/tests/regression/opencsgtest/resize-2d-tests-expected.png diff --git a/tests/regression/opencsgtest/resize-tests-expected.png b/tests/regression/opencsgtest/resize-tests-expected.png Binary files differnew file mode 100644 index 0000000..0334ba6 --- /dev/null +++ b/tests/regression/opencsgtest/resize-tests-expected.png diff --git a/tests/regression/openscad-camcenter/example001-expected.png b/tests/regression/openscad-camcenter/example001-expected.png Binary files differnew file mode 100644 index 0000000..5cdada7 --- /dev/null +++ b/tests/regression/openscad-camcenter/example001-expected.png diff --git a/tests/regression/openscad-camdist/example001-expected.png b/tests/regression/openscad-camdist/example001-expected.png Binary files differnew file mode 100644 index 0000000..363cc50 --- /dev/null +++ b/tests/regression/openscad-camdist/example001-expected.png diff --git a/tests/regression/openscad-cameye/example001-expected.png b/tests/regression/openscad-cameye/example001-expected.png Binary files differnew file mode 100644 index 0000000..ad7a8b0 --- /dev/null +++ b/tests/regression/openscad-cameye/example001-expected.png diff --git a/tests/regression/openscad-cameye2/example001-expected.png b/tests/regression/openscad-cameye2/example001-expected.png Binary files differnew file mode 100644 index 0000000..0315799 --- /dev/null +++ b/tests/regression/openscad-cameye2/example001-expected.png diff --git a/tests/regression/openscad-cameyeortho/example001-expected.png b/tests/regression/openscad-cameyeortho/example001-expected.png Binary files differnew file mode 100644 index 0000000..0de38bd --- /dev/null +++ b/tests/regression/openscad-cameyeortho/example001-expected.png diff --git a/tests/regression/openscad-camortho/example001-expected.png b/tests/regression/openscad-camortho/example001-expected.png Binary files differnew file mode 100644 index 0000000..29c1083 --- /dev/null +++ b/tests/regression/openscad-camortho/example001-expected.png diff --git a/tests/regression/openscad-camrot/example001-expected.png b/tests/regression/openscad-camrot/example001-expected.png Binary files differnew file mode 100644 index 0000000..ecfd698 --- /dev/null +++ b/tests/regression/openscad-camrot/example001-expected.png diff --git a/tests/regression/openscad-camtrans/example001-expected.png b/tests/regression/openscad-camtrans/example001-expected.png Binary files differnew file mode 100644 index 0000000..1117751 --- /dev/null +++ b/tests/regression/openscad-camtrans/example001-expected.png diff --git a/tests/regression/openscad-imgsize/example001-expected.png b/tests/regression/openscad-imgsize/example001-expected.png Binary files differnew file mode 100644 index 0000000..52fb547 --- /dev/null +++ b/tests/regression/openscad-imgsize/example001-expected.png diff --git a/tests/regression/openscad-imgstretch/example001-expected.png b/tests/regression/openscad-imgstretch/example001-expected.png Binary files differnew file mode 100644 index 0000000..9d704c8 --- /dev/null +++ b/tests/regression/openscad-imgstretch/example001-expected.png diff --git a/tests/regression/openscad-imgstretch2/example001-expected.png b/tests/regression/openscad-imgstretch2/example001-expected.png Binary files differnew file mode 100644 index 0000000..92a93b6 --- /dev/null +++ b/tests/regression/openscad-imgstretch2/example001-expected.png diff --git a/tests/regression/openscad-nonascii/sfære-expected.csg b/tests/regression/openscad-nonascii/sfære-expected.csg new file mode 100644 index 0000000..e1ee757 --- /dev/null +++ b/tests/regression/openscad-nonascii/sfære-expected.csg @@ -0,0 +1,3 @@ +group() { + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); +} diff --git a/tests/regression/throwntogethertest/resize-2d-tests-expected.png b/tests/regression/throwntogethertest/resize-2d-tests-expected.png Binary files differnew file mode 100644 index 0000000..4737cf7 --- /dev/null +++ b/tests/regression/throwntogethertest/resize-2d-tests-expected.png diff --git a/tests/regression/throwntogethertest/resize-tests-expected.png b/tests/regression/throwntogethertest/resize-tests-expected.png Binary files differnew file mode 100644 index 0000000..7445c1c --- /dev/null +++ b/tests/regression/throwntogethertest/resize-tests-expected.png |