summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELEASE_NOTES2
-rw-r--r--doc/TODO.txt30
-rw-r--r--doc/testing.txt3
m---------libraries/MCAD0
-rw-r--r--src/expr.cc5
-rw-r--r--src/func.cc12
-rw-r--r--testdata/dxf/null-polygons.dxf (renamed from testdata/scad/features/null-polygons.dxf)0
-rw-r--r--testdata/scad/dxf/null-polygons.scad2
-rw-r--r--testdata/scad/features/null-polygons.scad2
-rw-r--r--testdata/scad/functions/len-tests.scad12
-rw-r--r--testdata/scad/minimal/allfunctions.scad1
-rw-r--r--testdata/scad/misc/dim-all.dxf (renamed from testdata/scad/features/dim-all.dxf)0
-rw-r--r--testdata/scad/misc/dim-all.scad (renamed from testdata/scad/features/dim-all.scad)0
-rw-r--r--testdata/scad/misc/dxf-export.scad (renamed from testdata/scad/features/dxf-export.scad)0
-rw-r--r--testdata/scad/misc/string-indexing.scad17
-rw-r--r--testdata/scad/misc/string-test.scad (renamed from testdata/scad/features/string-test.scad)0
-rw-r--r--tests/CMakeLists.txt70
-rw-r--r--tests/regression/cgalpngtest/hull3-tests-expected.pngbin0 -> 4408 bytes
-rw-r--r--tests/regression/cgalpngtest/import_stl-tests-expected.pngbin0 -> 7857 bytes
-rw-r--r--tests/regression/cgalpngtest/null-polygons-expected.pngbin0 -> 6886 bytes
-rw-r--r--tests/regression/csgtexttest/dim-all-expected.txt1
-rw-r--r--tests/regression/dumptest/dim-all-expected.txt9
-rw-r--r--tests/regression/dumptest/dxf-export-expected.txt16
-rw-r--r--tests/regression/dumptest/include test6-expected.txt1
-rw-r--r--tests/regression/dumptest/include-test-expected.txt20
-rw-r--r--tests/regression/dumptest/include-test5-expected.txt1
-rw-r--r--tests/regression/dumptest/string-test-expected.txt2
-rw-r--r--tests/regression/echotest/dim-all-expected.txt16
-rw-r--r--tests/regression/echotest/len-tests-expected.txt7
-rw-r--r--tests/regression/echotest/string-indexing-expected.txt11
-rw-r--r--tests/regression/echotest/string-test-expected.txt1
-rw-r--r--tests/regression/opencsgtest/hull3-tests-expected.pngbin0 -> 4408 bytes
-rw-r--r--tests/regression/opencsgtest/import_stl-tests-expected.pngbin0 -> 7991 bytes
-rw-r--r--tests/regression/opencsgtest/null-polygons-expected.pngbin0 -> 7152 bytes
-rw-r--r--tests/regression/opencsgtest/testcolornames-expected.pngbin0 -> 20822 bytes
-rw-r--r--tests/regression/throwntogethertest/hull3-tests-expected.pngbin0 -> 4408 bytes
-rw-r--r--tests/regression/throwntogethertest/import_stl-tests-expected.pngbin0 -> 7991 bytes
-rw-r--r--tests/regression/throwntogethertest/null-polygons-expected.pngbin0 -> 7152 bytes
38 files changed, 126 insertions, 115 deletions
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index d67766c..2de956d 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -15,6 +15,8 @@ o The version_num() function will return the OpenSCAD version as a number, e.g.
o Added PI constant.
o Now uses standard shortcuts for save and reload on Linux and Windows. F2/F3 will still work but is deprecated.
o Number literals in scientific notation are now accepted by the parser
+o Added len() function. Takes one vector or string parameter and returns its length.
+o The index operator [] now works on strings
Bugfixes:
o square() crashed if any of the dimensions were zero
diff --git a/doc/TODO.txt b/doc/TODO.txt
index f7209d9..ce51d83 100644
--- a/doc/TODO.txt
+++ b/doc/TODO.txt
@@ -37,10 +37,6 @@ Using STL-imported models is tricky and triggers multiple issues:
import_stl("adns2610_dev_circuit_inv.stl");
}
-CRASH BUGS
-----------
-o Broken polyhedron() entities are not correctly detected and cause CGAL segfaults
-
USER INTERFACE
--------------
o Preferences
@@ -72,13 +68,8 @@ o 3D View
- View All
- Allow specifying viewpoint in the scad file
- overlay indicator displaying current view mode
- - OpenCSG rendering: Coincident surfaces causes z-buffer fighting. Is this somehow
- avoidable tuning the depth tests in OpenCSG?
- - Make the 10.000 element OpenCSG limit configurable (Preferences) ?
- Use OpenGL picking to facilitate ray-tracing like features like measuring
thicknesses, distances, slot thicknesses etc.
- - When specifying a transparency with the color() statement,
- the object is not sorted and will be rendered wrongly
- Add option to change lights, e.g. add an optional camera light
o Editor wishlist
- More infrastructure for external editor (allow communication from the outside)
@@ -122,6 +113,16 @@ o Misc
o Cmd-line
- Add verbose option (PRINT command from mainwin.cc and progress output)
+OpenCSG-related
+---------------
+o OpenCSG rendering: Coincident surfaces causes z-buffer fighting. Is this somehow
+ avoidable tuning the depth tests in OpenCSG?
+o Make the 10.000 element OpenCSG limit configurable (Preferences) ?
+o When specifying a transparency with the color() statement,
+ the object is not sorted and will be rendered wrongly
+o Bug: Using the background operator (%) on the only object in a scene triggers a
+ CSG error: No top level object found
+
ENGINE
------
o Primitives
@@ -129,6 +130,7 @@ o Primitives
- (TTF) Text
- Image-based height field like http://www.thingiverse.com/thing:2078
- mesh (coordinates and indices)
+ - polygon(): Allow omitting the paths parameter to create a single polygon from a list of vertices.
o 2D Subsystem
- Performance: Is it necessary to union children before extrusion
when compiling? Can this be postponed to CGAL evaluation time?
@@ -149,7 +151,6 @@ o Language Frontend
- Rethink for vs. intersection_for vs. group. Should for loops
generate child lists instead, and make these passable to other
modules or accessible by child()?
- - constants: PI, OpenSCAD version
o DXF Import/Export
- Use dxflib from RibbonSoft for import/export? -> investigate
- Import
@@ -167,8 +168,6 @@ o Misc
- Add 'lines' object type for non-solid 2d drawings
- Is there a reason why modules like echo, empty if, empty for loop returns an
empty AbstractNode instead of being ignored?
- - Bug: Using the background operator (%) on the only object in a scene triggers a
- CSG error: No top level object found
- Dependency tracking of libraries (USE'd modules) isn't implemented. See Mail from nophead 20110823.
o Grammar
- dim->name -> dim->label
@@ -219,8 +218,8 @@ INFRASTRUCTURE
o Use a logging framework to get debugging/info output more under control?
(check log4j, google project)
-MISC
-----
+DOCUMENTATION
+-------------
o Write checklists for typical extension work (add new module, add new function)
-> make sure new test files are added
@@ -241,8 +240,9 @@ o 3D hull
o open polyline from dxf using new method
o linear_extrude DXF
o rotate_extrude DXF
+o import_stl
+o import_off
o import_*
- - basic
- open polylines
o include: test subdirs under librarydir (e.g. include <MCAD/gears.scad> doesn't work
o use: Basically same tests as include. + use restrictions
diff --git a/doc/testing.txt b/doc/testing.txt
index 089d18e..b2974fc 100644
--- a/doc/testing.txt
+++ b/doc/testing.txt
@@ -45,9 +45,6 @@ Adding a new regression test:
7) run the test normally and verify that it passes:
$ ctest -R mytest
-Note that test files which don't have an *-expected.<suffix> file will
-be ignored for the test apps in question.
-
Troubleshooting a failed test:
------------------------------
diff --git a/libraries/MCAD b/libraries/MCAD
-Subproject 60490ebd2c722d70e06a5c12fb55d85b6f1aa1c
+Subproject 4330afe5e726b910e0b60039c86afa809f94923
diff --git a/src/expr.cc b/src/expr.cc
index fc1fbf0..7e1a25b 100644
--- a/src/expr.cc
+++ b/src/expr.cc
@@ -85,6 +85,11 @@ Value Expression::evaluate(const Context *context) const
if (i >= 0 && i < int(v1.vec.size()))
return *v1.vec[i];
}
+ if (v1.type == Value::STRING && v2.type == Value::NUMBER) {
+ int i = (int)(v2.num);
+ if (i >= 0 && i < v1.text.size())
+ return Value(v1.text.substr(i, 1));
+ }
return Value();
}
if (this->type == "I")
diff --git a/src/func.cc b/src/func.cc
index 4451267..1138173 100644
--- a/src/func.cc
+++ b/src/func.cc
@@ -290,6 +290,17 @@ Value builtin_exp(const Context *, const std::vector<std::string>&, const std::v
return Value();
}
+Value builtin_length(const Context *, const std::vector<std::string>&, const std::vector<Value> &args)
+{
+ if (args.size() == 1){
+ if (args[0].type == Value::VECTOR)
+ return Value((double) args[0].vec.size());
+ if (args[0].type == Value::STRING)
+ return Value((double) args[0].text.size());
+ }
+ return Value();
+}
+
Value builtin_log(const Context *, const std::vector<std::string>&, const std::vector<Value> &args)
{
if (args.size() == 2 && args[0].type == Value::NUMBER && args[1].type == Value::NUMBER)
@@ -391,6 +402,7 @@ void register_builtin_functions()
Builtins::init("pow", new BuiltinFunction(&builtin_pow));
Builtins::init("sqrt", new BuiltinFunction(&builtin_sqrt));
Builtins::init("exp", new BuiltinFunction(&builtin_exp));
+ Builtins::init("len", new BuiltinFunction(&builtin_length));
Builtins::init("log", new BuiltinFunction(&builtin_log));
Builtins::init("ln", new BuiltinFunction(&builtin_ln));
Builtins::init("str", new BuiltinFunction(&builtin_str));
diff --git a/testdata/scad/features/null-polygons.dxf b/testdata/dxf/null-polygons.dxf
index 390e42e..390e42e 100644
--- a/testdata/scad/features/null-polygons.dxf
+++ b/testdata/dxf/null-polygons.dxf
diff --git a/testdata/scad/dxf/null-polygons.scad b/testdata/scad/dxf/null-polygons.scad
new file mode 100644
index 0000000..349ab6a
--- /dev/null
+++ b/testdata/scad/dxf/null-polygons.scad
@@ -0,0 +1,2 @@
+linear_extrude(height=1) import_dxf("../../dxf/null-polygons.dxf");
+translate([0,20,0]) linear_extrude("../../dxf/null-polygons.dxf", height=1);
diff --git a/testdata/scad/features/null-polygons.scad b/testdata/scad/features/null-polygons.scad
deleted file mode 100644
index 4849c15..0000000
--- a/testdata/scad/features/null-polygons.scad
+++ /dev/null
@@ -1,2 +0,0 @@
-linear_extrude() import_dxf("null-polygons.dxf");
-linear_extrude("null-polygons.dxf");
diff --git a/testdata/scad/functions/len-tests.scad b/testdata/scad/functions/len-tests.scad
new file mode 100644
index 0000000..fba7ae1
--- /dev/null
+++ b/testdata/scad/functions/len-tests.scad
@@ -0,0 +1,12 @@
+a=[1,2,3,4];
+b="abcd";
+c=[];
+d="";
+e=[[1,2,3,4],[1,2,3]];
+echo(len(a));
+echo(len(b));
+echo(len(c));
+echo(len(d));
+echo(len(e));
+echo(len(e[1]));
+echo(len(e[2])); \ No newline at end of file
diff --git a/testdata/scad/minimal/allfunctions.scad b/testdata/scad/minimal/allfunctions.scad
index ef21a90..2aebe54 100644
--- a/testdata/scad/minimal/allfunctions.scad
+++ b/testdata/scad/minimal/allfunctions.scad
@@ -24,3 +24,4 @@ a = dxf_dim();
a = dxf_cross();
a = version();
a = version_num();
+a = len();
diff --git a/testdata/scad/features/dim-all.dxf b/testdata/scad/misc/dim-all.dxf
index 6ae7610..6ae7610 100644
--- a/testdata/scad/features/dim-all.dxf
+++ b/testdata/scad/misc/dim-all.dxf
diff --git a/testdata/scad/features/dim-all.scad b/testdata/scad/misc/dim-all.scad
index 454ed11..454ed11 100644
--- a/testdata/scad/features/dim-all.scad
+++ b/testdata/scad/misc/dim-all.scad
diff --git a/testdata/scad/features/dxf-export.scad b/testdata/scad/misc/dxf-export.scad
index 7f4b8cb..7f4b8cb 100644
--- a/testdata/scad/features/dxf-export.scad
+++ b/testdata/scad/misc/dxf-export.scad
diff --git a/testdata/scad/misc/string-indexing.scad b/testdata/scad/misc/string-indexing.scad
new file mode 100644
index 0000000..3dc31c9
--- /dev/null
+++ b/testdata/scad/misc/string-indexing.scad
@@ -0,0 +1,17 @@
+test = "test";
+
+// Correct usage cases
+for(i = [0:len(test)-1]) {
+ echo(test[i]);
+}
+
+// Out of bounds
+echo(test[-1]);
+echo(test[len(test)]);
+
+// Invalid index type
+echo(test["test"]);
+echo(test[true]);
+echo(test[false]);
+echo(test[[0]]);
+echo(test[1.7]); \ No newline at end of file
diff --git a/testdata/scad/features/string-test.scad b/testdata/scad/misc/string-test.scad
index 5ec4cfb..5ec4cfb 100644
--- a/testdata/scad/features/string-test.scad
+++ b/testdata/scad/misc/string-test.scad
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 81c2faf..221500a 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -363,8 +363,12 @@ enable_testing()
# Find all scad files
file(GLOB MINIMAL_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/*.scad)
file(GLOB FEATURES_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/*.scad)
+list(REMOVE_ITEM FEATURES_FILES
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/features/include\ test6.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/features/include-test5.scad)
file(GLOB BUGS_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/*.scad)
file(GLOB SCAD_DXF_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/dxf/*.scad)
+file(GLOB FUNCTION_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/functions/*.scad)
file(GLOB EXAMPLE_FILES ${CMAKE_SOURCE_DIR}/../examples/*.scad)
list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES})
@@ -383,12 +387,15 @@ list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example016.scad)
list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example020.scad)
list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example021.scad)
-list(APPEND ECHO_FILES
+list(APPEND ECHO_FILES ${FUNCTION_FILES}
${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/echo.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/echo-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/parser-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/builtin-tests.scad)
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/builtin-tests.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/dim-all.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-test.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-indexing.scad)
# Add echotest tests to CTest
add_cmdline_test(echotest txt ${ECHO_FILES})
@@ -403,55 +410,28 @@ add_cmdline_test(csgtermtest txt ${MINIMAL_FILES})
add_cmdline_test(cgaltest stl ${CGALTEST_FILES})
# Add cgalpngtest tests to CTest
-LIST(APPEND CGALPNGTEST_FILES
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/2d-3d.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/circle-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/square-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/polygon-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/cube-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/sphere-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/cylinder-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/polyhedron-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/union-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/difference-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/intersection-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/linear_extrude-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/rotate_extrude-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/minkowski2-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/minkowski3-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/hull2-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/surface-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/import_dxf-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/transform-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/color-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/background-modifier.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/highlight-modifier.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/root-modifier.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/disable-modifier.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/for-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/for-nested-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/intersection_for-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/render-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/projection-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/assign-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/include-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/child-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/ifelse-tests.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/rotate_extrude_dxf-tests.scad)
-LIST(APPEND CGALPNGTEST_FILES ${SCAD_DXF_FILES})
-#LIST(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad)
+list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES})
+list(APPEND CGALPNGTEST_FILES ${SCAD_DXF_FILES})
+list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES})
+
+list(REMOVE_ITEM CGALPNGTEST_FILES
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/features/child-background.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/features/highlight-and-background-modifier.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/features/testcolornames.scad)
+
add_cmdline_test(cgalpngtest png ${CGALPNGTEST_FILES})
# Add opencsg tests to CTest
-LIST(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES})
-LIST(APPEND OPENCSGTEST_FILES
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/highlight-and-background-modifier.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/features/child-background.scad)
-LIST(APPEND OPENCSGTEST_FILES ${SCAD_DXF_FILES})
+
+# FIXME: This test illustrates a weakness in child() combined with modifiers.
+# Reenable it when this is improved
+list(REMOVE_ITEM OPENCSGTEST_FILES
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/features/child-background.scad)
+
add_cmdline_test(opencsgtest png ${OPENCSGTEST_FILES})
# Add throwntogether tests to CTest
-LIST(APPEND THROWNTOGETHERTEST_FILES ${CGALPNGTEST_FILES})
+list(APPEND THROWNTOGETHERTEST_FILES ${CGALPNGTEST_FILES})
add_cmdline_test(throwntogethertest png ${THROWNTOGETHERTEST_FILES})
# Add dxfexport tests to CTest
diff --git a/tests/regression/cgalpngtest/hull3-tests-expected.png b/tests/regression/cgalpngtest/hull3-tests-expected.png
new file mode 100644
index 0000000..50d838c
--- /dev/null
+++ b/tests/regression/cgalpngtest/hull3-tests-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/import_stl-tests-expected.png b/tests/regression/cgalpngtest/import_stl-tests-expected.png
new file mode 100644
index 0000000..31395c2
--- /dev/null
+++ b/tests/regression/cgalpngtest/import_stl-tests-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/null-polygons-expected.png b/tests/regression/cgalpngtest/null-polygons-expected.png
new file mode 100644
index 0000000..3368f13
--- /dev/null
+++ b/tests/regression/cgalpngtest/null-polygons-expected.png
Binary files differ
diff --git a/tests/regression/csgtexttest/dim-all-expected.txt b/tests/regression/csgtexttest/dim-all-expected.txt
deleted file mode 100644
index 6c127a8..0000000
--- a/tests/regression/csgtexttest/dim-all-expected.txt
+++ /dev/null
@@ -1 +0,0 @@
-group1(group2+group2+group2+group2+group2+group2+group2+group2)
diff --git a/tests/regression/dumptest/dim-all-expected.txt b/tests/regression/dumptest/dim-all-expected.txt
deleted file mode 100644
index 98a9bd9..0000000
--- a/tests/regression/dumptest/dim-all-expected.txt
+++ /dev/null
@@ -1,9 +0,0 @@
- group();
- group();
- group();
- group();
- group();
- group();
- group();
- group();
-
diff --git a/tests/regression/dumptest/dxf-export-expected.txt b/tests/regression/dumptest/dxf-export-expected.txt
deleted file mode 100644
index 93be68c..0000000
--- a/tests/regression/dumptest/dxf-export-expected.txt
+++ /dev/null
@@ -1,16 +0,0 @@
- circle($fn = 0, $fa = 12, $fs = 1, r = 5);
- multmatrix([[1, 0, 0, 15], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- square(size = [10, 10], center = true);
- }
- multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- polygon(points = [[-5, -5], [5, -5], [0, 5]], paths = [[0, 1, 2]], convexity = 1);
- }
- multmatrix([[1, 0, 0, 0], [0, 1, 0, -15], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- difference() {
- circle($fn = 0, $fa = 12, $fs = 1, r = 5);
- multmatrix([[1, 0, 0, 0], [0, 1, 0, -6], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- square(size = [12, 12], center = true);
- }
- }
- }
-
diff --git a/tests/regression/dumptest/include test6-expected.txt b/tests/regression/dumptest/include test6-expected.txt
deleted file mode 100644
index 8b13789..0000000
--- a/tests/regression/dumptest/include test6-expected.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/tests/regression/dumptest/include-test-expected.txt b/tests/regression/dumptest/include-test-expected.txt
deleted file mode 100644
index 871e45d..0000000
--- a/tests/regression/dumptest/include-test-expected.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-group() {
- group() {
- group() {
- group();
- }
- group() {
- group();
- }
- group() {
- group();
- }
- group() {
- group();
- }
- group() {
- group();
- }
- sphere($fn = 0, $fa = 12, $fs = 1, r = 1);
- }
-}
diff --git a/tests/regression/dumptest/include-test5-expected.txt b/tests/regression/dumptest/include-test5-expected.txt
deleted file mode 100644
index 8b13789..0000000
--- a/tests/regression/dumptest/include-test5-expected.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/tests/regression/dumptest/string-test-expected.txt b/tests/regression/dumptest/string-test-expected.txt
deleted file mode 100644
index b2915cb..0000000
--- a/tests/regression/dumptest/string-test-expected.txt
+++ /dev/null
@@ -1,2 +0,0 @@
- group();
-
diff --git a/tests/regression/echotest/dim-all-expected.txt b/tests/regression/echotest/dim-all-expected.txt
new file mode 100644
index 0000000..702f026
--- /dev/null
+++ b/tests/regression/echotest/dim-all-expected.txt
@@ -0,0 +1,16 @@
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: linearX = 51.44957554275265
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: linearY = 29.13025467434841
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: aligned = 60.00000000000001
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: ordinateX = -49.17542445724735
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: ordinateY = 30.86974532565159
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: radius = 60
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: diameter = 120
+WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+ECHO: arc = 59.03624346792648
diff --git a/tests/regression/echotest/len-tests-expected.txt b/tests/regression/echotest/len-tests-expected.txt
new file mode 100644
index 0000000..2a776c0
--- /dev/null
+++ b/tests/regression/echotest/len-tests-expected.txt
@@ -0,0 +1,7 @@
+ECHO: 4
+ECHO: 4
+ECHO: 0
+ECHO: 0
+ECHO: 2
+ECHO: 3
+ECHO: undef
diff --git a/tests/regression/echotest/string-indexing-expected.txt b/tests/regression/echotest/string-indexing-expected.txt
new file mode 100644
index 0000000..3fcdfa4
--- /dev/null
+++ b/tests/regression/echotest/string-indexing-expected.txt
@@ -0,0 +1,11 @@
+ECHO: "t"
+ECHO: "e"
+ECHO: "s"
+ECHO: "t"
+ECHO: undef
+ECHO: undef
+ECHO: undef
+ECHO: undef
+ECHO: undef
+ECHO: undef
+ECHO: "e"
diff --git a/tests/regression/echotest/string-test-expected.txt b/tests/regression/echotest/string-test-expected.txt
new file mode 100644
index 0000000..1969a74
--- /dev/null
+++ b/tests/regression/echotest/string-test-expected.txt
@@ -0,0 +1 @@
+ECHO: "The quick brown fox \tjumps \"over\" the lazy dog. The quick brown fox.\nThe \\lazy\\ dog."
diff --git a/tests/regression/opencsgtest/hull3-tests-expected.png b/tests/regression/opencsgtest/hull3-tests-expected.png
new file mode 100644
index 0000000..50d838c
--- /dev/null
+++ b/tests/regression/opencsgtest/hull3-tests-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/import_stl-tests-expected.png b/tests/regression/opencsgtest/import_stl-tests-expected.png
new file mode 100644
index 0000000..e6fdbca
--- /dev/null
+++ b/tests/regression/opencsgtest/import_stl-tests-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/null-polygons-expected.png b/tests/regression/opencsgtest/null-polygons-expected.png
new file mode 100644
index 0000000..ff06c62
--- /dev/null
+++ b/tests/regression/opencsgtest/null-polygons-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/testcolornames-expected.png b/tests/regression/opencsgtest/testcolornames-expected.png
new file mode 100644
index 0000000..6fc6569
--- /dev/null
+++ b/tests/regression/opencsgtest/testcolornames-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/hull3-tests-expected.png b/tests/regression/throwntogethertest/hull3-tests-expected.png
new file mode 100644
index 0000000..50d838c
--- /dev/null
+++ b/tests/regression/throwntogethertest/hull3-tests-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/import_stl-tests-expected.png b/tests/regression/throwntogethertest/import_stl-tests-expected.png
new file mode 100644
index 0000000..e6fdbca
--- /dev/null
+++ b/tests/regression/throwntogethertest/import_stl-tests-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/null-polygons-expected.png b/tests/regression/throwntogethertest/null-polygons-expected.png
new file mode 100644
index 0000000..ff06c62
--- /dev/null
+++ b/tests/regression/throwntogethertest/null-polygons-expected.png
Binary files differ
contact: Jan Huwald // Impressum