diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2012-05-28 16:48:46 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2012-05-28 16:48:46 (GMT) |
commit | dd2002a81673b3875ce8c4e8a61cb10278c4eb03 (patch) | |
tree | 7aaadf1c9b12cd37a7a913d3e76256f6406fa939 /tests | |
parent | 4381762f5aa2e6a56258618e585e1510ead88684 (diff) | |
parent | 67eb2ebe90447e966dc1e08b91c43d937c521583 (diff) |
Tidy up code. Generate proper test png images. Merge branch 'master' into caliston1.
Conflicts:
src/PolySetCGALEvaluator.cc
Diffstat (limited to 'tests')
34 files changed, 1198 insertions, 63 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b81ce8c..12b8543 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -229,10 +229,27 @@ if (NOT $ENV{GLEWDIR} STREQUAL "") elseif (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "") set(GLEW_DIR "$ENV{OPENSCAD_LIBRARIES}") endif() +if (NOT GLEW_INCLUDE_DIR) + message(STATUS "OPENCSG_DIR: " ${OPENCSG_DIR}) + find_path(GLEW_INCLUDE_DIR + GL/glew.h + HINTS ${GLEW_DIR}/include + NO_DEFAULT_PATH) + find_library(GLEW_LIBRARY + NAMES GLEW glew + HINTS ${GLEW_DIR}/lib + NO_DEFAULT_PATH) + if (NOT GLEW_LIBRARY) + find_package(GLEW REQUIRED) + if (NOT GLEW_LIBRARY) + message(FATAL_ERROR "GLEW not found") + endif() + endif() + message(STATUS "GLEW include: " ${GLEW_INCLUDE_DIR}) + message(STATUS "GLEW library: " ${GLEW_LIBRARY}) +endif() -find_package(GLEW REQUIRED) - -inclusion( GLEW_DIR GLEW_INCLUDE_PATH ) +inclusion(GLEW_DIR GLEW_INCLUDE_DIR) # Flex/Bison find_package(BISON REQUIRED) @@ -309,6 +326,7 @@ set(CORE_SOURCES ../src/expr.cc ../src/func.cc ../src/module.cc + ../src/ModuleCache.cc ../src/node.cc ../src/context.cc ../src/csgterm.cc @@ -400,19 +418,25 @@ target_link_libraries(echotest tests-nocgal tests-core ${QT_LIBRARIES} ${OPENGL_ # dumptest # add_executable(dumptest dumptest.cc) -target_link_libraries(dumptest tests-common tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(dumptest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) + +# +# modulecachetest +# +add_executable(modulecachetest modulecachetest.cc) +target_link_libraries(modulecachetest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) # # csgtexttest # add_executable(csgtexttest csgtexttest.cc CSGTextRenderer.cc CSGTextCache.cc) -target_link_libraries(csgtexttest tests-common tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(csgtexttest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) # # csgtermtest # add_executable(csgtermtest csgtermtest.cc ../src/CSGTermEvaluator.cc) -target_link_libraries(csgtermtest tests-common tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(csgtermtest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) # # cgaltest @@ -608,7 +632,9 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES} ${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) + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-indexing.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/vector-values.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/search-tests.scad) list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES}) list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad @@ -631,6 +657,7 @@ disable_tests(dumptest_transform-tests dumptest_render-tests dumptest_difference-tests dumptest_intersection-tests + dumptest_text-search-test dumptest_example001 dumptest_example005 dumptest_example006 @@ -642,7 +669,8 @@ disable_tests(dumptest_transform-tests dumptest_example017 dumptest_example020 dumptest_example021 - dumptest_example022) + dumptest_example022 + dumptest_example023) # FIXME: This test illustrates a weakness in child() combined with modifiers. # Reenable it when this is improved diff --git a/tests/FindGLEW.cmake b/tests/FindGLEW.cmake index 1b0cac4..1d94ca2 100644 --- a/tests/FindGLEW.cmake +++ b/tests/FindGLEW.cmake @@ -3,55 +3,63 @@ # Once done this will define # # GLEW_FOUND -# GLEW_INCLUDE_PATH +# GLEW_INCLUDE_DIR # GLEW_LIBRARY # # a few lines of this file are based on the LGPL code found at # http://openlibraries.org/browser/trunk/FindGLEW.cmake?rev=1383 +include(FindPkgConfig) -IF (WIN32 AND MSVC) - IF (WIN32_STATIC_BUILD) # passed from caller - SET(GLEW_LIB_SEARCH_NAME glew32s.lib) # static, non-debug (Release) - ELSE () - SET(GLEW_LIB_SEARCH_NAME glew32.lib) # other. untested with OpenSCAD - ENDIF() -ELSE () # GCC - SET(GLEW_LIB_SEARCH_NAME "libglew32s.a") -ENDIF () +if (PKG_CONFIG_FOUND) + message("Doing pkg config glew check...") + pkg_check_modules(GLEW glew>=1.6) +endif() -IF (WIN32) - FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h - $ENV{PROGRAMFILES}/GLEW/include - ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include - DOC "The directory where GL/glew.h resides") - FIND_LIBRARY( GLEW_LIBRARY - NAMES ${GLEW_LIB_SEARCH_NAME} - PATHS - $ENV{PROGRAMFILES}/GLEW/lib - ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin - ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib - DOC "The GLEW library") -ELSE (WIN32) - message(STATUS "GLEW_DIR: " ${GLEW_DIR}) - FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h - HINTS ${GLEW_DIR}/include - PATHS /usr/include /usr/local/include /usr/pkg/include - NO_DEFAULT_PATH - DOC "The directory where GL/glew.h resides") - FIND_LIBRARY( GLEW_LIBRARY - NAMES GLEW glew - HINTS ${GLEW_DIR}/lib - PATHS /usr/lib /usr/local/lib /usr/pkg/lib - NO_DEFAULT_PATH - DOC "The GLEW library") -ENDIF (WIN32) +if (GLEW_LIBRARIES) + set(GLEW_INCLUDE_DIR "${GLEW_INCLUDE_DIRS}") + set(GLEW_LIBRARY ${GLEW_LDFLAGS}) +else() + if (WIN32 AND MSVC) + if (WIN32_STATIC_BUILD) # passed from caller + set(GLEW_LIB_SEARCH_NAME glew32s.lib) # static, non-debug (Release) + else () + set(GLEW_LIB_SEARCH_NAME glew32.lib) # other. untested with OpenSCAD + endif() + else () # GCC + set(GLEW_LIB_SEARCH_NAME "libglew32s.a") + endif () -IF (GLEW_INCLUDE_PATH) - SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise") - MESSAGE(STATUS "GLEW include found in " ${GLEW_INCLUDE_PATH} ) - MESSAGE(STATUS "GLEW library found in " ${GLEW_LIBRARY} ) -ELSE (GLEW_INCLUDE_PATH) - SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise") -ENDIF (GLEW_INCLUDE_PATH) + if (WIN32) + find_path(GLEW_INCLUDE_DIR GL/glew.h + $ENV{PROGRAMFILES}/GLEW/include + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include + DOC "The directory where GL/glew.h resides") + find_library(GLEW_LIBRARY + NAMES ${GLEW_LIB_SEARCH_NAME} + PATHS + $ENV{PROGRAMFILES}/GLEW/lib + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin + ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib + DOC "The GLEW library") + else (WIN32) + find_path(GLEW_INCLUDE_DIR GL/glew.h + PATHS /usr/include /usr/local/include /usr/pkg/include + NO_DEFAULT_PATH + DOC "The directory where GL/glew.h resides") + find_library(GLEW_LIBRARY + NAMES GLEW glew + PATHS /usr/lib /usr/local/lib /usr/pkg/lib + NO_DEFAULT_PATH + DOC "The GLEW library") + endif (WIN32) + + if (GLEW_INCLUDE_DIR) + set(GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise") + message(STATUS "GLEW include found in " ${GLEW_INCLUDE_DIR} ) + message(STATUS "GLEW library found in " ${GLEW_LIBRARY} ) + else() + set(GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise") + endif() +endif() diff --git a/tests/cgalcachetest.cc b/tests/cgalcachetest.cc index 5675ef5..18e9efa 100644 --- a/tests/cgalcachetest.cc +++ b/tests/cgalcachetest.cc @@ -152,7 +152,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + if (fs::path(filename).has_parent_path()) { + fs::current_path(fs::path(filename).parent_path()); + } AbstractNode::resetIndexCounter(); AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc index 650c6d7..7c9684a 100644 --- a/tests/cgalpngtest.cc +++ b/tests/cgalpngtest.cc @@ -125,7 +125,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + if (fs::path(filename).has_parent_path()) { + fs::current_path(fs::path(filename).parent_path()); + } AbstractNode::resetIndexCounter(); AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc index 0bf7ac2..d0d0077 100644 --- a/tests/cgalstlsanitytest.cc +++ b/tests/cgalstlsanitytest.cc @@ -111,7 +111,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + if (fs::path(filename).has_parent_path()) { + fs::current_path(fs::path(filename).parent_path()); + } AbstractNode::resetIndexCounter(); AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); diff --git a/tests/cgaltest.cc b/tests/cgaltest.cc index 076983f..98617a3 100644 --- a/tests/cgaltest.cc +++ b/tests/cgaltest.cc @@ -104,7 +104,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + if (fs::path(filename).has_parent_path()) { + fs::current_path(fs::path(filename).parent_path()); + } AbstractNode::resetIndexCounter(); AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); diff --git a/tests/csgtermtest.cc b/tests/csgtermtest.cc index 89a9bdc..1bd2468 100644 --- a/tests/csgtermtest.cc +++ b/tests/csgtermtest.cc @@ -91,7 +91,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + 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); diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index b9f0d27..cb96940 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -276,7 +276,9 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) } if (!sysinfo_dump) { - fs::current_path(fs::path(filename).parent_path()); + if (fs::path(filename).has_parent_path()) { + fs::current_path(fs::path(filename).parent_path()); + } } AbstractNode::resetIndexCounter(); diff --git a/tests/csgtexttest.cc b/tests/csgtexttest.cc index 67e3416..6e18f20 100644 --- a/tests/csgtexttest.cc +++ b/tests/csgtexttest.cc @@ -95,7 +95,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + 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); diff --git a/tests/dumptest.cc b/tests/dumptest.cc index dbf74ab..f923a64 100644 --- a/tests/dumptest.cc +++ b/tests/dumptest.cc @@ -101,7 +101,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + 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); diff --git a/tests/echotest.cc b/tests/echotest.cc index b08e81a..d731ee3 100644 --- a/tests/echotest.cc +++ b/tests/echotest.cc @@ -103,7 +103,9 @@ int main(int argc, char **argv) exit(1); } - fs::current_path(fs::path(filename).parent_path()); + 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); diff --git a/tests/modulecachetest.cc b/tests/modulecachetest.cc new file mode 100644 index 0000000..2ef7a6c --- /dev/null +++ b/tests/modulecachetest.cc @@ -0,0 +1,123 @@ +/* + * OpenSCAD (www.openscad.org) + * Copyright (C) 2009-2011 Clifford Wolf <clifford@clifford.at> and + * Marius Kintel <marius@kintel.net> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * As a special exception, you have permission to link this program + * with the CGAL library and distribute executables, as long as you + * follow the requirements of the GNU GPL in regard to all of the + * software in the executable aside from CGAL. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "tests-common.h" +#include "openscad.h" +#include "parsersettings.h" +#include "node.h" +#include "module.h" +#include "context.h" +#include "value.h" +#include "export.h" +#include "builtin.h" +#include "Tree.h" + +#include <QCoreApplication> +#ifndef _MSC_VER +#include <getopt.h> +#endif +#include <assert.h> +#include <iostream> +#include <sstream> +#include <fstream> + +#include <boost/filesystem.hpp> +namespace fs = boost::filesystem; +#include "boosty.h" + +std::string commandline_commands; +std::string currentdir; +QString examplesdir; + +using std::string; + +int main(int argc, char **argv) +{ +#ifdef _MSC_VER + _set_output_format(_TWO_DIGIT_EXPONENT); +#endif + if (argc != 3) { + fprintf(stderr, "Usage: %s <file.scad> <output.txt>\n", argv[0]); + exit(1); + } + + const char *filename = argv[1]; + const char *outfilename = argv[2]; + + int rc = 0; + + Builtins::instance()->initialize(); + + QCoreApplication app(argc, argv); + fs::path original_path = fs::current_path(); + + currentdir = boosty::stringy( fs::current_path() ); + + parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); + set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + + Context root_ctx; + register_builtin(root_ctx); + + AbstractModule *root_module; + ModuleInstantiation root_inst; + AbstractNode *root_node; + + root_module = parsefile(filename); + if (!root_module) { + fprintf(stderr, "Error: Unable to parse input 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); + + delete root_node; + delete root_module; + + fs::current_path(original_path); + + fprintf(stderr, "Second parse\n"); + root_module = parsefile(filename); + if (!root_module) { + fprintf(stderr, "Error: Unable to parse second time\n"); + exit(1); + } + + AbstractNode::resetIndexCounter(); + root_node = root_module->evaluate(&root_ctx, &root_inst); + + delete root_node; + delete root_module; + + Builtins::instance(true); + + return rc; +} diff --git a/tests/regression/cgalpngtest/example023-expected.png b/tests/regression/cgalpngtest/example023-expected.png Binary files differnew file mode 100644 index 0000000..c528b90 --- /dev/null +++ b/tests/regression/cgalpngtest/example023-expected.png diff --git a/tests/regression/cgalpngtest/projection-tests-expected.png b/tests/regression/cgalpngtest/projection-tests-expected.png Binary files differindex 800f7ba..31890b9 100644 --- a/tests/regression/cgalpngtest/projection-tests-expected.png +++ b/tests/regression/cgalpngtest/projection-tests-expected.png diff --git a/tests/regression/cgalpngtest/scale2D-tests-expected.png b/tests/regression/cgalpngtest/scale2D-tests-expected.png Binary files differnew file mode 100644 index 0000000..c23b7a0 --- /dev/null +++ b/tests/regression/cgalpngtest/scale2D-tests-expected.png diff --git a/tests/regression/cgalpngtest/scale3D-tests-expected.png b/tests/regression/cgalpngtest/scale3D-tests-expected.png Binary files differnew file mode 100644 index 0000000..cbd8227 --- /dev/null +++ b/tests/regression/cgalpngtest/scale3D-tests-expected.png diff --git a/tests/regression/cgalpngtest/text-search-test-expected.png b/tests/regression/cgalpngtest/text-search-test-expected.png Binary files differnew file mode 100644 index 0000000..76e7087 --- /dev/null +++ b/tests/regression/cgalpngtest/text-search-test-expected.png diff --git a/tests/regression/dumptest/scale2D-tests-expected.txt b/tests/regression/dumptest/scale2D-tests-expected.txt new file mode 100644 index 0000000..aa1eca2 --- /dev/null +++ b/tests/regression/dumptest/scale2D-tests-expected.txt @@ -0,0 +1,34 @@ + multmatrix([[2, 0, 0, 0], [0, 1.33333, 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]]) { + group() { + square(size = [2, 3], center = true); + } + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[2, 0, 0, 0], [0, 2, 0, 0], [0, 0, 2, 0], [0, 0, 0, 1]]) { + group() { + square(size = [2, 3], center = true); + } + } + } + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { + multmatrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + square(size = [2, 3], center = true); + } + } + } + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { + multmatrix([[0, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + square(size = [2, 3], center = true); + } + } + } + diff --git a/tests/regression/dumptest/scale3D-tests-expected.txt b/tests/regression/dumptest/scale3D-tests-expected.txt new file mode 100644 index 0000000..c06b2fe --- /dev/null +++ b/tests/regression/dumptest/scale3D-tests-expected.txt @@ -0,0 +1,43 @@ + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 2, 0, 0], [0, 0, 3, 0], [0, 0, 0, 1]]) { + group() { + cylinder($fn = 8, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, 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, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + cylinder($fn = 8, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = true); + } + } + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[2, 0, 0, 0], [0, 2, 0, 0], [0, 0, 2, 0], [0, 0, 0, 1]]) { + group() { + cylinder($fn = 8, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = true); + } + } + } + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { + multmatrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]) { + group() { + cylinder($fn = 8, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = true); + } + } + } + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { + multmatrix([[0, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]) { + group() { + cylinder($fn = 8, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = true); + } + } + } + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]) { + group() { + cylinder($fn = 8, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = true); + } + } + } + diff --git a/tests/regression/dumptest/text-search-test-expected.txt b/tests/regression/dumptest/text-search-test-expected.txt new file mode 100644 index 0000000..f0c8aad --- /dev/null +++ b/tests/regression/dumptest/text-search-test-expected.txt @@ -0,0 +1,848 @@ + group(); + group() { + multmatrix([[1, 0, 0, -60], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 2], [6, 2], [6, 1], [3, 2], [3, 6], [5, 6], [5, 2]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 13, 14, 15]], convexity = 1); + } + multmatrix([[1, 0, 0, -52], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 0], [1, 6], [6, 6], [6, 5], [7, 5], [7, 3], [6, 3], [6, 2], [3, 2], [3, 0], [3, 3], [3, 5], [5, 5], [5, 3]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13]], convexity = 1); + } + multmatrix([[1, 0, 0, -44], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 5], [2, 5], [2, 6], [6, 6], [6, 5], [7, 5], [7, 3], [3, 3], [3, 2], [6, 2], [6, 1], [3, 4], [3, 5], [5, 5], [5, 4]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [14, 15, 16, 17]], convexity = 1); + } + multmatrix([[1, 0, 0, -36], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 1], [1, 6], [6, 6], [6, 5], [7, 5], [7, 1], [5, 1], [5, 5], [3, 5], [3, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], convexity = 1); + } + multmatrix([[1, 0, 0, -28], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[2, 1], [2, 2], [5, 2], [5, 4], [2, 4], [2, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [3, 6], [3, 5], [6, 5], [6, 4], [7, 4], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, -20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [5, 5], [5, 6], [3, 6], [3, 2], [5, 2], [5, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 1], [1, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 6], [6, 6], [6, 5], [7, 5], [7, 1], [5, 1], [5, 2], [3, 2], [3, 1], [3, 3], [3, 5], [5, 5], [5, 3]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, -4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 1], [1, 7], [5, 7], [5, 6], [6, 6], [6, 5], [7, 5], [7, 3], [6, 3], [6, 2], [5, 2], [5, 1], [3, 2], [3, 6], [4, 6], [4, 5], [5, 5], [5, 3], [4, 3], [4, 2]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 13, 14, 15, 16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, 4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = undef, paths = undef, convexity = 1); + } + multmatrix([[1, 0, 0, 12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 1], [1, 7], [6, 7], [6, 6], [7, 6], [7, 4], [6, 4], [6, 2], [7, 2], [7, 1], [5, 1], [5, 2], [4, 2], [4, 3], [3, 3], [3, 1], [3, 4], [3, 6], [5, 6], [5, 4]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 5], [2, 5], [2, 6], [6, 6], [6, 5], [7, 5], [7, 2], [6, 2], [6, 1], [3, 2], [3, 5], [5, 5], [5, 2]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [12, 13, 14, 15]], convexity = 1); + } + multmatrix([[1, 0, 0, 28], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 5], [2, 5], [2, 6], [6, 6], [6, 5], [3, 5], [3, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + multmatrix([[1, 0, 0, 36], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 1], [1, 7], [3, 7], [3, 4], [4, 4], [4, 5], [6, 5], [6, 4], [5, 4], [5, 3], [6, 3], [6, 2], [7, 2], [7, 1], [5, 1], [5, 2], [4, 2], [4, 3], [3, 3], [3, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, 44], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[1, 1], [1, 2], [5, 2], [5, 3], [2, 3], [2, 4], [1, 4], [1, 5], [2, 5], [2, 6], [7, 6], [7, 5], [3, 5], [3, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]], convexity = 1); + } + multmatrix([[1, 0, 0, 52], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[3, 1], [3, 2], [5, 2], [5, 1], [3, 3], [3, 7], [5, 7], [5, 3]], paths = [[0, 1, 2, 3], [4, 5, 6, 7]], convexity = 1); + } + } + group() { + multmatrix([[1, 0, 0, -24], [0, 1, 0, -8], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + group() { + union() { + group() { + hull() { + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 1], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 1], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 2], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 2], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + union() { + group() { + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + } + } + } + } + multmatrix([[1, 0, 0, -16], [0, 1, 0, -8], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + group() { + union() { + group() { + hull() { + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 1], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 1], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + union() { + group() { + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + union() { + group() { + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + } + } + } + } + multmatrix([[1, 0, 0, -8], [0, 1, 0, -8], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + group() { + union() { + group() { + hull() { + multmatrix([[1, 0, 0, 2], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 2], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 1], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 1], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 2], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 2], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 7], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 7], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 6], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + hull() { + multmatrix([[1, 0, 0, 6], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + multmatrix([[1, 0, 0, 2], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 8, $fa = 12, $fs = 2, r = 0.125); + } + } + } + } + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + group() { + union() { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + group() { + group() { + multmatrix([[1, 0, 0, 0.25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 1.53081e-17], [0, 1, 0, 0.25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.25], [0, 1, 0, 3.06162e-17], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -4.59243e-17], [0, 1, 0, -0.25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [3, 2], [3, 5], [2, 5], [2, 6], [3, 6], [3, 7], [5, 7], [5, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]], convexity = 1); + } + } + } + } + } + } + } + } + } + } + multmatrix([[1, 0, 0, 8], [0, 1, 0, -16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + group() { + union() { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + group() { + group() { + multmatrix([[1, 0, 0, 0.25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 1.53081e-17], [0, 1, 0, 0.25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.25], [0, 1, 0, 3.06162e-17], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -4.59243e-17], [0, 1, 0, -0.25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[1, 1], [1, 2], [2, 2], [2, 3], [3, 3], [3, 4], [4, 4], [4, 5], [5, 5], [5, 6], [3, 6], [3, 5], [1, 5], [1, 6], [2, 6], [2, 7], [6, 7], [6, 6], [7, 6], [7, 5], [6, 5], [6, 4], [5, 4], [5, 3], [4, 3], [4, 2], [3, 2], [7, 2], [7, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]], convexity = 1); + } + } + } + } + } + } + } + } + } + } + multmatrix([[1, 0, 0, 16], [0, 1, 0, -16], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + group() { + union() { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + group() { + group() { + multmatrix([[1, 0, 0, 0.25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 1.53081e-17], [0, 1, 0, 0.25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.25], [0, 1, 0, 3.06162e-17], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, -4.59243e-17], [0, 1, 0, -0.25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + group() { + multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + group() { + polygon(points = [[2, 1], [2, 2], [1, 2], [1, 3], [3, 3], [3, 2], [5, 2], [5, 3], [4, 3], [4, 4], [3, 4], [3, 5], [4, 5], [4, 6], [1, 6], [1, 7], [7, 7], [7, 6], [6, 6], [6, 5], [5, 5], [5, 4], [6, 4], [6, 3], [7, 3], [7, 2], [6, 2], [6, 1]], paths = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]], convexity = 1); + } + } + } + } + } + } + } + } + } + } + } + diff --git a/tests/regression/echotest/search-tests-expected.txt b/tests/regression/echotest/search-tests-expected.txt new file mode 100644 index 0000000..64df0b6 --- /dev/null +++ b/tests/regression/echotest/search-tests-expected.txt @@ -0,0 +1,20 @@ + search term not found: "q" + search term not found: 1000 + search term not found: "zzz" + search term not found: "zzz" + search term not found: 500 + search term not found: "" +ECHO: "Characters in string (\"a\"): [0]" +ECHO: "Characters in string (\"adeq\"): [[0, 5], [3, 8], [4], []]" +ECHO: "Default string search (\"abe\"): [0, 1, 8]" +ECHO: "Return all matches for string search (\"abe\"): [[0, 4, 9, 10], [1, 5], [8]]" +ECHO: "Return up to 2 matches for string search (\"abe\"): [[0, 4], [1, 5], [8]]" +ECHO: "Return up to 2 matches for string search; alternate columns (\"aebe\"): [[0, 4], [8], [1, 5], [8]]" +ECHO: "Default number search (7): [5]" +ECHO: "Return all matches for number search (1): [0, 4, 10]" +ECHO: "Return up to 2 matches for number search (1): [0, 4]" +ECHO: "Default list number search ([1, 3, 1000]): [0, 1, []]" +ECHO: "Default list string search ([\"b\", \"zzz\", \"a\", \"c\", \"apple\", \"dog\"]): [1, [], 4, 2, 9, 3]" +ECHO: "Default list mixed search ([\"b\", 4, \"zzz\", \"c\", \"apple\", 500, \"a\", \"\"]): [1, 3, [], 2, 9, [], 4, []]" +ECHO: "Return all matches for mixed search ([\"b\", 4, \"zzz\", \"c\", \"apple\", 500, \"a\", \"\"]): [[1, 5], [3], [], [2, 6], [9], [], [4, 10], []]" +ECHO: "Return all matches for mixed search; alternate columns ([1, \"zz\", \"dog\", 500, 11]): [[0], [], [3], [], [10]]" diff --git a/tests/regression/echotest/vector-values-expected.txt b/tests/regression/echotest/vector-values-expected.txt new file mode 100644 index 0000000..7654892 --- /dev/null +++ b/tests/regression/echotest/vector-values-expected.txt @@ -0,0 +1,10 @@ +ECHO: "Testing vector dot product: 14" +ECHO: " Bounds check: undef" +ECHO: "Testing matrix * vector: [3, 2]" +ECHO: " Bounds check: undef" +ECHO: "Testing vector * matrix: [2, -1, 0]" +ECHO: " Bounds check: undef" +ECHO: "Testing id matrix * id matrix: [[1, 0], [0, 1]]" +ECHO: "Testing asymmetric matrix * matrix: [[2, 1], [-1, 0]]" +ECHO: "Testing alternate asymmetric matrix * matrix: [[1, 0, 1], [0, 1, -1], [1, 1, 0]]" +ECHO: " Bounds check: undef" diff --git a/tests/regression/opencsgtest/example023-expected.png b/tests/regression/opencsgtest/example023-expected.png Binary files differnew file mode 100644 index 0000000..a097d99 --- /dev/null +++ b/tests/regression/opencsgtest/example023-expected.png diff --git a/tests/regression/opencsgtest/projection-tests-expected.png b/tests/regression/opencsgtest/projection-tests-expected.png Binary files differindex 8239d3d..98e12e2 100644 --- a/tests/regression/opencsgtest/projection-tests-expected.png +++ b/tests/regression/opencsgtest/projection-tests-expected.png diff --git a/tests/regression/opencsgtest/scale2D-tests-expected.png b/tests/regression/opencsgtest/scale2D-tests-expected.png Binary files differnew file mode 100644 index 0000000..515265b --- /dev/null +++ b/tests/regression/opencsgtest/scale2D-tests-expected.png diff --git a/tests/regression/opencsgtest/scale3D-tests-expected.png b/tests/regression/opencsgtest/scale3D-tests-expected.png Binary files differnew file mode 100644 index 0000000..7401b99 --- /dev/null +++ b/tests/regression/opencsgtest/scale3D-tests-expected.png diff --git a/tests/regression/opencsgtest/text-search-test-expected.png b/tests/regression/opencsgtest/text-search-test-expected.png Binary files differnew file mode 100644 index 0000000..eadd61e --- /dev/null +++ b/tests/regression/opencsgtest/text-search-test-expected.png diff --git a/tests/regression/throwntogethertest/example023-expected.png b/tests/regression/throwntogethertest/example023-expected.png Binary files differnew file mode 100644 index 0000000..a097d99 --- /dev/null +++ b/tests/regression/throwntogethertest/example023-expected.png diff --git a/tests/regression/throwntogethertest/projection-tests-expected.png b/tests/regression/throwntogethertest/projection-tests-expected.png Binary files differindex 7bcb888..08c2998 100644 --- a/tests/regression/throwntogethertest/projection-tests-expected.png +++ b/tests/regression/throwntogethertest/projection-tests-expected.png diff --git a/tests/regression/throwntogethertest/scale2D-tests-expected.png b/tests/regression/throwntogethertest/scale2D-tests-expected.png Binary files differnew file mode 100644 index 0000000..515265b --- /dev/null +++ b/tests/regression/throwntogethertest/scale2D-tests-expected.png diff --git a/tests/regression/throwntogethertest/scale3D-tests-expected.png b/tests/regression/throwntogethertest/scale3D-tests-expected.png Binary files differnew file mode 100644 index 0000000..7401b99 --- /dev/null +++ b/tests/regression/throwntogethertest/scale3D-tests-expected.png diff --git a/tests/regression/throwntogethertest/text-search-test-expected.png b/tests/regression/throwntogethertest/text-search-test-expected.png Binary files differnew file mode 100644 index 0000000..eadd61e --- /dev/null +++ b/tests/regression/throwntogethertest/text-search-test-expected.png diff --git a/tests/tests-common.cc b/tests/tests-common.cc index 1694a74..5b0cc3b 100644 --- a/tests/tests-common.cc +++ b/tests/tests-common.cc @@ -7,9 +7,9 @@ #include <QFileInfo> #include <sstream> -AbstractModule *parsefile(const char *filename) +Module *parsefile(const char *filename) { - AbstractModule *root_module = NULL; + Module *root_module = NULL; QFileInfo fileInfo(filename); handle_dep(filename); @@ -27,6 +27,9 @@ AbstractModule *parsefile(const char *filename) fclose(fp); text << "\n" << commandline_commands; root_module = parse(text.str().c_str(), fileInfo.absolutePath().toLocal8Bit(), false); + if (root_module) { + root_module->handleDependencies(); + } } return root_module; } diff --git a/tests/tests-common.h b/tests/tests-common.h index 92ebc78..0047562 100644 --- a/tests/tests-common.h +++ b/tests/tests-common.h @@ -1,6 +1,6 @@ #ifndef TESTS_COMMON_H_ #define TESTS_COMMON_H_ -class AbstractModule *parsefile(const char *filename); +class Module *parsefile(const char *filename); #endif |