summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt9
-rw-r--r--tests/cgalcachetest.cc8
-rw-r--r--tests/cgalpngtest.cc8
-rw-r--r--tests/cgalstlsanitytest.cc8
-rw-r--r--tests/cgaltest.cc8
-rw-r--r--tests/csgtermtest.cc8
-rw-r--r--tests/csgtestcore.cc8
-rw-r--r--tests/csgtexttest.cc8
-rw-r--r--tests/dumptest.cc18
-rw-r--r--tests/echotest.cc8
-rw-r--r--tests/modulecachetest.cc8
-rw-r--r--tests/regression/cgalpngtest/child-child-test-expected.pngbin0 -> 8017 bytes
-rw-r--r--tests/regression/cgalpngtest/localfiles-test-expected.pngbin0 -> 8454 bytes
-rw-r--r--tests/regression/cgalpngtest/module-recursion-expected.pngbin0 -> 9814 bytes
-rw-r--r--tests/regression/cgalpngtest/modulevariables-expected.pngbin0 -> 9534 bytes
-rw-r--r--tests/regression/cgalpngtest/resize-2d-tests-expected.pngbin0 -> 2436 bytes
-rw-r--r--tests/regression/cgalpngtest/resize-tests-expected.pngbin0 -> 4422 bytes
-rw-r--r--tests/regression/dumptest/child-child-test-expected.txt59
-rw-r--r--tests/regression/dumptest/localfiles-test-expected.txt17
-rw-r--r--tests/regression/dumptest/module-recursion-expected.txt244
-rw-r--r--tests/regression/dumptest/modulevariables-expected.txt4
-rw-r--r--tests/regression/dumptest/resize-2d-tests-expected.txt175
-rw-r--r--tests/regression/dumptest/resize-tests-expected.txt270
-rw-r--r--tests/regression/opencsgtest/child-child-test-expected.pngbin0 -> 8105 bytes
-rw-r--r--tests/regression/opencsgtest/localfiles-test-expected.pngbin0 -> 8844 bytes
-rw-r--r--tests/regression/opencsgtest/module-recursion-expected.pngbin0 -> 10321 bytes
-rw-r--r--tests/regression/opencsgtest/modulevariables-expected.pngbin0 -> 9854 bytes
-rw-r--r--tests/regression/opencsgtest/resize-2d-tests-expected.pngbin0 -> 3317 bytes
-rw-r--r--tests/regression/opencsgtest/resize-tests-expected.pngbin0 -> 5106 bytes
-rw-r--r--tests/regression/throwntogethertest/child-child-test-expected.pngbin0 -> 8105 bytes
-rw-r--r--tests/regression/throwntogethertest/localfiles-test-expected.pngbin0 -> 8844 bytes
-rw-r--r--tests/regression/throwntogethertest/module-recursion-expected.pngbin0 -> 10321 bytes
-rw-r--r--tests/regression/throwntogethertest/modulevariables-expected.pngbin0 -> 9854 bytes
-rw-r--r--tests/regression/throwntogethertest/resize-2d-tests-expected.pngbin0 -> 3277 bytes
-rw-r--r--tests/regression/throwntogethertest/resize-tests-expected.pngbin0 -> 5116 bytes
-rwxr-xr-xtests/test_cmdline_tool.py3
36 files changed, 823 insertions, 48 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index fff537a..1f2345b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -406,6 +406,8 @@ set(CORE_SOURCES
../src/ModuleCache.cc
../src/node.cc
../src/context.cc
+ ../src/modcontext.cc
+ ../src/evalcontext.cc
../src/csgterm.cc
../src/csgtermnormalizer.cc
../src/polyset.cc
@@ -754,12 +756,15 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES}
list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES})
list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad)
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles-test.scad)
list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES})
list(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/transform-nan-inf-tests.scad)
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/transform-nan-inf-tests.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles-test.scad)
+
list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES})
list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/bbox-transform-bug.scad)
list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/intersection-prune-test.scad)
diff --git a/tests/cgalcachetest.cc b/tests/cgalcachetest.cc
index b7e51b5..b65a2c8 100644
--- a/tests/cgalcachetest.cc
+++ b/tests/cgalcachetest.cc
@@ -30,7 +30,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -129,11 +129,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
root_module = parsefile(filename);
if (!root_module) {
diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc
index 947a231..afc3128 100644
--- a/tests/cgalpngtest.cc
+++ b/tests/cgalpngtest.cc
@@ -30,7 +30,7 @@
#include "node.h"
#include "module.h"
#include "polyset.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -102,11 +102,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
root_module = parsefile(filename);
if (!root_module) {
diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc
index 228bfde..49a3f8e 100644
--- a/tests/cgalstlsanitytest.cc
+++ b/tests/cgalstlsanitytest.cc
@@ -29,7 +29,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -84,11 +84,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
root_module = parsefile(filename);
if (!root_module) {
diff --git a/tests/cgaltest.cc b/tests/cgaltest.cc
index 9c8c090..b7ae669 100644
--- a/tests/cgaltest.cc
+++ b/tests/cgaltest.cc
@@ -29,7 +29,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -81,11 +81,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
root_module = parsefile(filename);
if (!root_module) {
diff --git a/tests/csgtermtest.cc b/tests/csgtermtest.cc
index 864ba5d..f4a88e0 100644
--- a/tests/csgtermtest.cc
+++ b/tests/csgtermtest.cc
@@ -31,7 +31,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -76,11 +76,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
const AbstractNode *root_node;
root_module = parsefile(filename);
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc
index 1e518e2..6da6411 100644
--- a/tests/csgtestcore.cc
+++ b/tests/csgtestcore.cc
@@ -6,7 +6,7 @@
#include "openscad.h"
#include "parsersettings.h"
#include "builtin.h"
-#include "context.h"
+#include "modcontext.h"
#include "node.h"
#include "module.h"
#include "polyset.h"
@@ -132,11 +132,11 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
if (sysinfo_dump)
root_module = parse("sphere();","",false);
diff --git a/tests/csgtexttest.cc b/tests/csgtexttest.cc
index 6a72dff..3e26814 100644
--- a/tests/csgtexttest.cc
+++ b/tests/csgtexttest.cc
@@ -31,7 +31,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -80,11 +80,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
AbstractNode *root_node;
root_module = parsefile(filename);
diff --git a/tests/dumptest.cc b/tests/dumptest.cc
index 4ddefe2..e0d2776 100644
--- a/tests/dumptest.cc
+++ b/tests/dumptest.cc
@@ -29,7 +29,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -86,11 +86,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
AbstractNode *root_node;
root_module = parsefile(filename);
@@ -115,7 +115,6 @@ int main(int argc, char **argv)
exit(1);
}
- fs::current_path(original_path);
std::ofstream outfile;
outfile.open(outfilename);
outfile << dumpstdstr << "\n";
@@ -124,21 +123,22 @@ int main(int argc, char **argv)
delete root_node;
delete root_module;
+ fs::current_path(original_path);
root_module = parsefile(outfilename);
if (!root_module) {
fprintf(stderr, "Error: Unable to read back dumped file\n");
exit(1);
}
- if (fs::path(filename).has_parent_path()) {
- fs::current_path(fs::path(filename).parent_path());
- }
-
AbstractNode::resetIndexCounter();
root_node = root_module->evaluate(&root_ctx, &root_inst);
tree.setRoot(root_node);
+ if (fs::path(outfilename).has_parent_path()) {
+ fs::current_path(fs::path(outfilename).parent_path());
+ }
+
string readbackstr = dumptree(tree, *root_node);
if (dumpstdstr != readbackstr) {
fprintf(stderr, "Error: Readback is different from original dump:\n");
diff --git a/tests/echotest.cc b/tests/echotest.cc
index af4942b..9924d11 100644
--- a/tests/echotest.cc
+++ b/tests/echotest.cc
@@ -29,7 +29,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "builtin.h"
#include "printutils.h"
@@ -88,11 +88,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
AbstractNode *root_node;
root_module = parsefile(filename);
diff --git a/tests/modulecachetest.cc b/tests/modulecachetest.cc
index 1103720..62f9543 100644
--- a/tests/modulecachetest.cc
+++ b/tests/modulecachetest.cc
@@ -29,7 +29,7 @@
#include "parsersettings.h"
#include "node.h"
#include "module.h"
-#include "context.h"
+#include "modcontext.h"
#include "value.h"
#include "export.h"
#include "builtin.h"
@@ -76,11 +76,11 @@ int main(int argc, char **argv)
parser_init(boosty::stringy(fs::path(argv[0]).branch_path()));
add_librarydir(boosty::stringy(fs::path(argv[0]).branch_path() / "../libraries"));
- Context root_ctx;
- register_builtin(root_ctx);
+ ModuleContext root_ctx;
+ root_ctx.registerBuiltin();
AbstractModule *root_module;
- ModuleInstantiation root_inst;
+ ModuleInstantiation root_inst("group");
AbstractNode *root_node;
root_module = parsefile(filename);
diff --git a/tests/regression/cgalpngtest/child-child-test-expected.png b/tests/regression/cgalpngtest/child-child-test-expected.png
new file mode 100644
index 0000000..80b70ba
--- /dev/null
+++ b/tests/regression/cgalpngtest/child-child-test-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/localfiles-test-expected.png b/tests/regression/cgalpngtest/localfiles-test-expected.png
new file mode 100644
index 0000000..3ad3d96
--- /dev/null
+++ b/tests/regression/cgalpngtest/localfiles-test-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/module-recursion-expected.png b/tests/regression/cgalpngtest/module-recursion-expected.png
new file mode 100644
index 0000000..3012a12
--- /dev/null
+++ b/tests/regression/cgalpngtest/module-recursion-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/modulevariables-expected.png b/tests/regression/cgalpngtest/modulevariables-expected.png
new file mode 100644
index 0000000..0dc18e8
--- /dev/null
+++ b/tests/regression/cgalpngtest/modulevariables-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/resize-2d-tests-expected.png b/tests/regression/cgalpngtest/resize-2d-tests-expected.png
new file mode 100644
index 0000000..44e9598
--- /dev/null
+++ b/tests/regression/cgalpngtest/resize-2d-tests-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/resize-tests-expected.png b/tests/regression/cgalpngtest/resize-tests-expected.png
new file mode 100644
index 0000000..8f994bf
--- /dev/null
+++ b/tests/regression/cgalpngtest/resize-tests-expected.png
Binary files differ
diff --git a/tests/regression/dumptest/child-child-test-expected.txt b/tests/regression/dumptest/child-child-test-expected.txt
new file mode 100644
index 0000000..13f098d
--- /dev/null
+++ b/tests/regression/dumptest/child-child-test-expected.txt
@@ -0,0 +1,59 @@
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false);
+ }
+ }
+ multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false);
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ color([1, 0, 0, 1]) {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 15], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ group() {
+ color([1, 0, 0, 1]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
diff --git a/tests/regression/dumptest/localfiles-test-expected.txt b/tests/regression/dumptest/localfiles-test-expected.txt
new file mode 100644
index 0000000..acdf7e7
--- /dev/null
+++ b/tests/regression/dumptest/localfiles-test-expected.txt
@@ -0,0 +1,17 @@
+ group() {
+ linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) {
+ import(file = "localfiles_dir/localfile.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2);
+ }
+ multmatrix([[1, 0, 0, -250], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ linear_extrude(file = "localfiles_dir/localfile.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2);
+ }
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 350], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ rotate_extrude(file = "localfiles_dir/localfile.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2);
+ }
+ multmatrix([[1, 0, 0, 250], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ multmatrix([[200, 0, 0, 0], [0, 200, 0, 0], [0, 0, 50, 0], [0, 0, 0, 1]]) {
+ surface(file = "localfiles_dir/localfile.dat", center = false);
+ }
+ }
+ }
+
diff --git a/tests/regression/dumptest/module-recursion-expected.txt b/tests/regression/dumptest/module-recursion-expected.txt
new file mode 100644
index 0000000..9ad8877
--- /dev/null
+++ b/tests/regression/dumptest/module-recursion-expected.txt
@@ -0,0 +1,244 @@
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 0.2, r2 = 0.2, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 1], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.7, r1 = 0.14, r2 = 0.14, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.7], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.49, r1 = 0.098, r2 = 0.098, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.49], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.49, r1 = 0.098, r2 = 0.098, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.49], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.7, r1 = 0.14, r2 = 0.14, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.7], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.49, r1 = 0.098, r2 = 0.098, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.49], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.49, r1 = 0.098, r2 = 0.098, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.49], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 0.343, r1 = 0.0686, r2 = 0.0686, center = false);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.343], [0, 0, 0, 1]]) {
+ group() {
+ multmatrix([[-1, 0, 0, 0], [0, -0.76604444311, 0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) {
+ group() {
+ group();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
diff --git a/tests/regression/dumptest/modulevariables-expected.txt b/tests/regression/dumptest/modulevariables-expected.txt
new file mode 100644
index 0000000..fed4bbc
--- /dev/null
+++ b/tests/regression/dumptest/modulevariables-expected.txt
@@ -0,0 +1,4 @@
+ group() {
+ cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 23, r2 = 10, center = false);
+ }
+
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/opencsgtest/child-child-test-expected.png b/tests/regression/opencsgtest/child-child-test-expected.png
new file mode 100644
index 0000000..07d61c0
--- /dev/null
+++ b/tests/regression/opencsgtest/child-child-test-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/localfiles-test-expected.png b/tests/regression/opencsgtest/localfiles-test-expected.png
new file mode 100644
index 0000000..7bc7909
--- /dev/null
+++ b/tests/regression/opencsgtest/localfiles-test-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/module-recursion-expected.png b/tests/regression/opencsgtest/module-recursion-expected.png
new file mode 100644
index 0000000..324c260
--- /dev/null
+++ b/tests/regression/opencsgtest/module-recursion-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/modulevariables-expected.png b/tests/regression/opencsgtest/modulevariables-expected.png
new file mode 100644
index 0000000..bf23265
--- /dev/null
+++ b/tests/regression/opencsgtest/modulevariables-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/resize-2d-tests-expected.png b/tests/regression/opencsgtest/resize-2d-tests-expected.png
new file mode 100644
index 0000000..d3bda96
--- /dev/null
+++ b/tests/regression/opencsgtest/resize-2d-tests-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/resize-tests-expected.png b/tests/regression/opencsgtest/resize-tests-expected.png
new file mode 100644
index 0000000..0334ba6
--- /dev/null
+++ b/tests/regression/opencsgtest/resize-tests-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/child-child-test-expected.png b/tests/regression/throwntogethertest/child-child-test-expected.png
new file mode 100644
index 0000000..07d61c0
--- /dev/null
+++ b/tests/regression/throwntogethertest/child-child-test-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/localfiles-test-expected.png b/tests/regression/throwntogethertest/localfiles-test-expected.png
new file mode 100644
index 0000000..7bc7909
--- /dev/null
+++ b/tests/regression/throwntogethertest/localfiles-test-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/module-recursion-expected.png b/tests/regression/throwntogethertest/module-recursion-expected.png
new file mode 100644
index 0000000..324c260
--- /dev/null
+++ b/tests/regression/throwntogethertest/module-recursion-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/modulevariables-expected.png b/tests/regression/throwntogethertest/modulevariables-expected.png
new file mode 100644
index 0000000..bf23265
--- /dev/null
+++ b/tests/regression/throwntogethertest/modulevariables-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/resize-2d-tests-expected.png b/tests/regression/throwntogethertest/resize-2d-tests-expected.png
new file mode 100644
index 0000000..4737cf7
--- /dev/null
+++ b/tests/regression/throwntogethertest/resize-2d-tests-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/resize-tests-expected.png b/tests/regression/throwntogethertest/resize-tests-expected.png
new file mode 100644
index 0000000..7445c1c
--- /dev/null
+++ b/tests/regression/throwntogethertest/resize-tests-expected.png
Binary files differ
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py
index eb01abd..470be1e 100755
--- a/tests/test_cmdline_tool.py
+++ b/tests/test_cmdline_tool.py
@@ -256,5 +256,6 @@ if __name__ == '__main__':
verification = verify_test(options.testname, options.cmd)
resultfile = run_test(options.testname, options.cmd, args[1:])
-
+ if not resultfile: exit(1)
+
if not verification or not compare_with_expected(resultfile): exit(1)
contact: Jan Huwald // Impressum