From 3eda281be13dfe9eb8fcbc9fb82e75e74d107e01 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Fri, 20 Sep 2013 00:19:09 -0500 Subject: allow openscad binary to be compiled with or without QT. use non-QT for tests. diff --git a/src/MainWindow.h b/src/MainWindow.h index 79e2080..46a2996 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -54,11 +54,12 @@ public: std::vector > background_terms; CSGChain *background_chain; QString last_compiled_doc; + QString qexamplesdir; static const int maxRecentFiles = 10; QAction *actionRecentFile[maxRecentFiles]; - MainWindow(const QString &filename); + MainWindow(const QString &filename, const QString &examplesdir); ~MainWindow(); protected: diff --git a/src/PlatformUtils.cc b/src/PlatformUtils.cc index a64162c..f731a9a 100644 --- a/src/PlatformUtils.cc +++ b/src/PlatformUtils.cc @@ -40,11 +40,12 @@ std::string PlatformUtils::libraryPath() } #include "version_check.h" -#include "cgal.h" -#include #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) +#ifdef ENABLE_CGAL +#include "cgal.h" +#include #if defined(__GNUG__) #define GCC_INT_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 ) #if GCC_INT_VERSION > 40600 || defined(__clang__) @@ -52,6 +53,7 @@ std::string PlatformUtils::libraryPath() #define __openscad_info_demangle__ 1 #endif // GCC_INT_VERSION #endif // GNUG +#endif // ENABLE_CGAL std::string PlatformUtils::info() { @@ -79,6 +81,13 @@ std::string PlatformUtils::info() #define OPENCSG_VERSION_STRING "unknown, <1.3.2" #endif +#ifdef QT_VERSION + std::string qtVersion = qVersion(); +#else + std::string qtVersion = "Qt disabled"; +#endif + +#ifdef ENABLE_CGAL std::string cgal_3d_kernel = typeid(CGAL_Kernel3).name(); std::string cgal_2d_kernel = typeid(CGAL_Kernel2).name(); std::string cgal_2d_kernelEx = typeid(CGAL_ExactKernel2).name(); @@ -87,10 +96,15 @@ std::string PlatformUtils::info() cgal_3d_kernel = std::string( abi::__cxa_demangle( cgal_3d_kernel.c_str(), 0, 0, &status ) ); cgal_2d_kernel = std::string( abi::__cxa_demangle( cgal_2d_kernel.c_str(), 0, 0, &status ) ); cgal_2d_kernelEx = std::string( abi::__cxa_demangle( cgal_2d_kernelEx.c_str(), 0, 0, &status ) ); -#endif +#endif // demangle boost::replace_all( cgal_3d_kernel, "CGAL::", "" ); boost::replace_all( cgal_2d_kernel, "CGAL::", "" ); boost::replace_all( cgal_2d_kernelEx, "CGAL::", "" ); +#else // ENABLE_CGAL + std::string cgal_3d_kernel = ""; + std::string cgal_2d_kernel = ""; + std::string cgal_2d_kernelEx = ""; +#endif // ENABLE_CGAL s << "OpenSCAD Version: " << TOSTRING(OPENSCAD_VERSION) << "\nCompiler: " << compiler_info @@ -99,7 +113,7 @@ std::string PlatformUtils::info() << "\nEigen version: " << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION << "\nCGAL version, kernels: " << TOSTRING(CGAL_VERSION) << ", " << cgal_3d_kernel << ", " << cgal_2d_kernel << ", " << cgal_2d_kernelEx << "\nOpenCSG version: " << OPENCSG_VERSION_STRING - << "\nQt version: " << qVersion() + << "\nQt version: " << qtVersion << "\nMingW build: " << mingwstatus ; return s.str(); diff --git a/src/mainwin.cc b/src/mainwin.cc index fd1c552..ea7da66 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -27,7 +27,6 @@ #include "PolySetCache.h" #include "ModuleCache.h" #include "MainWindow.h" -#include "openscad.h" // examplesdir #include "parsersettings.h" #include "Preferences.h" #include "printutils.h" @@ -103,8 +102,6 @@ #include "boosty.h" -extern QString examplesdir; - // Global application state unsigned int GuiLocker::gui_locked = 0; @@ -156,7 +153,7 @@ settings_valueList(const QString &key, const QList &defaultList = QListqexamplesdir = examplesdir; this->openglbox = NULL; root_module = NULL; absolute_root_node = NULL; @@ -253,10 +251,9 @@ MainWindow::MainWindow(const QString &filename) this->menuOpenRecent->addAction(this->fileActionClearRecent); connect(this->fileActionClearRecent, SIGNAL(triggered()), this, SLOT(clearRecentFiles())); - - if (!examplesdir.isEmpty()) { + if (!qexamplesdir.isEmpty()) { bool found_example = false; - QStringList examples = QDir(examplesdir).entryList(QStringList("*.scad"), + QStringList examples = QDir(qexamplesdir).entryList(QStringList("*.scad"), QDir::Files | QDir::Readable, QDir::Name); foreach (const QString &ex, examples) { this->menuExamples->addAction(ex, this, SLOT(actionOpenExample())); @@ -985,7 +982,7 @@ void MainWindow::actionOpenExample() { QAction *action = qobject_cast(sender()); if (action) { - openFile(examplesdir + QDir::separator() + action->text()); + openFile(qexamplesdir + QDir::separator() + action->text()); } } diff --git a/src/openscad.cc b/src/openscad.cc index fb5ee44..a8e71b1 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -25,7 +25,6 @@ */ #include "openscad.h" -#include "MainWindow.h" #include "node.h" #include "module.h" #include "modcontext.h" @@ -53,12 +52,9 @@ #include "CSGTermEvaluator.h" #include "CsgInfo.h" -#include -#include -#include #include -#ifdef Q_WS_MAC +#ifdef __APPLE__ #include "EventFilter.h" #include "AppleEvents.h" #ifdef OPENSCAD_DEPLOY @@ -79,6 +75,13 @@ namespace po = boost::program_options; namespace fs = boost::filesystem; +namespace Render { enum type { CGAL, OPENCSG, THROWNTOGETHER }; }; +std::string commandline_commands; +std::string currentdir; +using std::string; +using std::vector; +using boost::lexical_cast; +using boost::is_any_of; static void help(const char *progname) { @@ -119,15 +122,6 @@ static void info() exit(0); } -std::string commandline_commands; -std::string currentdir; -QString examplesdir; - -using std::string; -using std::vector; -using boost::lexical_cast; -using boost::is_any_of; - Camera get_camera( po::variables_map vm ) { Camera camera; @@ -182,17 +176,250 @@ Camera get_camera( po::variables_map vm ) return camera; } -int main(int argc, char **argv) +int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer ) { - int rc = 0; + Tree tree; +#ifdef ENABLE_CGAL + CGALEvaluator cgalevaluator(tree); + PolySetCGALEvaluator psevaluator(cgalevaluator); +#endif + const char *stl_output_file = NULL; + const char *off_output_file = NULL; + const char *dxf_output_file = NULL; + const char *csg_output_file = NULL; + const char *png_output_file = NULL; + const char *ast_output_file = NULL; + const char *term_output_file = NULL; + bool null_output = false; + + std::string suffix = boosty::extension_str( output_file ); + boost::algorithm::to_lower( suffix ); + + if (suffix == ".stl") stl_output_file = output_file; + else if (suffix == ".off") off_output_file = output_file; + else if (suffix == ".dxf") dxf_output_file = output_file; + else if (suffix == ".csg") csg_output_file = output_file; + else if (suffix == ".png") png_output_file = output_file; + else if (suffix == ".ast") ast_output_file = output_file; + else if (suffix == ".term") term_output_file = output_file; + else if (strcmp(output_file, "null") == 0) null_output = true; + else { + fprintf(stderr, "Unknown suffix for output file %s\n", output_file); + return 1; + } + + // Top context - this context only holds builtins + ModuleContext top_ctx; + top_ctx.registerBuiltin(); +#if 0 && DEBUG + top_ctx.dump(NULL, NULL); +#endif + FileModule *root_module; + ModuleInstantiation root_inst("group"); + AbstractNode *root_node; + AbstractNode *absolute_root_node; + CGAL_Nef_polyhedron root_N; + + handle_dep(filename); + + std::ifstream ifs(filename); + if (!ifs.is_open()) { + fprintf(stderr, "Can't open input file '%s'!\n", filename); + return 1; + } + std::string text((std::istreambuf_iterator(ifs)), std::istreambuf_iterator()); + text += "\n" + commandline_commands; + fs::path abspath = boosty::absolute(filename); + std::string parentpath = boosty::stringy(abspath.parent_path()); + root_module = parse(text.c_str(), parentpath.c_str(), false); + if (!root_module) { + fprintf(stderr, "Can't parse file '%s'!\n", filename); + return 1; + } + root_module->handleDependencies(); + + fs::path fpath = boosty::absolute(fs::path(filename)); + fs::path fparent = fpath.parent_path(); + fs::current_path(fparent); + top_ctx.setDocumentPath(fparent.string()); + + AbstractNode::resetIndexCounter(); + absolute_root_node = root_module->instantiate(&top_ctx, &root_inst, NULL); + + // Do we have an explicit root node (! modifier)? + if (!(root_node = find_root_tag(absolute_root_node))) + root_node = absolute_root_node; + + tree.setRoot(root_node); + + if (csg_output_file) { + fs::current_path(original_path); + std::ofstream fstream(csg_output_file); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", csg_output_file); + } + else { + fs::current_path(fparent); // Force exported filenames to be relative to document path + fstream << tree.getString(*root_node) << "\n"; + fstream.close(); + } + } + else if (ast_output_file) { + fs::current_path(original_path); + std::ofstream fstream(ast_output_file); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", ast_output_file); + } + else { + fs::current_path(fparent); // Force exported filenames to be relative to document path + fstream << root_module->dump("", "") << "\n"; + fstream.close(); + } + } + else if (term_output_file) { + std::vector > highlight_terms; + std::vector > background_terms; + + CSGTermEvaluator csgRenderer(tree, &psevaluator); + shared_ptr root_raw_term = csgRenderer.evaluateCSGTerm(*root_node, highlight_terms, background_terms); + + fs::current_path(original_path); + std::ofstream fstream(term_output_file); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", term_output_file); + } + else { + if (!root_raw_term) + fstream << "No top-level CSG object\n"; + else { + fstream << root_raw_term->dump() << "\n"; + } + fstream.close(); + } + } + else { #ifdef ENABLE_CGAL - // Causes CGAL errors to abort directly instead of throwing exceptions - // (which we don't catch). This gives us stack traces without rerunning in gdb. - CGAL::set_error_behaviour(CGAL::ABORT); + if ((null_output || png_output_file) && !(renderer==Render::CGAL)) { + // null output or OpenCSG png -> don't necessarily need CGALMesh evaluation + } else { + root_N = cgalevaluator.evaluateCGALMesh(*tree.root()); + } + + fs::current_path(original_path); + + if (deps_output_file) { + std::string deps_out( deps_output_file ); + std::string geom_out; + if ( stl_output_file ) geom_out = std::string(stl_output_file); + else if ( off_output_file ) geom_out = std::string(off_output_file); + else if ( dxf_output_file ) geom_out = std::string(dxf_output_file); + else if ( png_output_file ) geom_out = std::string(png_output_file); + else { + PRINTB("Output file:%s\n",output_file); + PRINT("Sorry, don't know how to write deps for that file type. Exiting\n"); + return 1; + } + int result = write_deps( deps_out, geom_out ); + if ( !result ) { + PRINT("error writing deps"); + return 1; + } + } + + if (stl_output_file) { + if (root_N.dim != 3) { + fprintf(stderr, "Current top level object is not a 3D object.\n"); + return 1; + } + if (!root_N.p3->is_simple()) { + fprintf(stderr, "Object isn't a valid 2-manifold! Modify your design.\n"); + return 1; + } + std::ofstream fstream(stl_output_file); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", stl_output_file); + } + else { + export_stl(&root_N, fstream); + fstream.close(); + } + } + + if (off_output_file) { + if (root_N.dim != 3) { + fprintf(stderr, "Current top level object is not a 3D object.\n"); + return 1; + } + if (!root_N.p3->is_simple()) { + fprintf(stderr, "Object isn't a valid 2-manifold! Modify your design.\n"); + return 1; + } + std::ofstream fstream(off_output_file); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", off_output_file); + } + else { + export_off(&root_N, fstream); + fstream.close(); + } + } + + if (dxf_output_file) { + if (root_N.dim != 2) { + fprintf(stderr, "Current top level object is not a 2D object.\n"); + return 1; + } + std::ofstream fstream(dxf_output_file); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", dxf_output_file); + } + else { + export_dxf(&root_N, fstream); + fstream.close(); + } + } + + if (png_output_file) { + std::ofstream fstream(png_output_file,std::ios::out|std::ios::binary); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", png_output_file); + } + else { + if (renderer==Render::CGAL) { + export_png_with_cgal(&root_N, camera, fstream); + } else if (renderer==Render::THROWNTOGETHER) { + export_png_with_throwntogether(tree, camera, fstream); + } else { + export_png_with_opencsg(tree, camera, fstream); + } + fstream.close(); + } + } +#else + fprintf(stderr, "OpenSCAD has been compiled without CGAL support!\n"); + return 1; #endif - Builtins::instance()->initialize(); + } + delete root_node; + return 0; +} +#ifdef OPENSCAD_TESTING +#undef OPENSCAD_QTGUI +#else +#define OPENSCAD_QTGUI 1 +#endif + + +#ifdef OPENSCAD_QTGUI +#include "MainWindow.h" +#include +#include +#include + +bool QtUseGUI() +{ #ifdef Q_WS_X11 // see : // On X11, the window system is initialized if GUIenabled is true. If GUIenabled @@ -203,18 +430,101 @@ int main(int argc, char **argv) #else bool useGUI = true; #endif - QApplication app(argc, argv, useGUI); + return useGUI; +} + +int gui(const char * filename,int argc, char ** argv) +{ + QApplication app(argc, argv, true); //useGUI); #ifdef Q_WS_MAC app.installEventFilter(new EventFilter(&app)); #endif - fs::path original_path = fs::current_path(); - // set up groups for QSettings QCoreApplication::setOrganizationName("OpenSCAD"); QCoreApplication::setOrganizationDomain("openscad.org"); QCoreApplication::setApplicationName("OpenSCAD"); QCoreApplication::setApplicationVersion(TOSTRING(OPENSCAD_VERSION)); + QDir exdir(QApplication::instance()->applicationDirPath()); + QString qexamplesdir; +#ifdef Q_WS_MAC + exdir.cd("../Resources"); // Examples can be bundled + if (!exdir.exists("examples")) exdir.cd("../../.."); +#elif defined(Q_OS_UNIX) + if (exdir.cd("../share/openscad/examples")) { + qexamplesdir = exdir.path(); + } else + if (exdir.cd("../../share/openscad/examples")) { + qexamplesdir = exdir.path(); + } else + if (exdir.cd("../../examples")) { + qexamplesdir = exdir.path(); + } else +#endif + if (exdir.cd("examples")) { + qexamplesdir = exdir.path(); + } + + parser_init(QApplication::instance()->applicationDirPath().toLocal8Bit().constData()); + +#ifdef Q_WS_MAC + installAppleEventHandlers(); +#endif + +#if defined(OPENSCAD_DEPLOY) && defined(Q_WS_MAC) + AutoUpdater *updater = new SparkleAutoUpdater; + AutoUpdater::setUpdater(updater); + if (updater->automaticallyChecksForUpdates()) updater->checkForUpdates(); +#endif + + QString qfilename; + if (filename) qfilename = QString::fromLocal8Bit(boosty::stringy(boosty::absolute(filename)).c_str()); + +#if 0 /*** disabled by clifford wolf: adds rendering artefacts with OpenCSG ***/ + // turn on anti-aliasing + QGLFormat f; + f.setSampleBuffers(true); + f.setSamples(4); + QGLFormat::setDefaultFormat(f); +#endif +#ifdef ENABLE_MDI + new MainWindow(qfilename,qexamplesdir); + vector inputFiles; + if (vm.count("input-file")) { + inputFiles = vm["input-file"].as >(); + for (vector::const_iterator infile = inputFiles.begin()+1; infile != inputFiles.end(); infile++) { + new MainWindow(QString::fromLocal8Bit(boosty::stringy(original_path / *infile).c_str())); + } + } + app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); +#else + MainWindow *m = new MainWindow(qfilename,qexamplesdir); + app.connect(m, SIGNAL(destroyed()), &app, SLOT(quit())); +#endif + return app.exec(); +} +#else // OPENSCAD_QTGUI +bool QtUseGUI() { return false; } +int gui(const char * filename,int argc, char ** argv) +{ + fprintf(stderr,"Error: compiled without QT, but trying to run GUI\n"); + return 1; +} +#endif // OPENSCAD_QTGUI + +int main(int argc, char **argv) +{ + int rc = 0; + +#ifdef ENABLE_CGAL + // Causes CGAL errors to abort directly instead of throwing exceptions + // (which we don't catch). This gives us stack traces without rerunning in gdb. + CGAL::set_error_behaviour(CGAL::ABORT); +#endif + Builtins::instance()->initialize(); + + fs::path original_path = fs::current_path(); + const char *filename = NULL; const char *output_file = NULL; const char *deps_output_file = NULL; @@ -259,6 +569,13 @@ int main(int argc, char **argv) if (vm.count("version")) version(); if (vm.count("info")) info(); + Render::type renderer = Render::OPENCSG; + if (vm.count("render")) + renderer = Render::CGAL; + if (vm.count("preview")) + if (vm["preview"].as() == "throwntogether") + renderer = Render::THROWNTOGETHER; + if (vm.count("o")) { // FIXME: Allow for multiple output files? if (output_file) help(argv[0]); @@ -306,297 +623,23 @@ int main(int argc, char **argv) Camera camera = get_camera( vm ); - QDir exdir(QApplication::instance()->applicationDirPath()); -#ifdef Q_WS_MAC - exdir.cd("../Resources"); // Examples can be bundled - if (!exdir.exists("examples")) exdir.cd("../../.."); -#elif defined(Q_OS_UNIX) - if (exdir.cd("../share/openscad/examples")) { - examplesdir = exdir.path(); - } else - if (exdir.cd("../../share/openscad/examples")) { - examplesdir = exdir.path(); - } else - if (exdir.cd("../../examples")) { - examplesdir = exdir.path(); - } else -#endif - if (exdir.cd("examples")) { - examplesdir = exdir.path(); - } - - parser_init(QApplication::instance()->applicationDirPath().toLocal8Bit().constData()); - // Initialize global visitors NodeCache nodecache; NodeDumper dumper(nodecache); - Tree tree; -#ifdef ENABLE_CGAL - CGALEvaluator cgalevaluator(tree); - PolySetCGALEvaluator psevaluator(cgalevaluator); -#endif if (output_file) { - const char *stl_output_file = NULL; - const char *off_output_file = NULL; - const char *dxf_output_file = NULL; - const char *csg_output_file = NULL; - const char *png_output_file = NULL; - const char *ast_output_file = NULL; - const char *term_output_file = NULL; - bool null_output = false; - - QString suffix = QFileInfo(output_file).suffix().toLower(); - if (suffix == "stl") stl_output_file = output_file; - else if (suffix == "off") off_output_file = output_file; - else if (suffix == "dxf") dxf_output_file = output_file; - else if (suffix == "csg") csg_output_file = output_file; - else if (suffix == "png") png_output_file = output_file; - else if (suffix == "ast") ast_output_file = output_file; - else if (suffix == "term") term_output_file = output_file; - else if (strcmp(output_file, "null") == 0) null_output = true; - else { - fprintf(stderr, "Unknown suffix for output file %s\n", output_file); - exit(1); - } - if (!filename) help(argv[0]); - - // Top context - this context only holds builtins - ModuleContext top_ctx; - top_ctx.registerBuiltin(); -#if 0 && DEBUG - top_ctx.dump(NULL, NULL); -#endif - - FileModule *root_module; - ModuleInstantiation root_inst("group"); - AbstractNode *root_node; - AbstractNode *absolute_root_node; - CGAL_Nef_polyhedron root_N; - - handle_dep(filename); - - std::ifstream ifs(filename); - if (!ifs.is_open()) { - fprintf(stderr, "Can't open input file '%s'!\n", filename); - exit(1); - } - std::string text((std::istreambuf_iterator(ifs)), std::istreambuf_iterator()); - text += "\n" + commandline_commands; - fs::path abspath = boosty::absolute(filename); - std::string parentpath = boosty::stringy(abspath.parent_path()); - root_module = parse(text.c_str(), parentpath.c_str(), false); - if (!root_module) exit(1); - root_module->handleDependencies(); - - fs::path fpath = boosty::absolute(fs::path(filename)); - fs::path fparent = fpath.parent_path(); - fs::current_path(fparent); - top_ctx.setDocumentPath(fparent.string()); - - AbstractNode::resetIndexCounter(); - absolute_root_node = root_module->instantiate(&top_ctx, &root_inst, NULL); - - // Do we have an explicit root node (! modifier)? - if (!(root_node = find_root_tag(absolute_root_node))) - root_node = absolute_root_node; - - tree.setRoot(root_node); - - if (csg_output_file) { - fs::current_path(original_path); - std::ofstream fstream(csg_output_file); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", csg_output_file); - } - else { - fs::current_path(fparent); // Force exported filenames to be relative to document path - fstream << tree.getString(*root_node) << "\n"; - fstream.close(); - } - } - else if (ast_output_file) { - fs::current_path(original_path); - std::ofstream fstream(ast_output_file); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", ast_output_file); - } - else { - fs::current_path(fparent); // Force exported filenames to be relative to document path - fstream << root_module->dump("", "") << "\n"; - fstream.close(); - } - } - else if (term_output_file) { - std::vector > highlight_terms; - std::vector > background_terms; - - CSGTermEvaluator csgrenderer(tree, &psevaluator); - shared_ptr root_raw_term = csgrenderer.evaluateCSGTerm(*root_node, highlight_terms, background_terms); - - fs::current_path(original_path); - std::ofstream fstream(term_output_file); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", term_output_file); - } - else { - if (!root_raw_term) - fstream << "No top-level CSG object\n"; - else { - fstream << root_raw_term->dump() << "\n"; - } - fstream.close(); - } - } - else { -#ifdef ENABLE_CGAL - if ((null_output || png_output_file) && !vm.count("render")) { - // null output or OpenCSG png -> don't necessarily need CGALMesh evaluation - } else { - root_N = cgalevaluator.evaluateCGALMesh(*tree.root()); - } - - fs::current_path(original_path); - - if (deps_output_file) { - std::string deps_out( deps_output_file ); - std::string geom_out; - if ( stl_output_file ) geom_out = std::string(stl_output_file); - else if ( off_output_file ) geom_out = std::string(off_output_file); - else if ( dxf_output_file ) geom_out = std::string(dxf_output_file); - else if ( png_output_file ) geom_out = std::string(png_output_file); - else { - PRINTB("Output file:%s\n",output_file); - PRINT("Sorry, don't know how to write deps for that file type. Exiting\n"); - exit(1); - } - int result = write_deps( deps_out, geom_out ); - if ( !result ) { - PRINT("error writing deps"); - exit(1); - } - } - - if (stl_output_file) { - if (root_N.dim != 3) { - fprintf(stderr, "Current top level object is not a 3D object.\n"); - exit(1); - } - if (!root_N.p3->is_simple()) { - fprintf(stderr, "Object isn't a valid 2-manifold! Modify your design.\n"); - exit(1); - } - std::ofstream fstream(stl_output_file); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", stl_output_file); - } - else { - export_stl(&root_N, fstream); - fstream.close(); - } - } - - if (off_output_file) { - if (root_N.dim != 3) { - fprintf(stderr, "Current top level object is not a 3D object.\n"); - exit(1); - } - if (!root_N.p3->is_simple()) { - fprintf(stderr, "Object isn't a valid 2-manifold! Modify your design.\n"); - exit(1); - } - std::ofstream fstream(off_output_file); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", off_output_file); - } - else { - export_off(&root_N, fstream); - fstream.close(); - } - } - - if (dxf_output_file) { - if (root_N.dim != 2) { - fprintf(stderr, "Current top level object is not a 2D object.\n"); - exit(1); - } - std::ofstream fstream(dxf_output_file); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", dxf_output_file); - } - else { - export_dxf(&root_N, fstream); - fstream.close(); - } - } - - if (png_output_file) { - std::ofstream fstream(png_output_file,std::ios::out|std::ios::binary); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", png_output_file); - } - else { - if (vm.count("render")) { - export_png_with_cgal(&root_N, camera, fstream); - } else if (vm.count("preview") && vm["preview"].as() == "throwntogether" ) { - export_png_with_throwntogether(tree, camera, fstream); - } else { - export_png_with_opencsg(tree, camera, fstream); - } - fstream.close(); - } - } -#else - fprintf(stderr, "OpenSCAD has been compiled without CGAL support!\n"); - exit(1); -#endif - } - delete root_node; + rc = cmdline( deps_output_file, filename, camera, output_file, original_path, renderer ); } - else if (useGUI) + else if (QtUseGUI()) { -#ifdef Q_WS_MAC - installAppleEventHandlers(); -#endif - -#if defined(OPENSCAD_DEPLOY) && defined(Q_WS_MAC) - AutoUpdater *updater = new SparkleAutoUpdater; - AutoUpdater::setUpdater(updater); - if (updater->automaticallyChecksForUpdates()) updater->checkForUpdates(); -#endif - - QString qfilename; - if (filename) qfilename = QString::fromLocal8Bit(boosty::stringy(boosty::absolute(filename)).c_str()); - -#if 0 /*** disabled by clifford wolf: adds rendering artefacts with OpenCSG ***/ - // turn on anti-aliasing - QGLFormat f; - f.setSampleBuffers(true); - f.setSamples(4); - QGLFormat::setDefaultFormat(f); -#endif -#ifdef ENABLE_MDI - new MainWindow(qfilename); - vector inputFiles; - if (vm.count("input-file")) { - inputFiles = vm["input-file"].as >(); - for (vector::const_iterator infile = inputFiles.begin()+1; infile != inputFiles.end(); infile++) { - new MainWindow(QString::fromLocal8Bit(boosty::stringy(original_path / *infile).c_str())); - } - } - app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); -#else - MainWindow *m = new MainWindow(qfilename); - app.connect(m, SIGNAL(destroyed()), &app, SLOT(quit())); -#endif - rc = app.exec(); + rc = gui(filename,argc,argv); } else { fprintf(stderr, "Requested GUI mode but can't open display!\n"); - exit(1); + return 1; } Builtins::instance(true); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index babd0a0..67870b3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -412,6 +412,25 @@ include_directories(../src) add_definitions(-DOPENSCAD_VERSION=test -DOPENSCAD_YEAR=2011 -DOPENSCAD_MONTH=10) add_definitions(-DOPENSCAD_TESTING) +# Platform specific settings + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + message(STATUS "Offscreen OpenGL Context - using Apple CGL") + set(OFFSCREEN_CTX_SOURCE "OffscreenContextCGL.mm" CACHE TYPE STRING) + set(OFFSCREEN_IMGUTILS_SOURCE "imageutils-macosx.cc" CACHE TYPE STRING) + set(PLATFORMUTILS_SOURCE "PlatformUtils-mac.mm" CACHE TYPE STRING) +elseif(UNIX) + message(STATUS "Offscreen OpenGL Context - using Unix GLX") + set(OFFSCREEN_CTX_SOURCE "OffscreenContextGLX.cc" CACHE TYPE STRING) + set(OFFSCREEN_IMGUTILS_SOURCE "imageutils-lodepng.cc" CACHE TYPE STRING) + set(PLATFORMUTILS_SOURCE "PlatformUtils-posix.cc" CACHE TYPE STRING) +elseif(WIN32) + message(STATUS "Offscreen OpenGL Context - using Microsoft WGL") + set(OFFSCREEN_CTX_SOURCE "OffscreenContextWGL.cc" CACHE TYPE STRING) + set(OFFSCREEN_IMGUTILS_SOURCE "imageutils-lodepng.cc" CACHE TYPE STRING) + set(PLATFORMUTILS_SOURCE "PlatformUtils-win.cc" CACHE TYPE STRING) +endif() + set(CORE_SOURCES tests-common.cc ../src/parsersettings.cc @@ -440,6 +459,7 @@ set(CORE_SOURCES ../src/surface.cc ../src/control.cc ../src/render.cc + ../src/rendersettings.cc ../src/dxfdata.cc ../src/dxfdim.cc ../src/linearextrude.cc @@ -455,11 +475,11 @@ set(NOCGAL_SOURCES ../src/builtin.cc ../src/dxftess.cc ../src/import.cc - ../src/export.cc) + ../src/export.cc) set(CGAL_SOURCES ${NOCGAL_SOURCES} - ../src/CSGTermEvaluator.cc + ../src/CSGTermEvaluator.cc ../src/CGAL_Nef_polyhedron.cc ../src/cgalutils.cc ../src/CGALEvaluator.cc @@ -474,25 +494,15 @@ set(COMMON_SOURCES ../src/traverser.cc ../src/PolySetEvaluator.cc ../src/PolySetCache.cc + ../src/PlatformUtils.cc + ../src/${PLATFORMUTILS_SOURCE} + ../src/PlatformUtils.cc ../src/Tree.cc ../src/lodepng.cpp) # # Offscreen OpenGL context source code # -if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - message(STATUS "Offscreen OpenGL Context - using Apple CGL") - set(OFFSCREEN_CTX_SOURCE "OffscreenContextCGL.mm" CACHE TYPE STRING) - set(OFFSCREEN_IMGUTILS_SOURCE "imageutils-macosx.cc" CACHE TYPE STRING) -elseif(UNIX) - message(STATUS "Offscreen OpenGL Context - using Unix GLX") - set(OFFSCREEN_CTX_SOURCE "OffscreenContextGLX.cc" CACHE TYPE STRING) - set(OFFSCREEN_IMGUTILS_SOURCE "imageutils-lodepng.cc" CACHE TYPE STRING) -elseif(WIN32) - message(STATUS "Offscreen OpenGL Context - using Microsoft WGL") - set(OFFSCREEN_CTX_SOURCE "OffscreenContextWGL.cc" CACHE TYPE STRING) - set(OFFSCREEN_IMGUTILS_SOURCE "imageutils-lodepng.cc" CACHE TYPE STRING) -endif() set(OFFSCREEN_SOURCES ../src/GLView.cc @@ -501,7 +511,13 @@ set(OFFSCREEN_SOURCES ../src/${OFFSCREEN_IMGUTILS_SOURCE} ../src/imageutils.cc ../src/fbo.cc - ../src/system-gl.cc) + ../src/system-gl.cc + ../src/export_png.cc + ../src/CGALRenderer.cc + ../src/ThrownTogetherRenderer.cc + ../src/renderer.cc + ../src/render.cc + ../src/OpenCSGRenderer.cc) add_library(tests-core STATIC ${CORE_SOURCES}) target_link_libraries(tests-core ${OPENGL_LIBRARIES}) @@ -518,14 +534,14 @@ set(TESTS-CGAL-LIBRARIES ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${GMP_LIBRA add_library(tests-nocgal STATIC ${NOCGAL_SOURCES}) target_link_libraries(tests-nocgal tests-common) add_library(tests-offscreen STATIC ${OFFSCREEN_SOURCES}) -# set_target_properties(tests-offscreen PROPERTIES COMPILE_FLAGS "-DENABLE_OPENCSG -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") +set_target_properties(tests-offscreen PROPERTIES COMPILE_FLAGS "-DENABLE_OPENCSG -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") set(TESTS-NOCGAL-LIBRARIES ${TESTS-CORE-LIBRARIES}) # # modulecachetest # add_executable(modulecachetest modulecachetest.cc) -target_link_libraries(modulecachetest tests-nocgal ${TESTS-NOCGAL-LIBRARIES}) +target_link_libraries(modulecachetest tests-nocgal ${TESTS-NOCGAL-LIBRARIES} ${Boost_LIBRARIES}) # # csgtexttest @@ -541,27 +557,40 @@ set_target_properties(cgalcachetest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CG target_link_libraries(cgalcachetest tests-cgal ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY}) # -# GUI binary tests +# openscad no-qt # -if(APPLE) - set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../OpenSCAD.app/Contents/MacOS/OpenSCAD") -elseif (MINGW_CROSS_ENV_DIR) - set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../mingw32/release/openscad.exe") -elseif(WIN32) - set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../Release/openscad.exe") -else() - set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../openscad") -endif() +add_executable(openscad ../src/openscad.cc) +set_target_properties(openscad PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -DEIGEN_DONT_ALIGN -DENABLE_CGAL -DENABLE_OPENCSG ${CGAL_CXX_FLAGS_INIT}") +target_link_libraries(openscad tests-offscreen tests-cgal tests-nocgal ${TESTS-CORE-LIBRARIES} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${Boost_LIBRARIES} ${OPENCSG_LIBRARY} ${COCOA_LIBRARY} ) -if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/openscad") - set(GUI_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad") -endif() - -if(EXISTS "${GUI_BINPATH}") - message(STATUS "Found OpenSCAD GUI binary: ${GUI_BINPATH}") +# +# GUI binary tests +# +#if(APPLE) +# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../OpenSCAD.app/Contents/MacOS/OpenSCAD") +#elseif (MINGW_CROSS_ENV_DIR) +# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../mingw32/release/openscad.exe") +#elseif(WIN32) +# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../Release/openscad.exe") +#else() +# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../openscad") +#endif() + +#if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/openscad") +# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad") +#endif() + +#if(EXISTS "${OPENSCAD_BINPATH}") +# message(STATUS "Found OpenSCAD binary: ${OPENSCAD_BINPATH}") +#else() +# message(STATUS "Couldn't find the OpenSCAD binary: ${OPENSCAD_BINPATH}") +# message(FATAL_ERROR "Please build the OpenSCAD binary and place it here: ${OPENSCAD_BINPATH}" ) +#endif() + +if(WIN32) + set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad.exe") else() - message(STATUS "Couldn't find the OpenSCAD GUI binary: ${GUI_BINPATH}") - message(FATAL_ERROR "Please build the OpenSCAD GUI binary and place it here: ${GUI_BINPATH}" ) + set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad") endif() # @@ -828,7 +857,7 @@ string(REPLACE __cmake_current_source_dir__ ${CMAKE_CURRENT_SOURCE_DIR} TMP ${TM string(REPLACE __python__ ${PYTHON_EXECUTABLE} TMP ${TMP}) string(REPLACE __header__ "Generated by cmake from ${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.template" TMP ${TMP}) string(REPLACE __cmake_system_name__ ${CMAKE_SYSTEM_NAME} TMP ${TMP}) -string(REPLACE __gui_binpath__ ${GUI_BINPATH} TMP ${TMP}) +string(REPLACE __openscad_binpath__ ${OPENSCAD_BINPATH} TMP ${TMP}) if (MINGW_CROSS_ENV_DIR) string(REPLACE __wine__ wine TMP ${TMP}) @@ -841,9 +870,9 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake ${TMP}) # Add tests -add_cmdline_test(echotest EXE ${CMAKE_SOURCE_DIR}/echotest SUFFIX txt ARGS ${GUI_BINPATH} FILES ${ECHO_FILES}) -add_cmdline_test(dumptest EXE ${CMAKE_SOURCE_DIR}/dumptest SUFFIX csg ARGS ${GUI_BINPATH} FILES ${DUMPTEST_FILES}) -add_cmdline_test(moduledumptest EXE ${GUI_BINPATH} ARGS -o SUFFIX ast FILES +add_cmdline_test(echotest EXE ${CMAKE_SOURCE_DIR}/echotest SUFFIX txt ARGS ${OPENSCAD_BINPATH} FILES ${ECHO_FILES}) +add_cmdline_test(dumptest EXE ${CMAKE_SOURCE_DIR}/dumptest SUFFIX csg ARGS ${OPENSCAD_BINPATH} FILES ${DUMPTEST_FILES}) +add_cmdline_test(moduledumptest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX ast FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad) @@ -851,67 +880,67 @@ add_cmdline_test(csgtexttest SUFFIX txt FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad) -add_cmdline_test(csgtermtest EXE ${GUI_BINPATH} ARGS -o SUFFIX term FILES +add_cmdline_test(csgtermtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX term FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad) -add_cmdline_test(cgalpngtest EXE ${GUI_BINPATH} ARGS --render -o SUFFIX png FILES ${CGALPNGTEST_FILES}) -add_cmdline_test(opencsgtest EXE ${GUI_BINPATH} ARGS -o SUFFIX png FILES ${OPENCSGTEST_FILES}) -add_cmdline_test(throwntogethertest EXE ${GUI_BINPATH} ARGS --preview=throwntogether -o SUFFIX png FILES ${THROWNTOGETHERTEST_FILES}) +add_cmdline_test(cgalpngtest EXE ${OPENSCAD_BINPATH} ARGS --render -o SUFFIX png FILES ${CGALPNGTEST_FILES}) +add_cmdline_test(opencsgtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX png FILES ${OPENCSGTEST_FILES}) +add_cmdline_test(throwntogethertest EXE ${OPENSCAD_BINPATH} ARGS --preview=throwntogether -o SUFFIX png FILES ${THROWNTOGETHERTEST_FILES}) # FIXME: We don't actually need to compare the output of cgalstlsanitytest # with anything. It's self-contained and returns != 0 on error -add_cmdline_test(cgalstlsanitytest EXE ${CMAKE_SOURCE_DIR}/cgalstlsanitytest SUFFIX txt ARGS ${GUI_BINPATH} FILES ${CGALSTLSANITYTEST_FILES}) +add_cmdline_test(cgalstlsanitytest EXE ${CMAKE_SOURCE_DIR}/cgalstlsanitytest SUFFIX txt ARGS ${OPENSCAD_BINPATH} FILES ${CGALSTLSANITYTEST_FILES}) # Tests using the actual OpenSCAD binary # non-ASCII filenames -add_cmdline_test(openscad-nonascii EXE ${GUI_BINPATH} ARGS -o +add_cmdline_test(openscad-nonascii EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX csg FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/sfære.scad) # Image output -add_cmdline_test(openscad-imgsize EXE ${GUI_BINPATH} +add_cmdline_test(openscad-imgsize EXE ${OPENSCAD_BINPATH} ARGS --imgsize 100,100 -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-imgstretch EXE ${GUI_BINPATH} +add_cmdline_test(openscad-imgstretch EXE ${OPENSCAD_BINPATH} ARGS --imgsize 500,100 -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-imgstretch2 EXE ${GUI_BINPATH} +add_cmdline_test(openscad-imgstretch2 EXE ${OPENSCAD_BINPATH} ARGS --imgsize 100,500 -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-camdist EXE ${GUI_BINPATH} +add_cmdline_test(openscad-camdist EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=0,0,0,90,0,90,300 examples/example001.scad -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-camrot EXE ${GUI_BINPATH} +add_cmdline_test(openscad-camrot EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=0,0,0,440,337.5,315,300 examples/example001.scad -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-camtrans EXE ${GUI_BINPATH} +add_cmdline_test(openscad-camtrans EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=100,-20,-10,90,0,90,300 examples/example001.scad -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-camortho EXE ${GUI_BINPATH} +add_cmdline_test(openscad-camortho EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=100,-20,-10,90,0,90,300 examples/example001.scad --projection=o -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-cameye EXE ${GUI_BINPATH} +add_cmdline_test(openscad-cameye EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=60,40,30,0,0,0 examples/example001.scad -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-cameye2 EXE ${GUI_BINPATH} +add_cmdline_test(openscad-cameye2 EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=160,140,130,0,0,0 examples/example001.scad -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-cameyeortho EXE ${GUI_BINPATH} +add_cmdline_test(openscad-cameyeortho EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=160,140,130,0,0,0 examples/example001.scad --projection=o -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -add_cmdline_test(openscad-camcenter EXE ${GUI_BINPATH} +add_cmdline_test(openscad-camcenter EXE ${OPENSCAD_BINPATH} ARGS --imgsize=500,500 --camera=60,40,30,20,10,30 -o SUFFIX png FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) diff --git a/tests/CTestCustom.template b/tests/CTestCustom.template index b8d04ce..1c930dd 100644 --- a/tests/CTestCustom.template +++ b/tests/CTestCustom.template @@ -58,8 +58,8 @@ endif() # Part 1. Pretty Printing -message("running '__gui_binpath__ --info' to generate sysinfo.txt") -execute_process(COMMAND __wine__ __gui_binpath__ --info OUTPUT_FILE sysinfo.txt) +message("running '__openscad_binpath__ --info' to generate sysinfo.txt") +execute_process(COMMAND __wine__ __openscad_binpath__ --info OUTPUT_FILE sysinfo.txt) set(CTEST_CUSTOM_POST_TEST ${CTEST_CUSTOM_POST_TEST} "__cmake_current_binary_dir__/test_pretty_print") if ( ${debug_openscad_template} ) -- cgit v0.10.1 From 5f36117b8ff7e14ae450e770cdaa67e60561672d Mon Sep 17 00:00:00 2001 From: Don Bright Date: Fri, 20 Sep 2013 01:54:53 -0500 Subject: restore missing digits. make --info work better. fix parser / path bug diff --git a/src/PlatformUtils.cc b/src/PlatformUtils.cc index f731a9a..5059b78 100644 --- a/src/PlatformUtils.cc +++ b/src/PlatformUtils.cc @@ -107,14 +107,14 @@ std::string PlatformUtils::info() #endif // ENABLE_CGAL s << "OpenSCAD Version: " << TOSTRING(OPENSCAD_VERSION) - << "\nCompiler: " << compiler_info - << "\nCompile date: " << __DATE__ + << "\nCompiler, build date: " << compiler_info << ", " << __DATE__ << "\nBoost version: " << BOOST_LIB_VERSION << "\nEigen version: " << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION << "\nCGAL version, kernels: " << TOSTRING(CGAL_VERSION) << ", " << cgal_3d_kernel << ", " << cgal_2d_kernel << ", " << cgal_2d_kernelEx << "\nOpenCSG version: " << OPENCSG_VERSION_STRING << "\nQt version: " << qtVersion << "\nMingW build: " << mingwstatus + << "\nOPENSCADPATH: " << getenv("OPENSCADPATH") ; return s.str(); } diff --git a/src/openscad.cc b/src/openscad.cc index a8e71b1..5a219ac 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -176,8 +176,9 @@ Camera get_camera( po::variables_map vm ) return camera; } -int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer ) +int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer, char ** argv ) { + parser_init(boosty::stringy(boost::filesystem::path( argv[0] ).parent_path())); Tree tree; #ifdef ENABLE_CGAL CGALEvaluator cgalevaluator(tree); @@ -630,7 +631,7 @@ int main(int argc, char **argv) if (output_file) { if (!filename) help(argv[0]); - rc = cmdline( deps_output_file, filename, camera, output_file, original_path, renderer ); + rc = cmdline( deps_output_file, filename, camera, output_file, original_path, renderer, argv ); } else if (QtUseGUI()) { diff --git a/src/parsersettings.cc b/src/parsersettings.cc index 5ad30e1..63a7713 100644 --- a/src/parsersettings.cc +++ b/src/parsersettings.cc @@ -130,5 +130,6 @@ void parser_init(const std::string &applicationpath) if (is_directory(tmpdir = libdir / "libraries")) { librarydir = boosty::stringy(tmpdir); } + if (!librarydir.empty()) add_librarydir(librarydir); } diff --git a/src/version_check.h b/src/version_check.h index db17962..6e07208 100644 --- a/src/version_check.h +++ b/src/version_check.h @@ -87,11 +87,12 @@ a time, to avoid confusion. #else #endif // ENABLE_OPENCSG +#ifndef OPENSCAD_TESTING #include #if QT_VERSION < 0x040400 #error QT library missing or version too old. See README.md. To force compile, run qmake CONFIG+=skip-version-check #endif // QT - +#endif #ifdef ENABLE_OPENCSG #endif // OpenCSG diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 67870b3..387d6ee 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -494,9 +494,6 @@ set(COMMON_SOURCES ../src/traverser.cc ../src/PolySetEvaluator.cc ../src/PolySetCache.cc - ../src/PlatformUtils.cc - ../src/${PLATFORMUTILS_SOURCE} - ../src/PlatformUtils.cc ../src/Tree.cc ../src/lodepng.cpp) @@ -517,6 +514,8 @@ set(OFFSCREEN_SOURCES ../src/ThrownTogetherRenderer.cc ../src/renderer.cc ../src/render.cc + ../src/PlatformUtils.cc + ../src/${PLATFORMUTILS_SOURCE} ../src/OpenCSGRenderer.cc) add_library(tests-core STATIC ${CORE_SOURCES}) diff --git a/tests/CTestCustom.template b/tests/CTestCustom.template index 1c930dd..3f82d73 100644 --- a/tests/CTestCustom.template +++ b/tests/CTestCustom.template @@ -51,6 +51,9 @@ if( __cmake_system_name__ MATCHES "Linux|BSD") # in the build directory). set(ENV{DISPLAY} "${VFB_DISPLAY}") + # this line is for MCAD + set(ENV{OPENSCADPATH} "__cmake_current_source_dir__/../libraries") + set(CTEST_CUSTOM_POST_TEST "__cmake_current_source_dir__/virtualfb.sh") endif() endif() diff --git a/tests/regression/dumptest/example005-expected.csg b/tests/regression/dumptest/example005-expected.csg index dc5203f..653fb71 100644 --- a/tests/regression/dumptest/example005-expected.csg +++ b/tests/regression/dumptest/example005-expected.csg @@ -16,11 +16,11 @@ group() { cylinder($fn = 0, $fa = 12, $fs = 2, h = 200, r1 = 10, r2 = 10, center = false); } group(); - multmatrix([[1, 0, 0, 69.282], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 69.28203230275], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { cylinder($fn = 0, $fa = 12, $fs = 2, h = 200, r1 = 10, r2 = 10, center = false); } group(); - multmatrix([[1, 0, 0, 69.282], [0, 1, 0, -40], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 69.28203230275], [0, 1, 0, -40], [0, 0, 1, 0], [0, 0, 0, 1]]) { cylinder($fn = 0, $fa = 12, $fs = 2, h = 200, r1 = 10, r2 = 10, center = false); } group(); @@ -28,11 +28,11 @@ group() { cylinder($fn = 0, $fa = 12, $fs = 2, h = 200, r1 = 10, r2 = 10, center = false); } group(); - multmatrix([[1, 0, 0, -69.282], [0, 1, 0, -40], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -69.28203230275], [0, 1, 0, -40], [0, 0, 1, 0], [0, 0, 0, 1]]) { cylinder($fn = 0, $fa = 12, $fs = 2, h = 200, r1 = 10, r2 = 10, center = false); } group(); - multmatrix([[1, 0, 0, -69.282], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -69.28203230275], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { cylinder($fn = 0, $fa = 12, $fs = 2, h = 200, r1 = 10, r2 = 10, center = false); } } diff --git a/tests/regression/dumptest/example010-expected.csg b/tests/regression/dumptest/example010-expected.csg index b8b49ce..7d9c107 100644 --- a/tests/regression/dumptest/example010-expected.csg +++ b/tests/regression/dumptest/example010-expected.csg @@ -1,7 +1,7 @@ group() { intersection() { surface(file = "example010.dat", center = true); - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { surface(file = "example010.dat", center = true); } } diff --git a/tests/regression/dumptest/example014-expected.csg b/tests/regression/dumptest/example014-expected.csg index 46f7d67..ae43ad2 100644 --- a/tests/regression/dumptest/example014-expected.csg +++ b/tests/regression/dumptest/example014-expected.csg @@ -3,13 +3,13 @@ group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.469846, 0.882564, 0.0180283, 0], [-0.813798, 0.44097, -0.378522, 0], [-0.34202, 0.163176, 0.925417, 0], [0, 0, 0, 1]]) { + multmatrix([[0.46984631039, 0.88256411925, 0.01802831123, 0], [-0.81379768134, 0.44096961053, -0.37852230637, 0], [-0.34202014332, 0.16317591116, 0.92541657839, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.417218, 0.668356, -0.615817, 0], [0.642459, -0.696172, -0.320299, 0], [-0.642788, -0.262003, -0.719846, 0], [0, 0, 0, 1]]) { + multmatrix([[0.41721770627, 0.66835566162, -0.61581660836, 0], [0.64245892818, -0.69617191219, -0.32029860173, 0], [-0.64278760968, -0.26200263022, -0.71984631039, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.0190076, -0.601928, 0.798324, 0], [0.0292692, 0.798461, 0.601335, 0], [-0.999391, 0.0119363, 0.0327948, 0], [0, 0, 0, 1]]) { + multmatrix([[0.0190076282, -0.60192849838, 0.7983237394, 0], [0.02926918072, 0.79846077351, 0.60133493846, 0], [-0.99939082701, 0.01193633086, 0.03279479952, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } } diff --git a/tests/regression/dumptest/example015-expected.csg b/tests/regression/dumptest/example015-expected.csg index b1da238..4eec6a2 100644 --- a/tests/regression/dumptest/example015-expected.csg +++ b/tests/regression/dumptest/example015-expected.csg @@ -12,14 +12,14 @@ group() { square(size = [15, 15], center = true); } } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, -15], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [100, 30], center = false); } } } } - multmatrix([[0.707107, 0.707107, 0, 0], [-0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0.70710678118, 0, 0], [-0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[0.7, 0, 0, 0], [0, 1.3, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { circle($fn = 0, $fa = 12, $fs = 2, r = 5); } diff --git a/tests/regression/dumptest/example017-expected.csg b/tests/regression/dumptest/example017-expected.csg index fea49e8..86bd2a0 100644 --- a/tests/regression/dumptest/example017-expected.csg +++ b/tests/regression/dumptest/example017-expected.csg @@ -14,12 +14,12 @@ group() { square(size = [6, 10], center = true); } } - multmatrix([[-0.5, -0.866025, 0, 0], [0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, -0.86602540378, 0, 0], [0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 36], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [6, 10], center = true); } } - multmatrix([[-0.5, 0.866025, 0, 0], [-0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, 0.86602540378, 0, 0], [-0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 36], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [6, 10], center = true); } @@ -40,12 +40,12 @@ group() { square(size = [6, 15], center = true); } } - multmatrix([[-0.5, -0.866025, 0, 0], [0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, -0.86602540378, 0, 0], [0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 88.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [6, 15], center = true); } } - multmatrix([[-0.5, 0.866025, 0, 0], [-0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, 0.86602540378, 0, 0], [-0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 88.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [6, 15], center = true); } @@ -100,7 +100,7 @@ group() { } } } - multmatrix([[-0.5, -0.866025, 0, 0], [0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, -0.86602540378, 0, 0], [0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 102], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[0, 0, -1, 0], [-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) { linear_extrude(height = 6, center = true, convexity = 10, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { @@ -143,7 +143,7 @@ group() { } } } - multmatrix([[-0.5, 0.866025, 0, 0], [-0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, 0.86602540378, 0, 0], [-0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 102], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[0, 0, -1, 0], [-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) { linear_extrude(height = 6, center = true, convexity = 10, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { diff --git a/tests/regression/dumptest/example018-expected.csg b/tests/regression/dumptest/example018-expected.csg index bf23c87..7f13f40 100644 --- a/tests/regression/dumptest/example018-expected.csg +++ b/tests/regression/dumptest/example018-expected.csg @@ -12,13 +12,13 @@ group() { multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } @@ -38,13 +38,13 @@ group() { multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } @@ -64,13 +64,13 @@ group() { multmatrix([[1, 0, 0, -150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } @@ -102,13 +102,13 @@ group() { multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { cube(size = [45, 45, 45], center = true); - multmatrix([[1, 0, 0, 0], [0, 0.707107, -0.707107, 0], [0, 0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, -0.70710678118, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, 0, 0.707107, 0], [0, 1, 0, 0], [-0.707107, 0, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0, 1, 0, 0], [-0.70710678118, 0, 0.70710678118, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } - multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, -0.70710678118, 0, 0], [0.70710678118, 0.70710678118, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [50, 50, 50], center = true); } } diff --git a/tests/regression/dumptest/example020-expected.csg b/tests/regression/dumptest/example020-expected.csg index df70577..e232ba6 100644 --- a/tests/regression/dumptest/example020-expected.csg +++ b/tests/regression/dumptest/example020-expected.csg @@ -8,43 +8,43 @@ group() { group(); group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[0.62349, -0.781831, 0, 0], [0.781831, 0.62349, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + multmatrix([[0.62348980185, -0.78183148246, 0, 0], [0.78183148246, 0.62348980185, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.222521, -0.974928, 0, 0], [0.974928, -0.222521, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + multmatrix([[-0.22252093395, -0.97492791218, 0, 0], [0.97492791218, -0.22252093395, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.900969, -0.433884, 0, 0], [0.433884, -0.900969, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + multmatrix([[-0.9009688679, -0.43388373911, 0, 0], [0.43388373911, -0.9009688679, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.900969, 0.433884, 0, 0], [-0.433884, -0.900969, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + multmatrix([[-0.9009688679, 0.43388373911, 0, 0], [-0.43388373911, -0.9009688679, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.222521, 0.974928, 0, 0], [-0.974928, -0.222521, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + multmatrix([[-0.22252093395, 0.97492791218, 0, 0], [-0.97492791218, -0.22252093395, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[0.62349, 0.781831, 0, 0], [-0.781831, 0.62349, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[40, 0], [20, 0], [14.6239, 3.33781], [13.5145, 6.50826], [15.6366, 12.4698], [31.2733, 24.9396]], paths = undef, convexity = 1); + multmatrix([[0.62348980185, 0.78183148246, 0, 0], [-0.78183148246, 0.62348980185, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[40, 0], [20, 0], [14.62391868272, 3.33781400934], [13.51453301853, 6.50825608676], [15.63662964936, 12.46979603717], [31.27325929872, 24.93959207434]], paths = undef, convexity = 1); } } } @@ -65,43 +65,43 @@ group() { group(); group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[0.62349, -0.781831, 0, 0], [0.781831, 0.62349, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + multmatrix([[0.62348980185, -0.78183148246, 0, 0], [0.78183148246, 0.62348980185, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.222521, -0.974928, 0, 0], [0.974928, -0.222521, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + multmatrix([[-0.22252093395, -0.97492791218, 0, 0], [0.97492791218, -0.22252093395, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.900969, -0.433884, 0, 0], [0.433884, -0.900969, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + multmatrix([[-0.9009688679, -0.43388373911, 0, 0], [0.43388373911, -0.9009688679, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.900969, 0.433884, 0, 0], [-0.433884, -0.900969, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + multmatrix([[-0.9009688679, 0.43388373911, 0, 0], [-0.43388373911, -0.9009688679, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[-0.222521, 0.974928, 0, 0], [-0.974928, -0.222521, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + multmatrix([[-0.22252093395, 0.97492791218, 0, 0], [-0.97492791218, -0.22252093395, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } group(); group() { - multmatrix([[0.62349, 0.781831, 0, 0], [-0.781831, 0.62349, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - polygon(points = [[42, 0], [21, 0], [15.5988, 3.56033], [14.4155, 6.94214], [16.4185, 13.0933], [32.8369, 26.1866]], paths = undef, convexity = 1); + multmatrix([[0.62348980185, 0.78183148246, 0, 0], [-0.78183148246, 0.62348980185, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + polygon(points = [[42, 0], [21, 0], [15.5988465949, 3.5603349433], [14.41550188643, 6.94213982588], [16.41846113182, 13.09328583903], [32.83692226365, 26.18657167806]], paths = undef, convexity = 1); } } } @@ -117,7 +117,7 @@ group() { group() { group() { group() { - polygon(points = [[100, 0], [90.1087, 30.5878], [99.2773, 33.7001]], paths = undef, convexity = 1); + polygon(points = [[100, 0], [90.10870717256, 30.5877844104], [99.27731872645, 33.70010865023]], paths = undef, convexity = 1); } group(); group(); @@ -126,104 +126,104 @@ group() { group(); group(); group() { - polygon(points = [[99.2773, 33.7001], [90.1087, 30.5878], [74.0878, 56.8496], [84.5829, 64.9027]], paths = undef, convexity = 1); + polygon(points = [[99.27731872645, 33.70010865023], [90.10870717256, 30.5877844104], [74.08779492859, 56.84956452855], [84.58287312965, 64.90272127318]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[84.5829, 64.9027], [74.0878, 56.8496], [51.2201, 76.6563], [59.8939, 89.6376]], paths = undef, convexity = 1); + polygon(points = [[84.58287312965, 64.90272127318], [74.08779492859, 56.84956452855], [51.22010456048, 76.65630364955], [59.89394204343, 89.63761881095]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[59.8939, 89.6376], [51.2201, 76.6563], [23.6405, 88.2274], [28.1233, 104.958]], paths = undef, convexity = 1); + polygon(points = [[59.89394204343, 89.63761881095], [51.22010456048, 76.65630364955], [23.64046582983, 88.22741959152], [28.12334319067, 104.95774566628]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[28.1233, 104.958], [23.6405, 88.2274], [-5.93401, 90.5355], [-7.14662, 109.036]], paths = undef, convexity = 1); + polygon(points = [[28.12334319067, 104.95774566628], [23.64046582983, 88.22741959152], [-5.93400968795, 90.53549252778], [-7.14661615807, 109.03629211993]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-7.14662, 109.036], [-5.93401, 90.5355], [-34.563, 83.4425], [-41.9737, 101.333]], paths = undef, convexity = 1); + polygon(points = [[-7.14661615807, 109.03629211993], [-5.93400968795, 90.53549252778], [-34.56302683546, 83.44252814283], [-41.97365963755, 101.33337835942]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-41.9737, 101.333], [-34.563, 83.4425], [-59.3928, 67.7246], [-72.4763, 82.6434]], paths = undef, convexity = 1); + polygon(points = [[-41.97365963755, 101.33337835942], [-34.56302683546, 83.44252814283], [-59.39283755471, 67.72455141159], [-72.4763254653, 82.6434100842]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-72.4763, 82.6434], [-59.3928, 67.7246], [-77.9423, 45], [-95.2628, 55]], paths = undef, convexity = 1); + polygon(points = [[-72.4763254653, 82.6434100842], [-59.39283755471, 67.72455141159], [-77.94228634059, 45], [-95.26279441628, 55]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-95.2628, 55], [-77.9423, 45], [-88.3476, 17.5734], [-107.809, 21.4446]], paths = undef, convexity = 1); + polygon(points = [[-95.26279441628, 55], [-77.94228634059, 45], [-88.34760075969, 17.57343041942], [-107.80945532094, 21.4446339838]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-107.809, 21.4446], [-88.3476, 17.5734], [-89.5449, -11.7888], [-108.744, -14.3164]], paths = undef, convexity = 1); + polygon(points = [[-107.80945532094, 21.4446339838], [-88.34760075969, 17.57343041942], [-89.54486254542, -11.78880480022], [-108.74410972934, -14.31643364378]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-108.744, -14.3164], [-89.5449, -11.7888], [-81.373, -40.1287], [-98.0015, -48.329]], paths = undef, convexity = 1); + polygon(points = [[-108.74410972934, -14.31643364378], [-89.54486254542, -11.78880480022], [-81.37304131717, -40.12874312782], [-98.00150698935, -48.32899491597]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-98.0015, -48.329], [-81.373, -40.1287], [-64.587, -64.587], [-76.8344, -76.8344]], paths = undef, convexity = 1); + polygon(points = [[-98.00150698935, -48.32899491597], [-81.37304131717, -40.12874312782], [-64.58695376169, -64.58695376169], [-76.83440247561, -76.83440247561]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-76.8344, -76.8344], [-64.587, -64.587], [-40.7763, -82.6861], [-47.6815, -96.6885]], paths = undef, convexity = 1); + polygon(points = [[-76.83440247561, -76.83440247561], [-64.58695376169, -64.58695376169], [-40.77625404048, -82.68606355865], [-47.68148400331, -96.68848474788]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-47.6815, -96.6885], [-40.7763, -82.6861], [-12.1893, -92.5867], [-13.916, -105.702]], paths = undef, convexity = 1); + polygon(points = [[-47.68148400331, -96.68848474788], [-40.77625404048, -82.68606355865], [-12.18926961151, -92.58669478281], [-13.91596883249, -105.70227749195]], paths = undef, convexity = 1); } } group() { group(); group(); group() { - polygon(points = [[-13.916, -105.702], [-12.1893, -92.5867], [18.5646, -93.3303], [20.4535, -102.827]], paths = undef, convexity = 1); + polygon(points = [[-13.91596883249, -105.70227749195], [-12.18926961151, -92.58669478281], [18.56455524139, -93.33032171881], [20.45350916183, -102.82673436183]], paths = undef, convexity = 1); } } group() { group(); group() { - polygon(points = [[20.4535, -102.827], [18.5646, -93.3303], [50, -86.6025]], paths = undef, convexity = 1); + polygon(points = [[20.45350916183, -102.82673436183], [18.56455524139, -93.33032171881], [50, -86.60254037844]], paths = undef, convexity = 1); } group(); } diff --git a/tests/regression/dumptest/example021-expected.csg b/tests/regression/dumptest/example021-expected.csg index 984618f..3d4aee0 100644 --- a/tests/regression/dumptest/example021-expected.csg +++ b/tests/regression/dumptest/example021-expected.csg @@ -34,12 +34,12 @@ group() { multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { group() { - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -20], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -58,12 +58,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 15], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -15], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -82,12 +82,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -10], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -106,12 +106,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 5], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -5], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -130,12 +130,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -154,12 +154,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -5], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 5], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -178,12 +178,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -10], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -202,12 +202,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -15], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 15], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); @@ -226,12 +226,12 @@ group() { } } } - multmatrix([[0.933013, 0.0669873, -0.353553, 0], [0.0669873, 0.933013, 0.353553, 0], [0.353553, -0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, -0.35355339059, 0], [0.0669872981, 0.93301270189, 0.35355339059, 0], [0.35355339059, -0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -20], [0, 0, 0, 1]]) { linear_extrude(height = 0.5, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) { - multmatrix([[0.933013, 0.0669873, 0.353553, 0], [0.0669873, 0.933013, -0.353553, 0], [-0.353553, 0.353553, 0.866025, 0], [0, 0, 0, 1]]) { + multmatrix([[0.93301270189, 0.0669872981, 0.35355339059, 0], [0.0669872981, 0.93301270189, -0.35355339059, 0], [-0.35355339059, 0.35355339059, 0.86602540378, 0], [0, 0, 0, 1]]) { group() { difference() { sphere($fn = 0, $fa = 30, $fs = 2, r = 25); diff --git a/tests/regression/dumptest/example023-expected.csg b/tests/regression/dumptest/example023-expected.csg index cd990d1..ffd79e7 100644 --- a/tests/regression/dumptest/example023-expected.csg +++ b/tests/regression/dumptest/example023-expected.csg @@ -2,7 +2,7 @@ group() { group() { group() { group() { - multmatrix([[0.5, -0.866025, 0, 0], [0.866025, 0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.5, -0.86602540378, 0, 0], [0.86602540378, 0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -25,7 +25,7 @@ group() { } } group() { - multmatrix([[0.866025, -0.5, 0, 0], [0.5, 0.866025, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.86602540378, -0.5, 0, 0], [0.5, 0.86602540378, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -81,7 +81,7 @@ group() { } } group() { - multmatrix([[0.866025, 0.5, 0, 0], [-0.5, 0.866025, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.86602540378, 0.5, 0, 0], [-0.5, 0.86602540378, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -109,7 +109,7 @@ group() { } } group() { - multmatrix([[0.5, 0.866025, 0, 0], [-0.866025, 0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[0.5, 0.86602540378, 0, 0], [-0.86602540378, 0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -160,7 +160,7 @@ group() { } } group() { - multmatrix([[-0.5, 0.866025, 0, 0], [-0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, 0.86602540378, 0, 0], [-0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -193,7 +193,7 @@ group() { } } group() { - multmatrix([[-0.866025, 0.5, 0, 0], [-0.5, -0.866025, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.86602540378, 0.5, 0, 0], [-0.5, -0.86602540378, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -254,7 +254,7 @@ group() { } } group() { - multmatrix([[-0.866025, -0.5, 0, 0], [0.5, -0.866025, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.86602540378, -0.5, 0, 0], [0.5, -0.86602540378, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -277,7 +277,7 @@ group() { } } group() { - multmatrix([[-0.5, -0.866025, 0, 0], [0.866025, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[-0.5, -0.86602540378, 0, 0], [0.86602540378, -0.5, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 16], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -4], [0, 0, 1, 0], [0, 0, 0, 1]]) { diff --git a/tests/regression/dumptest/example024-expected.csg b/tests/regression/dumptest/example024-expected.csg index 2d82935..8755567 100644 --- a/tests/regression/dumptest/example024-expected.csg +++ b/tests/regression/dumptest/example024-expected.csg @@ -1,6 +1,6 @@ group() { difference() { - multmatrix([[0.816497, 0.408248, 0.408248, 0], [0, 0.707107, -0.707107, 0], [-0.57735, 0.57735, 0.57735, 0], [0, 0, 0, 1]]) { + multmatrix([[0.81649658092, 0.40824829046, 0.40824829046, 0], [0, 0.70710678118, -0.70710678118, 0], [-0.57735026919, 0.57735026919, 0.57735026919, 0], [0, 0, 0, 1]]) { group() { difference() { cube(size = [100, 100, 100], center = true); @@ -11,13 +11,13 @@ group() { group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -25,7 +25,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -33,7 +33,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -41,7 +41,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -50,7 +50,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -58,7 +58,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -66,7 +66,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -74,7 +74,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -87,13 +87,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -101,7 +101,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -109,7 +109,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -117,7 +117,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -126,7 +126,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -134,7 +134,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -142,7 +142,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -150,7 +150,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -163,13 +163,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -177,7 +177,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -185,7 +185,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -193,7 +193,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -202,7 +202,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -210,7 +210,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -218,7 +218,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -226,7 +226,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -239,13 +239,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -253,7 +253,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -261,7 +261,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -269,7 +269,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -278,7 +278,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -286,7 +286,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -294,7 +294,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -302,7 +302,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -316,13 +316,13 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -330,7 +330,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -338,7 +338,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -346,7 +346,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -355,7 +355,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -363,7 +363,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -371,7 +371,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -379,7 +379,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -392,13 +392,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -406,7 +406,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -414,7 +414,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -422,7 +422,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -431,7 +431,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -439,7 +439,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -447,7 +447,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -455,7 +455,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -468,13 +468,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -482,7 +482,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -490,7 +490,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -498,7 +498,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -507,7 +507,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -515,7 +515,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -523,7 +523,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -531,7 +531,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -544,13 +544,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -558,7 +558,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -566,7 +566,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -574,7 +574,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -583,7 +583,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -591,7 +591,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -599,7 +599,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -607,7 +607,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -629,13 +629,13 @@ group() { group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -643,7 +643,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -651,7 +651,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -659,7 +659,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -668,7 +668,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -676,7 +676,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -684,7 +684,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -692,7 +692,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -705,13 +705,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -719,7 +719,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -727,7 +727,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -735,7 +735,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -744,7 +744,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -752,7 +752,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -760,7 +760,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -768,7 +768,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -781,13 +781,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -795,7 +795,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -803,7 +803,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -811,7 +811,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -820,7 +820,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -828,7 +828,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -836,7 +836,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -844,7 +844,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -857,13 +857,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -871,7 +871,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -879,7 +879,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -887,7 +887,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -896,7 +896,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -904,7 +904,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -912,7 +912,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -920,7 +920,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -934,13 +934,13 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -948,7 +948,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -956,7 +956,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -964,7 +964,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -973,7 +973,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -981,7 +981,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -989,7 +989,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -997,7 +997,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1010,13 +1010,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1024,7 +1024,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1032,7 +1032,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1040,7 +1040,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1049,7 +1049,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1057,7 +1057,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1065,7 +1065,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1073,7 +1073,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1086,13 +1086,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1100,7 +1100,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1108,7 +1108,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1116,7 +1116,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1125,7 +1125,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1133,7 +1133,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1141,7 +1141,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1149,7 +1149,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1162,13 +1162,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1176,7 +1176,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1184,7 +1184,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1192,7 +1192,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1201,7 +1201,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1209,7 +1209,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1217,7 +1217,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1225,7 +1225,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1247,13 +1247,13 @@ group() { group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1261,7 +1261,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1269,7 +1269,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1277,7 +1277,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1286,7 +1286,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1294,7 +1294,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1302,7 +1302,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1310,7 +1310,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1323,13 +1323,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1337,7 +1337,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1345,7 +1345,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1353,7 +1353,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1362,7 +1362,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1370,7 +1370,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1378,7 +1378,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1386,7 +1386,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1399,13 +1399,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.3333], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -33.33333333333], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1413,7 +1413,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1421,7 +1421,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1429,7 +1429,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1438,7 +1438,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1446,7 +1446,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1454,7 +1454,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1462,7 +1462,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1475,13 +1475,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1489,7 +1489,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1497,7 +1497,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1505,7 +1505,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1514,7 +1514,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1522,7 +1522,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1530,7 +1530,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1538,7 +1538,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1552,13 +1552,13 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1566,7 +1566,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1574,7 +1574,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1582,7 +1582,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1591,7 +1591,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1599,7 +1599,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1607,7 +1607,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1615,7 +1615,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1628,13 +1628,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, -33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, -33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1642,7 +1642,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1650,7 +1650,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1658,7 +1658,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1667,7 +1667,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1675,7 +1675,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1683,7 +1683,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1691,7 +1691,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1704,13 +1704,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1718,7 +1718,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1726,7 +1726,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1734,7 +1734,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1743,7 +1743,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1751,7 +1751,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1759,7 +1759,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1767,7 +1767,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1780,13 +1780,13 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.3333], [0, 0, 1, 33.3333], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 33.33333333333], [0, 0, 1, 33.33333333333], [0, 0, 0, 1]]) { group() { cube(size = [110, 11.1111, 11.1111], center = true); group() { group() { group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1794,7 +1794,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1802,7 +1802,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, -11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1810,7 +1810,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1819,7 +1819,7 @@ group() { } group(); group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1827,7 +1827,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, -11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, -11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1835,7 +1835,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); @@ -1843,7 +1843,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.1111], [0, 0, 1, 11.1111], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 11.11111111111], [0, 0, 1, 11.11111111111], [0, 0, 0, 1]]) { group() { cube(size = [110, 3.7037, 3.7037], center = true); group(); diff --git a/tests/regression/dumptest/intersection_for-tests-expected.csg b/tests/regression/dumptest/intersection_for-tests-expected.csg index 0042824..68e8321 100644 --- a/tests/regression/dumptest/intersection_for-tests-expected.csg +++ b/tests/regression/dumptest/intersection_for-tests-expected.csg @@ -5,13 +5,13 @@ group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.469846, 0.882564, 0.0180283, 0], [-0.813798, 0.44097, -0.378522, 0], [-0.34202, 0.163176, 0.925417, 0], [0, 0, 0, 1]]) { + multmatrix([[0.46984631039, 0.88256411925, 0.01802831123, 0], [-0.81379768134, 0.44096961053, -0.37852230637, 0], [-0.34202014332, 0.16317591116, 0.92541657839, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.417218, 0.668356, -0.615817, 0], [0.642459, -0.696172, -0.320299, 0], [-0.642788, -0.262003, -0.719846, 0], [0, 0, 0, 1]]) { + multmatrix([[0.41721770627, 0.66835566162, -0.61581660836, 0], [0.64245892818, -0.69617191219, -0.32029860173, 0], [-0.64278760968, -0.26200263022, -0.71984631039, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } - multmatrix([[0.0190076, -0.601928, 0.798324, 0], [0.0292692, 0.798461, 0.601335, 0], [-0.999391, 0.0119363, 0.0327948, 0], [0, 0, 0, 1]]) { + multmatrix([[0.0190076282, -0.60192849838, 0.7983237394, 0], [0.02926918072, 0.79846077351, 0.60133493846, 0], [-0.99939082701, 0.01193633086, 0.03279479952, 0], [0, 0, 0, 1]]) { cube(size = [100, 20, 20], center = true); } } diff --git a/tests/regression/dumptest/module-recursion-expected.csg b/tests/regression/dumptest/module-recursion-expected.csg index d7ed7a3..5117f53 100644 --- a/tests/regression/dumptest/module-recursion-expected.csg +++ b/tests/regression/dumptest/module-recursion-expected.csg @@ -4,30 +4,30 @@ 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -37,18 +37,18 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -63,24 +63,24 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -90,18 +90,18 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -121,30 +121,30 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -154,18 +154,18 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -180,24 +180,24 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.76604444311, -0.64278760968, 0], [0, 0.64278760968, 0.76604444311, 0], [0, 0, 0, 1]]) { group() { group(); } @@ -207,18 +207,18 @@ group() { } } } - multmatrix([[1, 0, 0, 0], [0, 0.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, 0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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.766044, -0.642788, 0], [0, 0.642788, 0.766044, 0], [0, 0, 0, 1]]) { + 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/projection-tests-expected.csg b/tests/regression/dumptest/projection-tests-expected.csg index 5d2fc0a..86423a1 100644 --- a/tests/regression/dumptest/projection-tests-expected.csg +++ b/tests/regression/dumptest/projection-tests-expected.csg @@ -30,7 +30,7 @@ group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, -22], [0, 0, 1, 0], [0, 0, 0, 1]]) { linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -5], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -4.999999], [0, 0, 0, 1]]) { cube(size = [10, 10, 10], center = true); } } diff --git a/tests/regression/dumptest/scale2D-tests-expected.csg b/tests/regression/dumptest/scale2D-tests-expected.csg index 3957609..b20a975 100644 --- a/tests/regression/dumptest/scale2D-tests-expected.csg +++ b/tests/regression/dumptest/scale2D-tests-expected.csg @@ -1,11 +1,11 @@ group() { - multmatrix([[2, 0, 0, 0], [0, 1.33333, 0, 0], [0, 0, 2, 0], [0, 0, 0, 1]]) { + multmatrix([[2, 0, 0, 0], [0, 1.33333333333, 0, 0], [0, 0, 2, 0], [0, 0, 0, 1]]) { group() { square(size = [2, 3], center = true); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - multmatrix([[2, 0, 0, 0], [0, 1.33333, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[2, 0, 0, 0], [0, 1.33333333333, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { square(size = [2, 3], center = true); } diff --git a/tests/regression/dumptest/text-search-test-expected.csg b/tests/regression/dumptest/text-search-test-expected.csg index 98c928b..828369d 100644 --- a/tests/regression/dumptest/text-search-test-expected.csg +++ b/tests/regression/dumptest/text-search-test-expected.csg @@ -599,7 +599,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0.17677669529], [0, 1, 0, 0.17677669529], [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); @@ -617,7 +617,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -0.17677669529], [0, 1, 0, 0.17677669529], [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); @@ -635,7 +635,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -0.17677669529], [0, 1, 0, -0.17677669529], [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); @@ -653,7 +653,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0.17677669529], [0, 1, 0, -0.17677669529], [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); @@ -688,7 +688,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0.17677669529], [0, 1, 0, 0.17677669529], [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); @@ -706,7 +706,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -0.17677669529], [0, 1, 0, 0.17677669529], [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); @@ -724,7 +724,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -0.17677669529], [0, 1, 0, -0.17677669529], [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); @@ -742,7 +742,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0.17677669529], [0, 1, 0, -0.17677669529], [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); @@ -777,7 +777,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0.17677669529], [0, 1, 0, 0.17677669529], [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); @@ -795,7 +795,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, 0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -0.17677669529], [0, 1, 0, 0.17677669529], [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); @@ -813,7 +813,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, -0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, -0.17677669529], [0, 1, 0, -0.17677669529], [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); @@ -831,7 +831,7 @@ group() { } } group() { - multmatrix([[1, 0, 0, 0.176777], [0, 1, 0, -0.176777], [0, 0, 1, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0.17677669529], [0, 1, 0, -0.17677669529], [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/dumptest/transform-tests-expected.csg b/tests/regression/dumptest/transform-tests-expected.csg index 1444b56..8b3d86a 100644 --- a/tests/regression/dumptest/transform-tests-expected.csg +++ b/tests/regression/dumptest/transform-tests-expected.csg @@ -21,13 +21,13 @@ group() { } } multmatrix([[1, 0, 0, 0], [0, 1, 0, -40], [0, 0, 1, 0], [0, 0, 0, 1]]) { - multmatrix([[0.707107, 0, 0.707107, 0], [0.707107, 0, -0.707107, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) { + multmatrix([[0.70710678118, 0, 0.70710678118, 0], [0.70710678118, 0, -0.70710678118, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) { group() { cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 10, r2 = 0, center = false); } } } - multmatrix([[1, 0, 0, 0], [0, 0.707107, 0.707107, 0], [0, -0.707107, 0.707107, 0], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 0.70710678118, 0.70710678118, 0], [0, -0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) { group() { cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 10, r2 = 0, center = false); } diff --git a/tests/regression/dumptest/use-tests-expected.csg b/tests/regression/dumptest/use-tests-expected.csg index bb9c028..c47fa74 100644 --- a/tests/regression/dumptest/use-tests-expected.csg +++ b/tests/regression/dumptest/use-tests-expected.csg @@ -46,7 +46,7 @@ group() { linear_extrude(height = 1.5, center = true, convexity = 1, twist = 0, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) { projection(cut = false, convexity = 0) { multmatrix([[0, 0, -1, 0], [0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1]]) { - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.318198], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0.31819805153], [0, 0, 0, 1]]) { cylinder($fn = 30, $fa = 12, $fs = 2, h = 0.212132, r1 = 0.212132, r2 = 0, center = true); } } diff --git a/tests/regression/echotest/builtin-tests-expected.txt b/tests/regression/echotest/builtin-tests-expected.txt index b8ef05e..385b0dc 100644 --- a/tests/regression/echotest/builtin-tests-expected.txt +++ b/tests/regression/echotest/builtin-tests-expected.txt @@ -1 +1 @@ -ECHO: 3.14159 +ECHO: 3.14159265359 diff --git a/tests/regression/echotest/dim-all-expected.txt b/tests/regression/echotest/dim-all-expected.txt index 96456b8..a16c580 100644 --- a/tests/regression/echotest/dim-all-expected.txt +++ b/tests/regression/echotest/dim-all-expected.txt @@ -1,16 +1,16 @@ WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: linearX = 51.4496 +ECHO: linearX = 51.44957554275 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: linearY = 29.1303 +ECHO: linearY = 29.13025467434 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". ECHO: aligned = 60 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: ordinateX = -49.1754 +ECHO: ordinateX = -49.17542445724 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: ordinateY = 30.8697 +ECHO: ordinateY = 30.86974532565 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". ECHO: radius = 60 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". ECHO: diameter = 120 WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: arc = 59.0362 +ECHO: arc = 59.03624346792 diff --git a/tests/regression/echotest/lookup-tests-expected.txt b/tests/regression/echotest/lookup-tests-expected.txt index 7e82bbf..b98ebe2 100644 --- a/tests/regression/echotest/lookup-tests-expected.txt +++ b/tests/regression/echotest/lookup-tests-expected.txt @@ -6,10 +6,10 @@ ECHO: 0 ECHO: 0.5 ECHO: -55 ECHO: -55 -ECHO: -54.4444 +ECHO: -54.44444444444 ECHO: -2.5 ECHO: 0 ECHO: 0.9 -ECHO: 6.66667 +ECHO: 6.66666666666 ECHO: 333 ECHO: 333 -- cgit v0.10.1 From 47ed2f1b1262c0bda78153c9cebf576b571a7bb4 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 21 Sep 2013 00:12:42 -0500 Subject: moving towards making tests work on bsd again diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh index cb0b0a0..d5ccb75 100644 --- a/scripts/setenv-unibuild.sh +++ b/scripts/setenv-unibuild.sh @@ -51,6 +51,9 @@ setenv_freebsd() setenv_netbsd() { setenv_common + echo --- netbsd build situation is complex. it comes with gcc4.5 + echo --- which is incompatable with updated CGAL. + echo --- you may need to hack with newer gcc to make it work QMAKESPEC=netbsd-g++ QTDIR=/usr/pkg/qt4 PATH=/usr/pkg/qt4/bin:$PATH @@ -75,6 +78,19 @@ setenv_linux_clang() echo QMAKESPEC has been modified: $QMAKESPEC } +setenv_netbsd_clang() +{ + echo --------------------- this is not yet supported. netbsd 6 lacks + echo --------------------- certain things needed for clang support + export CC=clang + export CXX=clang++ + export QMAKESPEC=./patches/mkspecs/netbsd-clang + + echo CC has been modified: $CC + echo CXX has been modified: $CXX + echo QMAKESPEC has been modified: $QMAKESPEC +} + clean_note() { if [ $QT5_SETUP ]; then @@ -127,6 +143,9 @@ elif [ "`uname | grep -i freebsd`" ]; then setenv_freebsd elif [ "`uname | grep -i netbsd`" ]; then setenv_netbsd + if [ "`echo $* | grep clang`" ]; then + setenv_netbsd_clang + fi else # guess setenv_common diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 6596c8a..f55e195 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -282,6 +282,7 @@ build_cgal() echo "Building CGAL" $version "..." cd $BASEDIR/src rm -rf CGAL-$version + ver4_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/32360/CGAL-4.2.tar.bz2" ver4_1="curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-4.1.tar.bz2" ver4_0_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-4.0.2.tar.bz2" ver4_0="curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-4.0.tar.gz" @@ -289,7 +290,7 @@ build_cgal() ver3_8="curl --insecure -O https://gforge.inria.fr/frs/download.php/28500/CGAL-3.8.tar.gz" ver3_7="curl --insecure -O https://gforge.inria.fr/frs/download.php/27641/CGAL-3.7.tar.gz" vernull="echo already downloaded..skipping" - download_cmd=ver`echo $version | sed s/"\."/"_"/` + download_cmd=ver`echo $version | sed s/"\."/"_"/ | sed s/"\."/"_"/` if [ -e CGAL-$version.tar.gz ]; then download_cmd=vernull; @@ -298,6 +299,7 @@ build_cgal() download_cmd=vernull; fi + eval echo "$"$download_cmd `eval echo "$"$download_cmd` zipper=gzip @@ -563,7 +565,7 @@ if [ $1 ]; then exit $? fi if [ $1 = "cgal" ]; then - build_cgal 4.1 use-sys-libs + build_cgal 4.0.2 use-sys-libs exit $? fi if [ $1 = "opencsg" ]; then @@ -592,7 +594,7 @@ build_gmp 5.0.5 build_mpfr 3.1.1 build_boost 1.53.0 # NB! For CGAL, also update the actual download URL in the function -build_cgal 4.1 +build_cgal 4.0.2 build_glew 1.9.0 build_opencsg 1.3.2 diff --git a/src/openscad.cc b/src/openscad.cc index 5a219ac..d8ce112 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -83,6 +83,16 @@ using std::vector; using boost::lexical_cast; using boost::is_any_of; +static void echotest_output_handler( const std::string &msg, void *userdata ) +{ + std::ofstream *outstream = static_cast(userdata); + if (!outstream->is_open()) { + fprintf(stderr,"Error writing outstream\n" ); + return; + } + *outstream << msg; +} + static void help(const char *progname) { int tab = int(strlen(progname))+8; @@ -191,7 +201,7 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *png_output_file = NULL; const char *ast_output_file = NULL; const char *term_output_file = NULL; - bool null_output = false; + const char *echotest_output_file = NULL; std::string suffix = boosty::extension_str( output_file ); boost::algorithm::to_lower( suffix ); @@ -203,7 +213,7 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, else if (suffix == ".png") png_output_file = output_file; else if (suffix == ".ast") ast_output_file = output_file; else if (suffix == ".term") term_output_file = output_file; - else if (strcmp(output_file, "null") == 0) null_output = true; + else if (suffix == ".echotest") echotest_output_file = output_file; else { fprintf(stderr, "Unknown suffix for output file %s\n", output_file); return 1; @@ -216,6 +226,15 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, top_ctx.dump(NULL, NULL); #endif + if (echotest_output_file) { + std::ofstream fstream( echotest_output_file ); + if (!fstream.is_open()) { + PRINTB("Can't open file \"%s\" for export", csg_output_file); + } else { + set_output_handler( echotest_output_handler, fstream ); + } + } + FileModule *root_module; ModuleInstantiation root_inst("group"); AbstractNode *root_node; @@ -301,8 +320,8 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, } else { #ifdef ENABLE_CGAL - if ((null_output || png_output_file) && !(renderer==Render::CGAL)) { - // null output or OpenCSG png -> don't necessarily need CGALMesh evaluation + if ((echotest_output_file || png_output_file) && !(renderer==Render::CGAL)) { + // echotest or OpenCSG png -> don't necessarily need CGALMesh evaluation } else { root_N = cgalevaluator.evaluateCGALMesh(*tree.root()); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 387d6ee..4c4bf9f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,7 @@ # instructions - see ../doc/testing.txt +set(DEBUG_OSCD 1) # print debug info during cmake + cmake_minimum_required(VERSION 2.8) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) # Explicitly use new include policy to avoid globally shadowing included modules @@ -115,12 +117,15 @@ endif() # function(inclusion user_set_path found_paths) - # If user_set_path indicates an env. variable was specifically - # set by the user, then found_paths become an include priority (prepend); - # otherwise found_paths are stuck on the end of the include flags (append). - - # message(STATUS "inclusion ${user_set_path} ${found_paths}") - # message(STATUS "inclusion ${${user_set_path}} ${${found_paths}}") + # Set up compiler include paths with prepend/append rules. Input is + # a path and a set of paths. If user_set_path matches anything in found_paths + # then we prepend the found_paths because we assume the user wants + # their set_paths to be a priority. + + if (DEBUG_OSCD) + message(STATUS "inclusion ${user_set_path} ${found_paths}") + message(STATUS "inclusion ${${user_set_path}} ${${found_paths}}") + endif() set( inclusion_match 0 ) foreach( found_path ${${found_paths}} ) if (${found_path} MATCHES ${${user_set_path}}.*) @@ -129,10 +134,14 @@ function(inclusion user_set_path found_paths) endforeach() if (user_set_path AND inclusion_match) include_directories(BEFORE ${${found_paths}}) - # message(STATUS "inclusion prepend ${${found_paths}} for ${user_set_path}") + if (DEBUG_OSCD) + message(STATUS "inclusion prepend ${${found_paths}} for ${user_set_path}") + endif() else() include_directories(AFTER ${${found_paths}}) - # message(STATUS "inclusion append ${${found_paths}} for ${user_set_path}") + if (DEBUG_OSCD) + message(STATUS "inclusion append ${${found_paths}} for ${user_set_path}") + endif() endif() set( inclusion_match 0 ) endfunction() @@ -330,6 +339,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(FLEX_EXECUTABLE /usr/local/bin/flex) endif() +# prepend the dir where deps were built +if (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "") + set(OSCAD_DEPS "") + set(OSCAD_DEPS_PATHS $ENV{OPENSCAD_LIBRARIES}/include) + inclusion(OSCAD_DEPS OSCAD_DEPS_PATHS) +endif() + if(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") include_directories( /usr/pkg/include /usr/X11R7/include ) set(FLEX_EXECUTABLE /usr/pkg/bin/flex) @@ -558,9 +574,9 @@ target_link_libraries(cgalcachetest tests-cgal ${TESTS-CGAL-LIBRARIES} ${GLEW_LI # # openscad no-qt # -add_executable(openscad ../src/openscad.cc) -set_target_properties(openscad PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -DEIGEN_DONT_ALIGN -DENABLE_CGAL -DENABLE_OPENCSG ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(openscad tests-offscreen tests-cgal tests-nocgal ${TESTS-CORE-LIBRARIES} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${Boost_LIBRARIES} ${OPENCSG_LIBRARY} ${COCOA_LIBRARY} ) +add_executable(openscad_nogui ../src/openscad.cc) +set_target_properties(openscad_nogui PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -DEIGEN_DONT_ALIGN -DENABLE_CGAL -DENABLE_OPENCSG ${CGAL_CXX_FLAGS_INIT}") +target_link_libraries(openscad_nogui tests-offscreen tests-cgal tests-nocgal ${TESTS-CORE-LIBRARIES} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${Boost_LIBRARIES} ${OPENCSG_LIBRARY} ${COCOA_LIBRARY} ) # # GUI binary tests @@ -587,9 +603,9 @@ target_link_libraries(openscad tests-offscreen tests-cgal tests-nocgal ${TESTS-C #endif() if(WIN32) - set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad.exe") + set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad_nogui.exe") else() - set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad") + set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad_nogui") endif() # @@ -869,8 +885,6 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake ${TMP}) # Add tests -add_cmdline_test(echotest EXE ${CMAKE_SOURCE_DIR}/echotest SUFFIX txt ARGS ${OPENSCAD_BINPATH} FILES ${ECHO_FILES}) -add_cmdline_test(dumptest EXE ${CMAKE_SOURCE_DIR}/dumptest SUFFIX csg ARGS ${OPENSCAD_BINPATH} FILES ${DUMPTEST_FILES}) add_cmdline_test(moduledumptest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX ast FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad @@ -883,6 +897,8 @@ add_cmdline_test(csgtermtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX term FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad) +add_cmdline_test(echotest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX echotest FILES ${ECHO_FILES}) +add_cmdline_test(dumptest EXE ${OPENSCAD_BINPATH} ARGS -o dump SUFFIX csg FILES ${DUMPTEST_FILES}) add_cmdline_test(cgalpngtest EXE ${OPENSCAD_BINPATH} ARGS --render -o SUFFIX png FILES ${CGALPNGTEST_FILES}) add_cmdline_test(opencsgtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX png FILES ${OPENCSGTEST_FILES}) add_cmdline_test(throwntogethertest EXE ${OPENSCAD_BINPATH} ARGS --preview=throwntogether -o SUFFIX png FILES ${THROWNTOGETHERTEST_FILES}) diff --git a/tests/dumptest b/tests/dumptest deleted file mode 100755 index f9247c7..0000000 --- a/tests/dumptest +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python - -import re, sys, subprocess - -subprocess.check_call([sys.argv[2], sys.argv[1], '-o', sys.argv[3]]) - -result = open(sys.argv[3]).read() - -result = re.sub(r', timestamp = [0-9]*', '', result) -result = re.sub(r'-?[0-9].[0-9]*e-[0-9]{2,}', '0', result) - -open(sys.argv[3], 'w').write(result) diff --git a/tests/echotest b/tests/echotest deleted file mode 100755 index a2302ff..0000000 --- a/tests/echotest +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python - -import re, sys, subprocess - -result = subprocess.Popen([sys.argv[2], sys.argv[1], '-o', 'null'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[1] -result = re.sub(r'-?[0-9].[0-9]*e-[0-9]{2,}', '0', result) - -open(sys.argv[3], 'w').write(result) diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index 470be1e..6977a88 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # # Regression test driver for cmd-line tools -- cgit v0.10.1 From efc6731774ca6e0da4453921ab0daeadc44ee8bc Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 21 Sep 2013 09:04:01 -0500 Subject: make echotest work on BSD, by adding .echo as recognized extension diff --git a/doc/testing.txt b/doc/testing.txt index f609b65..5617e61 100644 --- a/doc/testing.txt +++ b/doc/testing.txt @@ -73,7 +73,6 @@ Two tests still need an intermediate script that mangles away timestamps and near-zero floating point numbers: * dumptest -* echotest * cgalstlsanitytest Some tests are yet to be converted: @@ -85,15 +84,6 @@ These look like tests, but are not actually in use: * modulecachetest * cgalcachetest -In the course of migration, the possibilities of using the OPENSCAD_TESTING -compile time flag go away; that flag used to strip timestamps out of files, -to unify float output, and to tweak the file inclusion paths. With that flag -unused, we get better coverage of the primary code paths, at the cost of -having to do some normalization in the unit testing process (thus the dumptest -and echo test scripts). Especially, having a nonstandard MCAD library in the -user include path can now break things -- but so can having misbehaving -programs in your PATH. - Troubleshooting: ------------------------------ diff --git a/src/openscad.cc b/src/openscad.cc index d8ce112..82afc16 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -83,15 +83,18 @@ using std::vector; using boost::lexical_cast; using boost::is_any_of; -static void echotest_output_handler( const std::string &msg, void *userdata ) +class Echostream : public std::ofstream { - std::ofstream *outstream = static_cast(userdata); - if (!outstream->is_open()) { - fprintf(stderr,"Error writing outstream\n" ); - return; +public: + Echostream( const char * filename ) : std::ofstream( filename ) + { + set_output_handler( &Echostream::output, this ); } - *outstream << msg; -} + static void output( const std::string &msg, void *userdata ) { + Echostream *thisp = static_cast(userdata); + *thisp << msg << "\n"; + } +}; static void help(const char *progname) { @@ -186,7 +189,7 @@ Camera get_camera( po::variables_map vm ) return camera; } -int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer, char ** argv ) +int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer, char ** argv, bool echo ) { parser_init(boosty::stringy(boost::filesystem::path( argv[0] ).parent_path())); Tree tree; @@ -201,7 +204,7 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *png_output_file = NULL; const char *ast_output_file = NULL; const char *term_output_file = NULL; - const char *echotest_output_file = NULL; + const char *echo_output_file = NULL; std::string suffix = boosty::extension_str( output_file ); boost::algorithm::to_lower( suffix ); @@ -213,7 +216,7 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, else if (suffix == ".png") png_output_file = output_file; else if (suffix == ".ast") ast_output_file = output_file; else if (suffix == ".term") term_output_file = output_file; - else if (suffix == ".echotest") echotest_output_file = output_file; + else if (suffix == ".echo") echo_output_file = output_file; else { fprintf(stderr, "Unknown suffix for output file %s\n", output_file); return 1; @@ -226,14 +229,8 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, top_ctx.dump(NULL, NULL); #endif - if (echotest_output_file) { - std::ofstream fstream( echotest_output_file ); - if (!fstream.is_open()) { - PRINTB("Can't open file \"%s\" for export", csg_output_file); - } else { - set_output_handler( echotest_output_handler, fstream ); - } - } + Echostream *echostream; + if (echo_output_file) echostream = new Echostream( echo_output_file ); FileModule *root_module; ModuleInstantiation root_inst("group"); @@ -273,6 +270,8 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, tree.setRoot(root_node); + if (echostream) echostream->close(); + if (csg_output_file) { fs::current_path(original_path); std::ofstream fstream(csg_output_file); @@ -320,8 +319,8 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, } else { #ifdef ENABLE_CGAL - if ((echotest_output_file || png_output_file) && !(renderer==Render::CGAL)) { - // echotest or OpenCSG png -> don't necessarily need CGALMesh evaluation + if ((echo_output_file || png_output_file) && !(renderer==Render::CGAL)) { + // echo or OpenCSG png -> don't necessarily need CGALMesh evaluation } else { root_N = cgalevaluator.evaluateCGALMesh(*tree.root()); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4c4bf9f..61a3520 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -897,7 +897,7 @@ add_cmdline_test(csgtermtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX term FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad) -add_cmdline_test(echotest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX echotest FILES ${ECHO_FILES}) +add_cmdline_test(echotest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX echo FILES ${ECHO_FILES}) add_cmdline_test(dumptest EXE ${OPENSCAD_BINPATH} ARGS -o dump SUFFIX csg FILES ${DUMPTEST_FILES}) add_cmdline_test(cgalpngtest EXE ${OPENSCAD_BINPATH} ARGS --render -o SUFFIX png FILES ${CGALPNGTEST_FILES}) add_cmdline_test(opencsgtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX png FILES ${OPENCSGTEST_FILES}) diff --git a/tests/regression/echotest/builtin-tests-expected.echo b/tests/regression/echotest/builtin-tests-expected.echo new file mode 100644 index 0000000..385b0dc --- /dev/null +++ b/tests/regression/echotest/builtin-tests-expected.echo @@ -0,0 +1 @@ +ECHO: 3.14159265359 diff --git a/tests/regression/echotest/builtin-tests-expected.txt b/tests/regression/echotest/builtin-tests-expected.txt deleted file mode 100644 index 385b0dc..0000000 --- a/tests/regression/echotest/builtin-tests-expected.txt +++ /dev/null @@ -1 +0,0 @@ -ECHO: 3.14159265359 diff --git a/tests/regression/echotest/dim-all-expected.echo b/tests/regression/echotest/dim-all-expected.echo new file mode 100644 index 0000000..a16c580 --- /dev/null +++ b/tests/regression/echotest/dim-all-expected.echo @@ -0,0 +1,16 @@ +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: linearX = 51.44957554275 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: linearY = 29.13025467434 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: aligned = 60 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: ordinateX = -49.17542445724 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: ordinateY = 30.86974532565 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: radius = 60 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: diameter = 120 +WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". +ECHO: arc = 59.03624346792 diff --git a/tests/regression/echotest/dim-all-expected.txt b/tests/regression/echotest/dim-all-expected.txt deleted file mode 100644 index a16c580..0000000 --- a/tests/regression/echotest/dim-all-expected.txt +++ /dev/null @@ -1,16 +0,0 @@ -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: linearX = 51.44957554275 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: linearY = 29.13025467434 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: aligned = 60 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: ordinateX = -49.17542445724 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: ordinateY = 30.86974532565 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: radius = 60 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: diameter = 120 -WARNING: Unsupported DXF Entity 'LEADER' (1) in "dim-all.dxf". -ECHO: arc = 59.03624346792 diff --git a/tests/regression/echotest/echo-expected.echo b/tests/regression/echotest/echo-expected.echo new file mode 100644 index 0000000..8fc094e --- /dev/null +++ b/tests/regression/echotest/echo-expected.echo @@ -0,0 +1 @@ +ECHO: diff --git a/tests/regression/echotest/echo-expected.txt b/tests/regression/echotest/echo-expected.txt deleted file mode 100644 index 8fc094e..0000000 --- a/tests/regression/echotest/echo-expected.txt +++ /dev/null @@ -1 +0,0 @@ -ECHO: diff --git a/tests/regression/echotest/echo-tests-expected.echo b/tests/regression/echotest/echo-tests-expected.echo new file mode 100644 index 0000000..d7ebe2f --- /dev/null +++ b/tests/regression/echotest/echo-tests-expected.echo @@ -0,0 +1,10 @@ +ECHO: undef +ECHO: "string" +ECHO: "stringvar" +ECHO: a = 1, b = 2, true, c = false +ECHO: [1, "vecstr", 2.34, false] +ECHO: [1 : 2 : 10] +ECHO: vec = [1, 2, 3] +ECHO: range = [0 : 1 : 2] +ECHO: "string generated by str()" +ECHO: 0.8 diff --git a/tests/regression/echotest/echo-tests-expected.txt b/tests/regression/echotest/echo-tests-expected.txt deleted file mode 100644 index d7ebe2f..0000000 --- a/tests/regression/echotest/echo-tests-expected.txt +++ /dev/null @@ -1,10 +0,0 @@ -ECHO: undef -ECHO: "string" -ECHO: "stringvar" -ECHO: a = 1, b = 2, true, c = false -ECHO: [1, "vecstr", 2.34, false] -ECHO: [1 : 2 : 10] -ECHO: vec = [1, 2, 3] -ECHO: range = [0 : 1 : 2] -ECHO: "string generated by str()" -ECHO: 0.8 diff --git a/tests/regression/echotest/escape-test-expected.echo b/tests/regression/echotest/escape-test-expected.echo new file mode 100644 index 0000000..e69de29 diff --git a/tests/regression/echotest/escape-test-expected.txt b/tests/regression/echotest/escape-test-expected.txt deleted file mode 100644 index e69de29..0000000 diff --git a/tests/regression/echotest/expression-shortcircuit-tests-expected.echo b/tests/regression/echotest/expression-shortcircuit-tests-expected.echo new file mode 100644 index 0000000..d7f1c40 --- /dev/null +++ b/tests/regression/echotest/expression-shortcircuit-tests-expected.echo @@ -0,0 +1,5 @@ +ECHO: "Pass" +ECHO: "Pass" +ECHO: "Pass" +ECHO: "Pass" +ECHO: "Pass" diff --git a/tests/regression/echotest/expression-shortcircuit-tests-expected.txt b/tests/regression/echotest/expression-shortcircuit-tests-expected.txt deleted file mode 100644 index d7f1c40..0000000 --- a/tests/regression/echotest/expression-shortcircuit-tests-expected.txt +++ /dev/null @@ -1,5 +0,0 @@ -ECHO: "Pass" -ECHO: "Pass" -ECHO: "Pass" -ECHO: "Pass" -ECHO: "Pass" diff --git a/tests/regression/echotest/inf-tests-expected.echo b/tests/regression/echotest/inf-tests-expected.echo new file mode 100644 index 0000000..7ac4fe9 --- /dev/null +++ b/tests/regression/echotest/inf-tests-expected.echo @@ -0,0 +1,23 @@ +ECHO: inf +ECHO: -inf +ECHO: nan +ECHO: nan +ECHO: nan +ECHO: nan +ECHO: nan +ECHO: 90 +ECHO: -90 +ECHO: 135 +ECHO: inf +ECHO: inf +ECHO: undef +ECHO: inf +ECHO: inf +ECHO: inf +ECHO: -inf +ECHO: inf +ECHO: inf +ECHO: 1 +ECHO: -1 +ECHO: inf +ECHO: nan diff --git a/tests/regression/echotest/inf-tests-expected.txt b/tests/regression/echotest/inf-tests-expected.txt deleted file mode 100644 index 7ac4fe9..0000000 --- a/tests/regression/echotest/inf-tests-expected.txt +++ /dev/null @@ -1,23 +0,0 @@ -ECHO: inf -ECHO: -inf -ECHO: nan -ECHO: nan -ECHO: nan -ECHO: nan -ECHO: nan -ECHO: 90 -ECHO: -90 -ECHO: 135 -ECHO: inf -ECHO: inf -ECHO: undef -ECHO: inf -ECHO: inf -ECHO: inf -ECHO: -inf -ECHO: inf -ECHO: inf -ECHO: 1 -ECHO: -1 -ECHO: inf -ECHO: nan diff --git a/tests/regression/echotest/len-tests-expected.echo b/tests/regression/echotest/len-tests-expected.echo new file mode 100644 index 0000000..2a776c0 --- /dev/null +++ b/tests/regression/echotest/len-tests-expected.echo @@ -0,0 +1,7 @@ +ECHO: 4 +ECHO: 4 +ECHO: 0 +ECHO: 0 +ECHO: 2 +ECHO: 3 +ECHO: undef diff --git a/tests/regression/echotest/len-tests-expected.txt b/tests/regression/echotest/len-tests-expected.txt deleted file mode 100644 index 2a776c0..0000000 --- a/tests/regression/echotest/len-tests-expected.txt +++ /dev/null @@ -1,7 +0,0 @@ -ECHO: 4 -ECHO: 4 -ECHO: 0 -ECHO: 0 -ECHO: 2 -ECHO: 3 -ECHO: undef diff --git a/tests/regression/echotest/lookup-tests-expected.echo b/tests/regression/echotest/lookup-tests-expected.echo new file mode 100644 index 0000000..b98ebe2 --- /dev/null +++ b/tests/regression/echotest/lookup-tests-expected.echo @@ -0,0 +1,15 @@ +ECHO: undef +ECHO: undef +ECHO: undef +ECHO: undef +ECHO: 0 +ECHO: 0.5 +ECHO: -55 +ECHO: -55 +ECHO: -54.44444444444 +ECHO: -2.5 +ECHO: 0 +ECHO: 0.9 +ECHO: 6.66666666666 +ECHO: 333 +ECHO: 333 diff --git a/tests/regression/echotest/lookup-tests-expected.txt b/tests/regression/echotest/lookup-tests-expected.txt deleted file mode 100644 index b98ebe2..0000000 --- a/tests/regression/echotest/lookup-tests-expected.txt +++ /dev/null @@ -1,15 +0,0 @@ -ECHO: undef -ECHO: undef -ECHO: undef -ECHO: undef -ECHO: 0 -ECHO: 0.5 -ECHO: -55 -ECHO: -55 -ECHO: -54.44444444444 -ECHO: -2.5 -ECHO: 0 -ECHO: 0.9 -ECHO: 6.66666666666 -ECHO: 333 -ECHO: 333 diff --git a/tests/regression/echotest/parser-tests-expected.echo b/tests/regression/echotest/parser-tests-expected.echo new file mode 100644 index 0000000..615726a --- /dev/null +++ b/tests/regression/echotest/parser-tests-expected.echo @@ -0,0 +1,5 @@ +ECHO: 0.1 +ECHO: 2 +ECHO: 1100 +ECHO: 0.021 +ECHO: 0 diff --git a/tests/regression/echotest/parser-tests-expected.txt b/tests/regression/echotest/parser-tests-expected.txt deleted file mode 100644 index 615726a..0000000 --- a/tests/regression/echotest/parser-tests-expected.txt +++ /dev/null @@ -1,5 +0,0 @@ -ECHO: 0.1 -ECHO: 2 -ECHO: 1100 -ECHO: 0.021 -ECHO: 0 diff --git a/tests/regression/echotest/rands-expected.echo b/tests/regression/echotest/rands-expected.echo new file mode 100644 index 0000000..36ac6cd --- /dev/null +++ b/tests/regression/echotest/rands-expected.echo @@ -0,0 +1,3 @@ +WARNING: Ignoring unknown variable 'v'. +ECHO: "i hope rands() did not crash" +ECHO: [1, 1, 1, 1] diff --git a/tests/regression/echotest/rands-expected.txt b/tests/regression/echotest/rands-expected.txt deleted file mode 100644 index 36ac6cd..0000000 --- a/tests/regression/echotest/rands-expected.txt +++ /dev/null @@ -1,3 +0,0 @@ -WARNING: Ignoring unknown variable 'v'. -ECHO: "i hope rands() did not crash" -ECHO: [1, 1, 1, 1] diff --git a/tests/regression/echotest/recursion-tests-expected.echo b/tests/regression/echotest/recursion-tests-expected.echo new file mode 100644 index 0000000..e5c99b1 --- /dev/null +++ b/tests/regression/echotest/recursion-tests-expected.echo @@ -0,0 +1,2 @@ +ERROR: Recursion detected calling function 'crash' +ECHO: undef diff --git a/tests/regression/echotest/recursion-tests-expected.txt b/tests/regression/echotest/recursion-tests-expected.txt deleted file mode 100644 index e5c99b1..0000000 --- a/tests/regression/echotest/recursion-tests-expected.txt +++ /dev/null @@ -1,2 +0,0 @@ -ERROR: Recursion detected calling function 'crash' -ECHO: undef diff --git a/tests/regression/echotest/search-tests-expected.echo b/tests/regression/echotest/search-tests-expected.echo new file mode 100644 index 0000000..0269f43 --- /dev/null +++ b/tests/regression/echotest/search-tests-expected.echo @@ -0,0 +1,20 @@ + WARNING: search term not found: "q" + WARNING: search term not found: 1000 + WARNING: search term not found: "zzz" + WARNING: search term not found: "zzz" + WARNING: search term not found: 500 + WARNING: 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/search-tests-expected.txt b/tests/regression/echotest/search-tests-expected.txt deleted file mode 100644 index 0269f43..0000000 --- a/tests/regression/echotest/search-tests-expected.txt +++ /dev/null @@ -1,20 +0,0 @@ - WARNING: search term not found: "q" - WARNING: search term not found: 1000 - WARNING: search term not found: "zzz" - WARNING: search term not found: "zzz" - WARNING: search term not found: 500 - WARNING: 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/string-indexing-expected.echo b/tests/regression/echotest/string-indexing-expected.echo new file mode 100644 index 0000000..3fcdfa4 --- /dev/null +++ b/tests/regression/echotest/string-indexing-expected.echo @@ -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-indexing-expected.txt b/tests/regression/echotest/string-indexing-expected.txt deleted file mode 100644 index 3fcdfa4..0000000 --- a/tests/regression/echotest/string-indexing-expected.txt +++ /dev/null @@ -1,11 +0,0 @@ -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.echo b/tests/regression/echotest/string-test-expected.echo new file mode 100644 index 0000000..1969a74 --- /dev/null +++ b/tests/regression/echotest/string-test-expected.echo @@ -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/echotest/string-test-expected.txt b/tests/regression/echotest/string-test-expected.txt deleted file mode 100644 index 1969a74..0000000 --- a/tests/regression/echotest/string-test-expected.txt +++ /dev/null @@ -1 +0,0 @@ -ECHO: "The quick brown fox \tjumps \"over\" the lazy dog. The quick brown fox.\nThe \\lazy\\ dog." diff --git a/tests/regression/echotest/value-reassignment-tests-expected.echo b/tests/regression/echotest/value-reassignment-tests-expected.echo new file mode 100644 index 0000000..344f7ab --- /dev/null +++ b/tests/regression/echotest/value-reassignment-tests-expected.echo @@ -0,0 +1,2 @@ +WARNING: Ignoring unknown variable 'i'. +ECHO: undef, 2 diff --git a/tests/regression/echotest/value-reassignment-tests-expected.txt b/tests/regression/echotest/value-reassignment-tests-expected.txt deleted file mode 100644 index 344f7ab..0000000 --- a/tests/regression/echotest/value-reassignment-tests-expected.txt +++ /dev/null @@ -1,2 +0,0 @@ -WARNING: Ignoring unknown variable 'i'. -ECHO: undef, 2 diff --git a/tests/regression/echotest/value-reassignment-tests2-expected.echo b/tests/regression/echotest/value-reassignment-tests2-expected.echo new file mode 100644 index 0000000..efb1be7 --- /dev/null +++ b/tests/regression/echotest/value-reassignment-tests2-expected.echo @@ -0,0 +1 @@ +ECHO: 3, 3 diff --git a/tests/regression/echotest/value-reassignment-tests2-expected.txt b/tests/regression/echotest/value-reassignment-tests2-expected.txt deleted file mode 100644 index efb1be7..0000000 --- a/tests/regression/echotest/value-reassignment-tests2-expected.txt +++ /dev/null @@ -1 +0,0 @@ -ECHO: 3, 3 diff --git a/tests/regression/echotest/variable-scope-tests-expected.echo b/tests/regression/echotest/variable-scope-tests-expected.echo new file mode 100644 index 0000000..2a82090 --- /dev/null +++ b/tests/regression/echotest/variable-scope-tests-expected.echo @@ -0,0 +1,27 @@ +ECHO: "special variable inheritance" +ECHO: 23, 5 +WARNING: Ignoring unknown variable 'a'. +ECHO: undef +ECHO: 23, 5 +ECHO: "$children scope" +ECHO: "$children should be 1: ", 1 +ECHO: "$children should be 4: ", 4 +ECHO: "$children should be 1: ", 1 +ECHO: "child_module_1 child" +ECHO: "child_module_2 child 0" +ECHO: "child_module_2 child 1" +ECHO: "copy $children" +ECHO: "copy_children_module: ", 2, 2 +ECHO: "inner variables shadows parameter" +ECHO: 5, 24 +ECHO: "user-defined special variables as parameter" +ECHO: 7 +ECHO: 7 +ECHO: "assign only visible in children's scope" +WARNING: Ignoring unknown variable 'c'. +ECHO: undef +ECHO: 5 +ECHO: "undeclared variable can still be passed and used" +ECHO: 6 +ECHO: "attempt to assign from a not-yet-defined variable which also exists globally" +ECHO: 5, 1 diff --git a/tests/regression/echotest/variable-scope-tests-expected.txt b/tests/regression/echotest/variable-scope-tests-expected.txt deleted file mode 100644 index 2a82090..0000000 --- a/tests/regression/echotest/variable-scope-tests-expected.txt +++ /dev/null @@ -1,27 +0,0 @@ -ECHO: "special variable inheritance" -ECHO: 23, 5 -WARNING: Ignoring unknown variable 'a'. -ECHO: undef -ECHO: 23, 5 -ECHO: "$children scope" -ECHO: "$children should be 1: ", 1 -ECHO: "$children should be 4: ", 4 -ECHO: "$children should be 1: ", 1 -ECHO: "child_module_1 child" -ECHO: "child_module_2 child 0" -ECHO: "child_module_2 child 1" -ECHO: "copy $children" -ECHO: "copy_children_module: ", 2, 2 -ECHO: "inner variables shadows parameter" -ECHO: 5, 24 -ECHO: "user-defined special variables as parameter" -ECHO: 7 -ECHO: 7 -ECHO: "assign only visible in children's scope" -WARNING: Ignoring unknown variable 'c'. -ECHO: undef -ECHO: 5 -ECHO: "undeclared variable can still be passed and used" -ECHO: 6 -ECHO: "attempt to assign from a not-yet-defined variable which also exists globally" -ECHO: 5, 1 diff --git a/tests/regression/echotest/vector-values-expected.echo b/tests/regression/echotest/vector-values-expected.echo new file mode 100644 index 0000000..78053b9 --- /dev/null +++ b/tests/regression/echotest/vector-values-expected.echo @@ -0,0 +1,10 @@ +ECHO: "Testing vector dot product: 14" +ECHO: " Bounds check: undef" +ECHO: "Testing matrix * vector: [3, 2, 13]" +ECHO: " Bounds check: undef" +ECHO: "Testing vector * matrix: [9, 8]" +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/echotest/vector-values-expected.txt b/tests/regression/echotest/vector-values-expected.txt deleted file mode 100644 index 78053b9..0000000 --- a/tests/regression/echotest/vector-values-expected.txt +++ /dev/null @@ -1,10 +0,0 @@ -ECHO: "Testing vector dot product: 14" -ECHO: " Bounds check: undef" -ECHO: "Testing matrix * vector: [3, 2, 13]" -ECHO: " Bounds check: undef" -ECHO: "Testing vector * matrix: [9, 8]" -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" -- cgit v0.10.1 From 8c11a091d57b684bdb1a4f652c9534dd2b6104ba Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 21 Sep 2013 10:25:36 -0500 Subject: use debug symbols for test binaries. also remove echostream pointer diff --git a/src/openscad.cc b/src/openscad.cc index 82afc16..49ec31c 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -86,14 +86,16 @@ using boost::is_any_of; class Echostream : public std::ofstream { public: - Echostream( const char * filename ) : std::ofstream( filename ) - { + Echostream( const char * filename ) : std::ofstream( filename ) { set_output_handler( &Echostream::output, this ); } static void output( const std::string &msg, void *userdata ) { Echostream *thisp = static_cast(userdata); *thisp << msg << "\n"; } + ~Echostream() { + this->close(); + } }; static void help(const char *progname) @@ -189,7 +191,7 @@ Camera get_camera( po::variables_map vm ) return camera; } -int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer, char ** argv, bool echo ) +int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer, char ** argv ) { parser_init(boosty::stringy(boost::filesystem::path( argv[0] ).parent_path())); Tree tree; @@ -228,9 +230,9 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, #if 0 && DEBUG top_ctx.dump(NULL, NULL); #endif - - Echostream *echostream; - if (echo_output_file) echostream = new Echostream( echo_output_file ); + shared_ptr echostream; + if (echo_output_file) + echostream.reset( new Echostream( echo_output_file ) ); FileModule *root_module; ModuleInstantiation root_inst("group"); @@ -270,8 +272,6 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, tree.setRoot(root_node); - if (echostream) echostream->close(); - if (csg_output_file) { fs::current_path(original_path); std::ofstream fstream(csg_output_file); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 61a3520..1c9eb9a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,8 +40,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") # Build debug build as default if(NOT CMAKE_BUILD_TYPE) -# set(CMAKE_BUILD_TYPE RelWithDebInfo) - set(CMAKE_BUILD_TYPE Release) + set(CMAKE_BUILD_TYPE RelWithDebInfo) +# set(CMAKE_BUILD_TYPE Release) endif() if(CMAKE_COMPILER_IS_GNUCXX) @@ -898,7 +898,7 @@ add_cmdline_test(csgtermtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX term FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad) add_cmdline_test(echotest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX echo FILES ${ECHO_FILES}) -add_cmdline_test(dumptest EXE ${OPENSCAD_BINPATH} ARGS -o dump SUFFIX csg FILES ${DUMPTEST_FILES}) +add_cmdline_test(dumptest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX csg FILES ${DUMPTEST_FILES}) add_cmdline_test(cgalpngtest EXE ${OPENSCAD_BINPATH} ARGS --render -o SUFFIX png FILES ${CGALPNGTEST_FILES}) add_cmdline_test(opencsgtest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX png FILES ${OPENCSGTEST_FILES}) add_cmdline_test(throwntogethertest EXE ${OPENSCAD_BINPATH} ARGS --preview=throwntogether -o SUFFIX png FILES ${THROWNTOGETHERTEST_FILES}) -- cgit v0.10.1 From c6600f88414690f02251c0751b15a33ec0a8b553 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 21 Sep 2013 10:35:36 -0500 Subject: dumptest should be fine now on BSD, using openscad binary diff --git a/doc/testing.txt b/doc/testing.txt index 5617e61..ee560a5 100644 --- a/doc/testing.txt +++ b/doc/testing.txt @@ -69,10 +69,9 @@ This is almost the same as adding a new regression test: Migration away from dedicated regression tests: ----------------------------------------------- -Two tests still need an intermediate script that mangles away timestamps and +This test still needs an intermediate script that mangles away timestamps and near-zero floating point numbers: -* dumptest * cgalstlsanitytest Some tests are yet to be converted: -- cgit v0.10.1 From 4ebd8136a83325e67be7a39c9349ec8812aa05c1 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 22 Sep 2013 05:30:41 -0500 Subject: enable clang for freebsd (tested on freebsd 9) diff --git a/libraries/MCAD b/libraries/MCAD index 9a958fd..1cc850b 160000 --- a/libraries/MCAD +++ b/libraries/MCAD @@ -1 +1 @@ -Subproject commit 9a958fd11b0a6b5f8becd37c4f8a42f585abfcd8 +Subproject commit 1cc850b44914e1863adfaea2d6f9c848bbc514ea diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh index d5ccb75..cfcf23d 100644 --- a/scripts/setenv-unibuild.sh +++ b/scripts/setenv-unibuild.sh @@ -43,9 +43,15 @@ setenv_common() setenv_freebsd() { + echo .... freebsd detected. + echo .... if you have freebsd >9, it is advisable to install + echo .... the clang compiler and re-run this script as + echo .... '. ./scripts/setenv-unibuild.sh clang' setenv_common QMAKESPEC=freebsd-g++ QTDIR=/usr/local/share/qt4 + export QMAKESPEC + export QTDIR } setenv_netbsd() @@ -78,6 +84,17 @@ setenv_linux_clang() echo QMAKESPEC has been modified: $QMAKESPEC } +setenv_freebsd_clang() +{ + export CC=clang + export CXX=clang++ + export QMAKESPEC=freebsd-clang + + echo CC has been modified: $CC + echo CXX has been modified: $CXX + echo QMAKESPEC has been modified: $QMAKESPEC +} + setenv_netbsd_clang() { echo --------------------- this is not yet supported. netbsd 6 lacks @@ -141,6 +158,9 @@ if [ "`uname | grep -i 'linux\|debian'`" ]; then fi elif [ "`uname | grep -i freebsd`" ]; then setenv_freebsd + if [ "`echo $* | grep clang`" ]; then + setenv_freebsd_clang + fi elif [ "`uname | grep -i netbsd`" ]; then setenv_netbsd if [ "`echo $* | grep clang`" ]; then -- cgit v0.10.1 From 40a198a0870d53f491ba72a95a57b9f405d031c0 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 22 Sep 2013 16:35:29 -0500 Subject: tweaks for building on older machines diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 6596c8a..bc2b179 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -53,6 +53,16 @@ printUsage() echo } +detect_glu() +{ + detect_glu_result= + if [ -e $DEPLOYDIR/include/GL/glu.h ]; then detect_glu_result=1; fi + if [ -e /usr/include/GL/glu.h ]; then detect_glu_result=1; fi + if [ -e /usr/local/include/GL/glu.h ]; then detect_glu_result=1; fi + if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then detect_glu_result=1; fi + return +} + build_glu() { version=$1 @@ -436,7 +446,8 @@ build_opencsg() cp src/Makefile src/Makefile.bak2 cat src/Makefile.bak2 | sed s@^LIBS.*@LIBS\ =\ -L$BASEDIR/lib\ -L/usr/X11R6/lib\ -lGLU\ -lGL@ > src/Makefile tmp=$version - build_glu 9.0.0 # todo - autodetect the need for glu + detect_glu + if [ ! $detect_glu_result ]; then build_glu 9.0.0 ; fi version=$tmp fi @@ -583,6 +594,8 @@ if [ $1 ]; then fi +# todo - cgal 4.02 for gcc<4.7, gcc 4.2 for above + # # Main build of libraries # edit version numbers here as needed. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 387d6ee..5405d04 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -38,8 +38,17 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") # Build debug build as default if(NOT CMAKE_BUILD_TYPE) -# set(CMAKE_BUILD_TYPE RelWithDebInfo) - set(CMAKE_BUILD_TYPE Release) + # set(CMAKE_BUILD_TYPE Release) + if(CMAKE_COMPILER_IS_GNUCXX) + execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) + if (GCC_VERSION VERSION_GREATER 4.6) + set(CMAKE_BUILD_TYPE RelWithDebInfo) + else() + set(CMAKE_BUILD_TYPE Debug) + endif() + else() + set(CMAKE_BUILD_TYPE RelWithDebInfo) + endif() endif() if(CMAKE_COMPILER_IS_GNUCXX) -- cgit v0.10.1 From c78c0e88758fe4505a65abaa6cafc1ef36733e91 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 22 Sep 2013 16:46:48 -0500 Subject: turn off extra debug in cmakelist diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8e08204..ab94e64 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,6 @@ # instructions - see ../doc/testing.txt -set(DEBUG_OSCD 1) # print debug info during cmake +# set(DEBUG_OSCD 1) # print debug info during cmake cmake_minimum_required(VERSION 2.8) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) @@ -40,7 +40,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") # Build debug build as default if(NOT CMAKE_BUILD_TYPE) -<<<<<<< HEAD # set(CMAKE_BUILD_TYPE Release) if(CMAKE_COMPILER_IS_GNUCXX) execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) @@ -52,10 +51,6 @@ if(NOT CMAKE_BUILD_TYPE) else() set(CMAKE_BUILD_TYPE RelWithDebInfo) endif() -======= - set(CMAKE_BUILD_TYPE RelWithDebInfo) -# set(CMAKE_BUILD_TYPE Release) ->>>>>>> 4ebd8136a83325e67be7a39c9349ec8812aa05c1 endif() if(CMAKE_COMPILER_IS_GNUCXX) -- cgit v0.10.1 From 204b3de3a0a069a56ae0f31f3a2cf08ed4ed5efd Mon Sep 17 00:00:00 2001 From: Don Bright Date: Wed, 2 Oct 2013 17:37:38 -0500 Subject: fix broken build diff --git a/src/openscad.cc b/src/openscad.cc index 8d368a9..f9938a8 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -36,6 +36,7 @@ #include "parsersettings.h" #include "rendersettings.h" #include "PlatformUtils.h" +#include "nodedumper.h" #include #include -- cgit v0.10.1 From 7273e5b5a967b5625a813f34cda7b2a8382ba4d0 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 3 Oct 2013 23:21:26 -0400 Subject: Make recent examplesdir changws work for MDI mode diff --git a/src/MainWindow.h b/src/MainWindow.h index 46a2996..4f88fbf 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -54,12 +54,12 @@ public: std::vector > background_terms; CSGChain *background_chain; QString last_compiled_doc; - QString qexamplesdir; + static QString qexamplesdir; static const int maxRecentFiles = 10; QAction *actionRecentFile[maxRecentFiles]; - MainWindow(const QString &filename, const QString &examplesdir); + MainWindow(const QString &filename); ~MainWindow(); protected: @@ -135,6 +135,7 @@ private slots: void actionFlushCaches(); public: + static void setExamplesDir(const QString &dir) { MainWindow::qexamplesdir = dir; } void viewModeActionsUncheck(); void setCurrentOutput(); void clearCurrentOutput(); @@ -202,7 +203,7 @@ public: static void unlock() { gui_locked--; } private: - static unsigned int gui_locked; + static unsigned int gui_locked; }; #endif diff --git a/src/mainwin.cc b/src/mainwin.cc index ea7da66..65c511f 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -104,6 +104,7 @@ // Global application state unsigned int GuiLocker::gui_locked = 0; +QString MainWindow::qexamplesdir; #define QUOTE(x__) # x__ #define QUOTED(x__) QUOTE(x__) @@ -153,7 +154,7 @@ settings_valueList(const QString &key, const QList &defaultList = QListqexamplesdir = examplesdir; this->openglbox = NULL; root_module = NULL; absolute_root_node = NULL; diff --git a/src/openscad.cc b/src/openscad.cc index f9938a8..6f85c0d 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -191,7 +191,7 @@ Camera get_camera( po::variables_map vm ) return camera; } -int cmdline( const char* deps_output_file, const char* filename, Camera &camera, const char *output_file, fs::path original_path, Render::type renderer, char ** argv ) +int cmdline(const char *deps_output_file, const std::string &filename, Camera &camera, const char *output_file, const fs::path &original_path, Render::type renderer, char ** argv ) { parser_init(boosty::stringy(boost::filesystem::path( argv[0] ).parent_path())); Tree tree; @@ -240,11 +240,11 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, AbstractNode *absolute_root_node; CGAL_Nef_polyhedron root_N; - handle_dep(filename); + handle_dep(filename.c_str()); - std::ifstream ifs(filename); + std::ifstream ifs(filename.c_str()); if (!ifs.is_open()) { - fprintf(stderr, "Can't open input file '%s'!\n", filename); + fprintf(stderr, "Can't open input file '%s'!\n", filename.c_str()); return 1; } std::string text((std::istreambuf_iterator(ifs)), std::istreambuf_iterator()); @@ -253,7 +253,7 @@ int cmdline( const char* deps_output_file, const char* filename, Camera &camera, std::string parentpath = boosty::stringy(abspath.parent_path()); root_module = parse(text.c_str(), parentpath.c_str(), false); if (!root_module) { - fprintf(stderr, "Can't parse file '%s'!\n", filename); + fprintf(stderr, "Can't parse file '%s'!\n", filename.c_str()); return 1; } root_module->handleDependencies(); @@ -452,7 +452,7 @@ bool QtUseGUI() return useGUI; } -int gui(const char * filename,int argc, char ** argv) +int gui(vector &inputFiles, const fs::path &original_path, int argc, char ** argv) { QApplication app(argc, argv, true); //useGUI); #ifdef Q_WS_MAC @@ -483,6 +483,7 @@ int gui(const char * filename,int argc, char ** argv) if (exdir.cd("examples")) { qexamplesdir = exdir.path(); } + MainWindow::setExamplesDir(qexamplesdir); parser_init(QApplication::instance()->applicationDirPath().toLocal8Bit().constData()); @@ -496,9 +497,6 @@ int gui(const char * filename,int argc, char ** argv) if (updater->automaticallyChecksForUpdates()) updater->checkForUpdates(); #endif - QString qfilename; - if (filename) qfilename = QString::fromLocal8Bit(boosty::stringy(boosty::absolute(filename)).c_str()); - #if 0 /*** disabled by clifford wolf: adds rendering artefacts with OpenCSG ***/ // turn on anti-aliasing QGLFormat f; @@ -506,25 +504,21 @@ int gui(const char * filename,int argc, char ** argv) f.setSamples(4); QGLFormat::setDefaultFormat(f); #endif + if (!inputFiles.size()) inputFiles.push_back(""); #ifdef ENABLE_MDI - new MainWindow(qfilename,qexamplesdir); - vector inputFiles; - if (vm.count("input-file")) { - inputFiles = vm["input-file"].as >(); - for (vector::const_iterator infile = inputFiles.begin()+1; infile != inputFiles.end(); infile++) { - new MainWindow(QString::fromLocal8Bit(boosty::stringy(original_path / *infile).c_str())); - } + BOOST_FOREACH(const string &infile, inputFiles) { + new MainWindow(QString::fromLocal8Bit(boosty::stringy(original_path / infile).c_str())); } app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit())); #else - MainWindow *m = new MainWindow(qfilename,qexamplesdir); + MainWindow *m = new MainWindow(QString::fromLocal8Bit(boosty::stringy(original_path / inputFiles[0]).c_str())); app.connect(m, SIGNAL(destroyed()), &app, SLOT(quit())); #endif return app.exec(); } #else // OPENSCAD_QTGUI bool QtUseGUI() { return false; } -int gui(const char * filename,int argc, char ** argv) +int gui(const vector &inputFiles, int argc, char ** argv) { fprintf(stderr,"Error: compiled without QT, but trying to run GUI\n"); return 1; @@ -627,13 +621,12 @@ int main(int argc, char **argv) commandline_commands += ";\n"; } } - - if (vm.count("input-file")) { - filename = vm["input-file"].as< vector >().begin()->c_str(); + vector inputFiles; + if (vm.count("input-file")) { + inputFiles = vm["input-file"].as >(); } - #ifndef ENABLE_MDI - if (vm.count("input-file") > 1) { + if (inputFiles.size() > 1) { help(argv[0]); } #endif @@ -646,17 +639,14 @@ int main(int argc, char **argv) NodeCache nodecache; NodeDumper dumper(nodecache); - if (output_file) - { - if (!filename) help(argv[0]); - rc = cmdline( deps_output_file, filename, camera, output_file, original_path, renderer, argv ); + if (output_file) { + if (!inputFiles.size()) help(argv[0]); + rc = cmdline(deps_output_file, inputFiles[0], camera, output_file, original_path, renderer, argv); } - else if (QtUseGUI()) - { - rc = gui(filename,argc,argv); + else if (QtUseGUI()) { + rc = gui(inputFiles, original_path, argc, argv); } - else - { + else { fprintf(stderr, "Requested GUI mode but can't open display!\n"); return 1; } -- cgit v0.10.1 From 5ed3e28b7a2e3eccb084cd582e4148a7aebb3b86 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 3 Oct 2013 23:34:59 -0400 Subject: Mac build fix for openscad_nogui diff --git a/src/EventFilter.h b/src/EventFilter.h index c3942b5..c883bfd 100644 --- a/src/EventFilter.h +++ b/src/EventFilter.h @@ -1,6 +1,8 @@ #ifndef FILTER_H_ #define FILTER_H_ +#ifdef OPENSCAD_QTGUI + #include #include #include "MainWindow.h" @@ -25,4 +27,6 @@ protected: } }; +#endif // OPENSCAD_QTGUI + #endif diff --git a/src/openscad.cc b/src/openscad.cc index 6f85c0d..a8bb24a 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -518,7 +518,7 @@ int gui(vector &inputFiles, const fs::path &original_path, int argc, cha } #else // OPENSCAD_QTGUI bool QtUseGUI() { return false; } -int gui(const vector &inputFiles, int argc, char ** argv) +int gui(const vector &inputFiles, const fs::path &original_path, int argc, char ** argv) { fprintf(stderr,"Error: compiled without QT, but trying to run GUI\n"); return 1; @@ -648,7 +648,7 @@ int main(int argc, char **argv) } else { fprintf(stderr, "Requested GUI mode but can't open display!\n"); - return 1; + help(argv[0]); } Builtins::instance(true); -- cgit v0.10.1