From cae91b57cf839ee7b8902ca8b47efd1dd6875121 Mon Sep 17 00:00:00 2001 From: don Date: Fri, 16 Dec 2011 21:49:26 -0600 Subject: improve OPENSCAD_LIBRARIES for use on freebsd diff --git a/openscad.pro b/openscad.pro index ac4200e..60870be 100644 --- a/openscad.pro +++ b/openscad.pro @@ -40,8 +40,8 @@ INCLUDEPATH += src # Used when manually installing 3rd party libraries OPENSCAD_LIBDIR = $$(OPENSCAD_LIBRARIES) !isEmpty(OPENSCAD_LIBDIR) { - QMAKE_INCDIR += $$OPENSCAD_LIBDIR/include - QMAKE_LIBDIR += $$OPENSCAD_LIBDIR/lib + INCLUDEPATH = $$OPENSCAD_LIBDIR/include $$INCLUDEPATH + QMAKE_LIBDIR = $$OPENSCAD_LIBDIR/lib $$QMAKE_LIBDIR } else { macx { -- cgit v0.10.1 From 52655b3b5f910fbdd8f6eddbf222bb2b18633f59 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 17 Dec 2011 13:17:11 -0600 Subject: -fno-strict-aliasing fix for GCC bug & link to wikibooks build instructions. diff --git a/doc/testing.txt b/doc/testing.txt index 67d14ba..4623a96 100644 --- a/doc/testing.txt +++ b/doc/testing.txt @@ -96,3 +96,9 @@ log as well as your sysinfo.txt file, as well as running 'ldd' against your binaries, to make sure that the proper versions of libraries are getting compiled and linked with the test binaries. +7. Other issues + +The OpenSCAD User Manual has a section on buildling. Check there for updates: + +http://en.wikibooks.org/wiki/OpenSCAD_User_Manual + diff --git a/openscad.pro b/openscad.pro index e38251a..ac49807 100644 --- a/openscad.pro +++ b/openscad.pro @@ -8,6 +8,10 @@ # OPENCSGDIR # OPENSCAD_LIBRARIES # +# Please see the 'Buildling' sections of the OpenSCAD user manual +# for updated tips & workarounds. +# +# http://en.wikibooks.org/wiki/OpenSCAD_User_Manual isEmpty(QT_VERSION) { error("Please use qmake for Qt 4 (probably qmake-qt4)") @@ -82,6 +86,11 @@ linux*:exists(/usr/lib64/libGLU*)|linux*:exists(/usr/lib/libGLU*) { LIBS += -lGLU } +# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs. +*g++* { + QMAKE_CXXFLAGS *= -fno-strict-aliasing +} + CONFIG(mingw-cross-env) { include(mingw-cross-env.pri) } -- cgit v0.10.1 From 3763f373b24902e494946611980b3759fba790ff Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 17 Dec 2011 17:32:17 -0600 Subject: add no-strict-aliasing to cmake of regression tests, fixing CGAL/GCC bugs diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 986076e..8f3f81f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,6 +13,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") # Build debug build as default if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") endif() if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") -- cgit v0.10.1 From 696c174b9133eda8a485f11dbc8a44d1674e5cba Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 17 Dec 2011 18:17:13 -0600 Subject: make it so test_pretty_print by default only shows failed tests diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 6fdc663..e377201 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -249,8 +249,8 @@ TESTLOG passed_tests = filter(lambda x: x.passed, tests) failed_tests = filter(lambda x: not x.passed, tests) - tests_to_report = tests - if failed_only: tests_to_report = failed_tests + tests_to_report = failed_tests + if include_passed: tests_to_report = tests try: percent = str(int(100.0*len(passed_tests) / len(tests))) except ZeroDivisionError: percent = 'n/a' @@ -317,8 +317,8 @@ def tohtml(wiki_rootpath, startdate, tests, enddate, sysinfo, sysid, makefiles): try: percent = str(int(100.0*len(passed_tests) / len(tests))) except ZeroDivisionError: percent = 'n/a' - tests_to_report = tests - if failed_only: tests_to_report = failed_tests + tests_to_report = failed_tests + if include_passed: tests_to_report = tests s='' @@ -495,7 +495,7 @@ maxretry = 10 if bool(os.getenv("TEST_GENERATE")): sys.exit(0) -failed_only = False -if '--failed-only' in sys.argv: failed_only = True +include_passed = False +if '--include-passed' in sys.argv: include_passed = True main() -- cgit v0.10.1 From 1a01aff2002d935129d499046fd4079f84b8f2bb Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 18 Dec 2011 13:03:12 -0600 Subject: fix zoomed-in panning (per Triffid Hunter bug report) diff --git a/src/glview.cc b/src/glview.cc index c96fe01..fb69f27 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -594,8 +594,8 @@ void GLView::mouseMoveEvent(QMouseEvent *event) if ((QApplication::keyboardModifiers() & Qt::ShiftModifier) != 0) { viewer_distance += (GLdouble)dy; } else { - object_trans_x += dx; - object_trans_z -= dy; + object_trans_x += dx * viewer_distance/1000; + object_trans_z -= dy * viewer_distance/1000; } } updateGL(); -- cgit v0.10.1 From fb28bc857649c2cab57476007e60827d7140c6f8 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 18 Dec 2011 13:04:26 -0600 Subject: initialize variables in glview.cc diff --git a/src/glview.cc b/src/glview.cc index fb69f27..0c8394a 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -500,6 +500,7 @@ void GLView::paintGL() // FIXME: This was an attempt to keep contrast with background, but is suboptimal // (e.g. nearly invisible against a gray background). int r,g,b; + r=g=b=0; // bgcol.getRgb(&r, &g, &b); glColor3d((255.0-r)/255.0, (255.0-g)/255.0, (255.0-b)/255.0); glBegin(GL_LINES); -- cgit v0.10.1 From 541db676ee079eef7a6614cdd991514bf0c8ff52 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 18 Dec 2011 13:17:24 -0600 Subject: make view rotation work like 2011.06 release. (per Triffid Hunter bug rpt) diff --git a/src/glview.cc b/src/glview.cc index 0c8394a..1dcddb7 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -388,12 +388,12 @@ void GLView::paintGL() gluLookAt(0.0, -viewer_distance, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0); - glTranslated(object_trans_x, object_trans_y, object_trans_z); - glRotated(object_rot_x, 1.0, 0.0, 0.0); glRotated(object_rot_y, 0.0, 1.0, 0.0); glRotated(object_rot_z, 0.0, 0.0, 1.0); + glTranslated(object_trans_x, object_trans_y, object_trans_z); + // FIXME: Crosshairs and axes are lighted, this doesn't make sense and causes them // to change color based on view orientation. if (showcrosshairs) -- cgit v0.10.1 From c2d94835b0fab1455c2e9ac290abfa80e5a9b09b Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sun, 18 Dec 2011 15:55:12 -0600 Subject: translate old style viewport mouse drag into Eigen math (see T. Hunter bug rpt) diff --git a/src/glview.cc b/src/glview.cc index 1dcddb7..59a56d6 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -58,6 +58,8 @@ #define FAR_FAR_AWAY 100000.0 +#include + GLView::GLView(QWidget *parent) : QGLWidget(parent), renderer(NULL) { init(); @@ -558,7 +560,6 @@ void GLView::mousePressEvent(QMouseEvent *event) setFocus(); } - void GLView::normalizeAngle(GLdouble& angle) { while(angle < 0) @@ -595,8 +596,37 @@ void GLView::mouseMoveEvent(QMouseEvent *event) if ((QApplication::keyboardModifiers() & Qt::ShiftModifier) != 0) { viewer_distance += (GLdouble)dy; } else { - object_trans_x += dx * viewer_distance/1000; - object_trans_z -= dy * viewer_distance/1000; + + double mx = +(dx) * viewer_distance/1000; + double my = -(dy) * viewer_distance/1000; + + Eigen::Matrix3d aax, aay, aaz, tm3; + aax = Eigen::AngleAxisd(-(object_rot_x/180) * M_PI,Eigen::Vector3d::UnitX()); + aay = Eigen::AngleAxisd(-(object_rot_y/180) * M_PI,Eigen::Vector3d::UnitY()); + aaz = Eigen::AngleAxisd(-(object_rot_z/180) * M_PI,Eigen::Vector3d::UnitZ()); + tm3 = Eigen::Matrix3d::Identity(); + tm3 = aaz * (aay * (aax * tm3)); + + Eigen::Matrix4d tm; + tm = Eigen::Matrix4d::Identity(); + for (int i=0;i<3;i++) for (int j=0;j<3;j++) tm(j,i)=tm3(j,i); + + Eigen::Matrix4d vec; + vec << + 0, 0, 0, mx, + 0, 0, 0, 0, + 0, 0, 0, my, + 0, 0, 0, 1 + ; + if ((QApplication::keyboardModifiers() & Qt::ShiftModifier) != 0) { + vec(0,3) = 0; + vec(1,3) = my; + vec(2,3) = 0; + } + tm = tm * vec; + object_trans_x += tm(0,3); + object_trans_y += tm(1,3); + object_trans_z += tm(2,3); } } updateGL(); -- cgit v0.10.1 From 87c915af43e6c6118b44581a67b6fb63861aa067 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 16:16:25 +0100 Subject: minor clarification diff --git a/doc/TODO.txt b/doc/TODO.txt index 6bb3a15..92ff8a0 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -189,6 +189,7 @@ IDEAS FOR LANGUAGE CHANGES -------------------------- o More strict checking of module parameters to make e.g. this fail: module test(a,b) { a=1; b=2; echo(a,b,c); } test(c=3); + (also for built-in modules) CODE ---- -- cgit v0.10.1 From 339aec3911f46f5a52faaae020a476391abec0c1 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 16:30:43 +0100 Subject: Supply the REQUIRED parameter to the find macros diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 986076e..a1e587f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -86,8 +86,9 @@ if (WIN32) set(BOOST_THREAD_USE_LIB TRUE) endif() -set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0") -find_package( Boost 1.35.0 COMPONENTS thread program_options ) +# Update this if FindBoost.cmake gets out of sync with the current boost release +# set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.0") +find_package( Boost 1.35.0 COMPONENTS thread program_options REQUIRED) if(Boost_FOUND) message(STATUS "Boost includes found: " ${Boost_INCLUDE_DIRS}) message(STATUS "Boost libraries found:") @@ -102,7 +103,7 @@ endif() # Mac OS X if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - FIND_LIBRARY(COCOA_LIBRARY Cocoa) + FIND_LIBRARY(COCOA_LIBRARY Cocoa REQUIRED) endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Qt4 @@ -112,7 +113,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON) endif() -find_package(OpenGL) +find_package(OpenGL REQUIRED) find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) include(${QT_USE_FILE}) @@ -187,14 +188,14 @@ if(WIN32_STATIC_BUILD) endif() # Flex/Bison -find_package(BISON) +find_package(BISON REQUIRED) if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") # FreeBSD has an old flex in /usr/bin and a new flex in /usr/local/bin set(FLEX_EXECUTABLE /usr/local/bin/flex) endif() -find_package(FLEX) +find_package(FLEX REQUIRED) # The COMPILE_FLAGS and forced C++ compiler is just to be compatible with qmake if (WIN32) set(FLEX_UNISTD_FLAG "-DYY_NO_UNISTD_H") -- cgit v0.10.1 From 80f50f0883157e00ae7fff1517f65b0aa9c1fd80 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 16:31:38 +0100 Subject: bugfix: The parameter yielded half as many segments as expected diff --git a/src/primitives.cc b/src/primitives.cc index b3fa45f..466a0c7 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -245,7 +245,7 @@ int get_fragments_from_r(double r, double fn, double fs, double fa) if (r < GRID_FINE) return 0; if (fn > 0.0) return (int)fn; - return (int)ceil(fmax(fmin(360.0 / fa, r*M_PI / fs), 5)); + return (int)ceil(fmax(fmin(360.0 / fa, r*2*M_PI / fs), 5)); } struct point2d { -- cgit v0.10.1 From 1d2c59184cee7d31a5f6d388fdb5afab57f174a9 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 16:55:01 +0100 Subject: Changed the default value of to 2 to avoid breaking existing scripts which assume a certain default tesselation behavior diff --git a/src/context.cc b/src/context.cc index bd97f8f..6d0cb3a 100644 --- a/src/context.cc +++ b/src/context.cc @@ -188,7 +188,7 @@ void register_builtin(Context &ctx) ctx.functions_p = &Builtins::instance()->functions(); ctx.modules_p = &Builtins::instance()->modules(); ctx.set_variable("$fn", Value(0.0)); - ctx.set_variable("$fs", Value(1.0)); + ctx.set_variable("$fs", Value(2.0)); ctx.set_variable("$fa", Value(12.0)); ctx.set_variable("$t", Value(0.0)); diff --git a/tests/regression/dumptest/allmodules-expected.txt b/tests/regression/dumptest/allmodules-expected.txt index fba3961..86bb7fb 100644 --- a/tests/regression/dumptest/allmodules-expected.txt +++ b/tests/regression/dumptest/allmodules-expected.txt @@ -10,21 +10,21 @@ union(); difference(); intersection(); - linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); group(); cube(size = [1, 1, 1], center = false); - sphere($fn = 0, $fa = 12, $fs = 1, r = 1); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + sphere($fn = 0, $fa = 12, $fs = 2, r = 1); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); polyhedron(points = undef, triangles = undef, convexity = 1); square(size = [1, 1], center = false); - circle($fn = 0, $fa = 12, $fs = 1, r = 1); + circle($fn = 0, $fa = 12, $fs = 2, r = 1); polygon(points = undef, paths = undef, convexity = 1); projection(cut = false, convexity = 0); render(convexity = 1); diff --git a/tests/regression/dumptest/background-modifier-expected.txt b/tests/regression/dumptest/background-modifier-expected.txt index b52612f..6e9ca57 100644 --- a/tests/regression/dumptest/background-modifier-expected.txt +++ b/tests/regression/dumptest/background-modifier-expected.txt @@ -1,5 +1,5 @@ difference() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); - %cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + %cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } diff --git a/tests/regression/dumptest/child-background-expected.txt b/tests/regression/dumptest/child-background-expected.txt index d720179..c3e8288 100644 --- a/tests/regression/dumptest/child-background-expected.txt +++ b/tests/regression/dumptest/child-background-expected.txt @@ -1,7 +1,7 @@ difference() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); group() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } } diff --git a/tests/regression/dumptest/child-tests-expected.txt b/tests/regression/dumptest/child-tests-expected.txt index 981a5c1..9a886fe 100644 --- a/tests/regression/dumptest/child-tests-expected.txt +++ b/tests/regression/dumptest/child-tests-expected.txt @@ -1,10 +1,10 @@ group() { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 16, $fa = 12, $fs = 1, r = 1); + sphere($fn = 16, $fa = 12, $fs = 2, r = 1); } multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 16, $fa = 12, $fs = 1, h = 2, r1 = 1, r2 = 1, center = true); + cylinder($fn = 16, $fa = 12, $fs = 2, h = 2, r1 = 1, r2 = 1, center = true); } multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [2, 2, 2], center = true); @@ -22,7 +22,7 @@ group() { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 16, $fa = 12, $fs = 1, r = 1); + sphere($fn = 16, $fa = 12, $fs = 2, r = 1); } multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]); multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]); @@ -31,7 +31,7 @@ } multmatrix([[1, 0, 0, 2.5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { - cylinder($fn = 16, $fa = 12, $fs = 1, h = 2, r1 = 1, r2 = 1, center = true); + cylinder($fn = 16, $fa = 12, $fs = 2, h = 2, r1 = 1, r2 = 1, center = true); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { diff --git a/tests/regression/dumptest/circle-expected.txt b/tests/regression/dumptest/circle-expected.txt index ce06391..1e7bd9a 100644 --- a/tests/regression/dumptest/circle-expected.txt +++ b/tests/regression/dumptest/circle-expected.txt @@ -1,2 +1,2 @@ - circle($fn = 0, $fa = 12, $fs = 1, r = 1); + circle($fn = 0, $fa = 12, $fs = 2, r = 1); diff --git a/tests/regression/dumptest/circle-tests-expected.txt b/tests/regression/dumptest/circle-tests-expected.txt index c19bb0c..910b375 100644 --- a/tests/regression/dumptest/circle-tests-expected.txt +++ b/tests/regression/dumptest/circle-tests-expected.txt @@ -1,21 +1,21 @@ - circle($fn = 0, $fa = 12, $fs = 1, r = 1); + circle($fn = 0, $fa = 12, $fs = 2, r = 1); multmatrix([[1, 0, 0, 0], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 1); + circle($fn = 0, $fa = 12, $fs = 2, r = 1); } multmatrix([[1, 0, 0, 5], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 3); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, -1], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 0); + circle($fn = 0, $fa = 12, $fs = 2, r = 0); } multmatrix([[1, 0, 0, 0], [0, 1, 0, -3], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 4, $fa = 12, $fs = 1, r = 1); + circle($fn = 4, $fa = 12, $fs = 2, r = 1); } multmatrix([[1, 0, 0, 3], [0, 1, 0, -3], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 8, $fa = 12, $fs = 1, r = 1); + circle($fn = 8, $fa = 12, $fs = 2, r = 1); } multmatrix([[1, 0, 0, 6], [0, 1, 0, -3], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 12, $fa = 12, $fs = 1, r = 1); + circle($fn = 12, $fa = 12, $fs = 2, r = 1); } multmatrix([[1, 0, 0, 0], [0, 1, 0, -6], [0, 0, 1, 0], [0, 0, 0, 1]]) { circle($fn = 0, $fa = 20, $fs = 0.3, r = 1); diff --git a/tests/regression/dumptest/cylinder-expected.txt b/tests/regression/dumptest/cylinder-expected.txt index b839db7..73dcb7c 100644 --- a/tests/regression/dumptest/cylinder-expected.txt +++ b/tests/regression/dumptest/cylinder-expected.txt @@ -1,2 +1,2 @@ - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); diff --git a/tests/regression/dumptest/cylinder-tests-expected.txt b/tests/regression/dumptest/cylinder-tests-expected.txt index 5b25429..2ac2549 100644 --- a/tests/regression/dumptest/cylinder-tests-expected.txt +++ b/tests/regression/dumptest/cylinder-tests-expected.txt @@ -1,32 +1,32 @@ - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); multmatrix([[1, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 0, r2 = 0, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 0, r2 = 0, center = false); } multmatrix([[1, 0, 0, 2], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 0, r2 = 0, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 0, r2 = 0, center = false); } multmatrix([[1, 0, 0, 0], [0, 1, 0, -11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true); } multmatrix([[1, 0, 0, 11], [0, 1, 0, -11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 5, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 5, r2 = 1, center = false); } multmatrix([[1, 0, 0, 11], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 5, r2 = 0, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 5, r2 = 0, center = false); } multmatrix([[1, 0, 0, 11], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 8, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 8, r1 = 5, r2 = 5, center = false); } multmatrix([[1, 0, 0, 22], [0, 1, 0, -11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 0, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 0, r2 = 5, center = true); } multmatrix([[1, 0, 0, 22], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 5, r2 = 0, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 5, r2 = 0, center = false); } multmatrix([[1, 0, 0, 22], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 15, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 15, r1 = 5, r2 = 5, center = false); } diff --git a/tests/regression/dumptest/difference-tests-expected.txt b/tests/regression/dumptest/difference-tests-expected.txt index eee4616..30dd001 100644 --- a/tests/regression/dumptest/difference-tests-expected.txt +++ b/tests/regression/dumptest/difference-tests-expected.txt @@ -2,20 +2,20 @@ difference(); difference() { cube(size = [10, 10, 10], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 20, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 4, r2 = 4, center = true); } multmatrix([[1, 0, 0, 12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { cube(size = [10, 10, 10], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10.5, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 10.5, r1 = 4, r2 = 4, center = true); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { cube(size = [10, 10, 10], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 11, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 11, r1 = 4, r2 = 4, center = true); multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 11, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 11, r1 = 4, r2 = 4, center = true); } } } @@ -23,7 +23,7 @@ difference() { cube(size = [10, 10, 10], center = true); multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7.01], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 4, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 4, r1 = 4, r2 = 4, center = true); } } } @@ -31,7 +31,7 @@ difference() { cube(size = [10, 10, 10], center = true); multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 6.99], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 4, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 4, r1 = 4, r2 = 4, center = true); } } } diff --git a/tests/regression/dumptest/disable-modifier-expected.txt b/tests/regression/dumptest/disable-modifier-expected.txt index b1543f7..a237a48 100644 --- a/tests/regression/dumptest/disable-modifier-expected.txt +++ b/tests/regression/dumptest/disable-modifier-expected.txt @@ -1,4 +1,4 @@ difference() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } diff --git a/tests/regression/dumptest/dxf_linear_extrude-expected.txt b/tests/regression/dumptest/dxf_linear_extrude-expected.txt index c6034d9..ec46e66 100644 --- a/tests/regression/dumptest/dxf_linear_extrude-expected.txt +++ b/tests/regression/dumptest/dxf_linear_extrude-expected.txt @@ -1,2 +1,2 @@ - linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/dxf_rotate_extrude-expected.txt b/tests/regression/dumptest/dxf_rotate_extrude-expected.txt index 9ab8f0f..c212d76 100644 --- a/tests/regression/dumptest/dxf_rotate_extrude-expected.txt +++ b/tests/regression/dumptest/dxf_rotate_extrude-expected.txt @@ -1,2 +1,2 @@ - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/escape-test-expected.txt b/tests/regression/dumptest/escape-test-expected.txt index 2097dc4..af7f3e7 100644 --- a/tests/regression/dumptest/escape-test-expected.txt +++ b/tests/regression/dumptest/escape-test-expected.txt @@ -1,2 +1,2 @@ - import(file = "B-\" C-\t D-\n E-'", layer = "A:\\ B:\" C:\t D:\n E:' F:\\\\", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "B-\" C-\t D-\n E-'", layer = "A:\\ B:\" C:\t D:\n E:' F:\\\\", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/example002-expected.txt b/tests/regression/dumptest/example002-expected.txt index 04fc3b9..b3a79ce 100644 --- a/tests/regression/dumptest/example002-expected.txt +++ b/tests/regression/dumptest/example002-expected.txt @@ -14,7 +14,7 @@ } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 5], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 50, r1 = 20, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 50, r1 = 20, r2 = 5, center = true); } } } diff --git a/tests/regression/dumptest/example004-expected.txt b/tests/regression/dumptest/example004-expected.txt index a85ed90..9fda7fe 100644 --- a/tests/regression/dumptest/example004-expected.txt +++ b/tests/regression/dumptest/example004-expected.txt @@ -1,7 +1,7 @@ group() { difference() { cube(size = [30, 30, 30], center = true); - sphere($fn = 0, $fa = 12, $fs = 1, r = 20); + sphere($fn = 0, $fa = 12, $fs = 2, r = 20); } } diff --git a/tests/regression/dumptest/example009-expected.txt b/tests/regression/dumptest/example009-expected.txt index 47ada91..b293224 100644 --- a/tests/regression/dumptest/example009-expected.txt +++ b/tests/regression/dumptest/example009-expected.txt @@ -1,22 +1,22 @@ - %linear_extrude(height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + %linear_extrude(height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } %group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) { - linear_extrude(height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -12], [0, 0, 0, 1]]) { - linear_extrude(height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } } } intersection() { - linear_extrude(height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example009.dxf", layer = "fan_top", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example009.dxf", layer = "fan_top", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } - rotate_extrude(file = "example009.dxf", layer = "fan_side", origin = [0, -40], scale = 1, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(file = "example009.dxf", layer = "fan_side", origin = [0, -40], scale = 1, convexity = 10, $fn = 0, $fa = 12, $fs = 2); } diff --git a/tests/regression/dumptest/example013-expected.txt b/tests/regression/dumptest/example013-expected.txt index f4d0aec..d3ddd17 100644 --- a/tests/regression/dumptest/example013-expected.txt +++ b/tests/regression/dumptest/example013-expected.txt @@ -1,15 +1,15 @@ intersection() { - linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } } multmatrix([[1, 0, 0, 0], [0, 2.22045e-16, -1, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1) { - import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 2) { + import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } } } diff --git a/tests/regression/dumptest/example015-expected.txt b/tests/regression/dumptest/example015-expected.txt index c6d870a..e1434e8 100644 --- a/tests/regression/dumptest/example015-expected.txt +++ b/tests/regression/dumptest/example015-expected.txt @@ -20,10 +20,10 @@ } multmatrix([[0.707107, 0.707107, 0, 0], [-0.707107, 0.707107, 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 = 1, r = 5); + circle($fn = 0, $fa = 12, $fs = 2, r = 5); } } } - import(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 2, convexity = 6, $fn = 0, $fa = 12, $fs = 1); + import(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 2, convexity = 6, $fn = 0, $fa = 12, $fs = 2); } diff --git a/tests/regression/dumptest/example017-expected.txt b/tests/regression/dumptest/example017-expected.txt index 3f4ded6..a27ed75 100644 --- a/tests/regression/dumptest/example017-expected.txt +++ b/tests/regression/dumptest/example017-expected.txt @@ -3,10 +3,10 @@ group() { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 74], [0, 0, 0, 1]]) { - linear_extrude(height = 6, center = false, convexity = 4, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 6, center = false, convexity = 4, $fn = 0, $fa = 12, $fs = 2) { group() { difference() { - circle($fn = 0, $fa = 12, $fs = 1, r = 47); + circle($fn = 0, $fa = 12, $fs = 2, r = 47); group() { multmatrix([[1, 0, 0, 0], [0, 1, 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]]) { @@ -24,15 +24,15 @@ } } } - circle($fn = 0, $fa = 12, $fs = 1, r = 25); + circle($fn = 0, $fa = 12, $fs = 2, r = 25); } } } } - linear_extrude(height = 6, center = false, convexity = 4, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 6, center = false, convexity = 4, $fn = 0, $fa = 12, $fs = 2) { group() { difference() { - circle($fn = 0, $fa = 12, $fs = 1, r = 102); + circle($fn = 0, $fa = 12, $fs = 2, r = 102); group() { multmatrix([[1, 0, 0, 0], [0, 1, 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]]) { @@ -50,7 +50,7 @@ } } } - circle($fn = 0, $fa = 12, $fs = 1, r = 75); + circle($fn = 0, $fa = 12, $fs = 2, r = 75); } } } @@ -59,27 +59,27 @@ multmatrix([[1, 0, 0, 0], [0, 1, 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([[2.22045e-16, 2.22045e-16, -1, 0], [-1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 6, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 6, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 2) { group() { union() { difference() { polygon(points = [[0, 6], [6, 6], [6, 0], [21, 0], [21, 6], [27, 6], [27, 0], [77, 0], [83, 12], [77, 18], [77, 74], [71, 74], [71, 80], [61, 80], [61, 74], [55, 74], [55, 80], [49, 74], [49, 18], [43, 12], [6, 12]], paths = undef, convexity = 1); multmatrix([[1, 0, 0, 43], [0, 1, 0, 18], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } multmatrix([[1, 0, 0, 83], [0, 1, 0, 18], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } } multmatrix([[1, 0, 0, 77], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [9, 12], center = false); } multmatrix([[1, 0, 0, 86], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12, 12], center = false); } @@ -87,7 +87,7 @@ } multmatrix([[1, 0, 0, 55], [0, 1, 0, 74], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12, 12], center = false); } @@ -102,27 +102,27 @@ multmatrix([[-0.5, -0.866025, 0, 0], [0.866025, -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([[2.22045e-16, 2.22045e-16, -1, 0], [-1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 6, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 6, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 2) { group() { union() { difference() { polygon(points = [[0, 6], [6, 6], [6, 0], [21, 0], [21, 6], [27, 6], [27, 0], [77, 0], [83, 12], [77, 18], [77, 74], [71, 74], [71, 80], [61, 80], [61, 74], [55, 74], [55, 80], [49, 74], [49, 18], [43, 12], [6, 12]], paths = undef, convexity = 1); multmatrix([[1, 0, 0, 43], [0, 1, 0, 18], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } multmatrix([[1, 0, 0, 83], [0, 1, 0, 18], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } } multmatrix([[1, 0, 0, 77], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [9, 12], center = false); } multmatrix([[1, 0, 0, 86], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12, 12], center = false); } @@ -130,7 +130,7 @@ } multmatrix([[1, 0, 0, 55], [0, 1, 0, 74], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12, 12], center = false); } @@ -145,27 +145,27 @@ multmatrix([[-0.5, 0.866025, 0, 0], [-0.866025, -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([[2.22045e-16, 2.22045e-16, -1, 0], [-1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 6, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 6, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 2) { group() { union() { difference() { polygon(points = [[0, 6], [6, 6], [6, 0], [21, 0], [21, 6], [27, 6], [27, 0], [77, 0], [83, 12], [77, 18], [77, 74], [71, 74], [71, 80], [61, 80], [61, 74], [55, 74], [55, 80], [49, 74], [49, 18], [43, 12], [6, 12]], paths = undef, convexity = 1); multmatrix([[1, 0, 0, 43], [0, 1, 0, 18], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } multmatrix([[1, 0, 0, 83], [0, 1, 0, 18], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } } multmatrix([[1, 0, 0, 77], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [9, 12], center = false); } multmatrix([[1, 0, 0, 86], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); } multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12, 12], center = false); } @@ -173,7 +173,7 @@ } multmatrix([[1, 0, 0, 55], [0, 1, 0, 74], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { - circle($fn = 0, $fa = 12, $fs = 1, r = 6); + circle($fn = 0, $fa = 12, $fs = 2, r = 6); multmatrix([[1, 0, 0, -12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12, 12], center = false); } @@ -189,13 +189,13 @@ } %multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) { group() { - rotate_extrude(convexity = 2, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 2, $fn = 0, $fa = 12, $fs = 2) { square(size = [25, 68], center = false); multmatrix([[1, 0, 0, 0], [0, 1, 0, 68], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { square(size = [25, 25], center = false); multmatrix([[1, 0, 0, 0], [0, 0.7, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 25); + circle($fn = 0, $fa = 12, $fs = 2, r = 25); } } } @@ -204,7 +204,7 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, -12.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { square(size = [12.5, 25], center = false); } - circle($fn = 0, $fa = 12, $fs = 1, r = 12.5); + circle($fn = 0, $fa = 12, $fs = 2, r = 12.5); } } } diff --git a/tests/regression/dumptest/example018-expected.txt b/tests/regression/dumptest/example018-expected.txt index d83440a..6691d38 100644 --- a/tests/regression/dumptest/example018-expected.txt +++ b/tests/regression/dumptest/example018-expected.txt @@ -6,7 +6,7 @@ cube(size = [60, 60, 60], center = true); } multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 50, r1 = 30, r2 = 30, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 50, r1 = 30, r2 = 30, center = true); } multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { @@ -23,7 +23,7 @@ } } multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 30); + sphere($fn = 0, $fa = 12, $fs = 2, r = 30); } } } @@ -32,7 +32,7 @@ group() { group() { multmatrix([[1, 0, 0, -150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 50, r1 = 30, r2 = 30, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 50, r1 = 30, r2 = 30, center = true); } multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { @@ -49,7 +49,7 @@ } } multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 30); + sphere($fn = 0, $fa = 12, $fs = 2, r = 30); } multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [60, 60, 60], center = true); @@ -75,13 +75,13 @@ } } multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 30); + sphere($fn = 0, $fa = 12, $fs = 2, r = 30); } multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [60, 60, 60], center = true); } multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 50, r1 = 30, r2 = 30, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 50, r1 = 30, r2 = 30, center = true); } } } @@ -90,13 +90,13 @@ group() { group() { multmatrix([[1, 0, 0, -150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 30); + sphere($fn = 0, $fa = 12, $fs = 2, r = 30); } multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { cube(size = [60, 60, 60], center = true); } multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 50, r1 = 30, r2 = 30, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 50, r1 = 30, r2 = 30, center = true); } multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { union() { diff --git a/tests/regression/dumptest/example019-expected.txt b/tests/regression/dumptest/example019-expected.txt index 2ad2fb6..47406e6 100644 --- a/tests/regression/dumptest/example019-expected.txt +++ b/tests/regression/dumptest/example019-expected.txt @@ -1,126 +1,126 @@ group() { multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 45, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 45, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -95], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 46.5, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 46.5, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -90], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 48, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 48, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -85], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 49.5, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 49.5, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -80], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 51, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 51, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -75], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 52.5, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 52.5, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -70], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 54, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 54, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -65], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 55.5, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 55.5, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -60], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 57, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 57, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -55], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 58.5, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 58.5, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 60, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 60, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -45], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 59, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 59, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -40], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 58, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 58, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -35], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 57, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 57, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -30], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 56, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 56, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -25], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 55, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 55, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -20], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 54, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 54, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -15], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 55.05, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 55.05, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -10], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 56.1, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 56.1, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, -5], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 57.15, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 57.15, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 58.2, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 58.2, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 59.25, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 59.25, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 60.3, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 60.3, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 15], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 61.35, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 61.35, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 62.4, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 62.4, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 25], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 63.45, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 63.45, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 64.5, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 64.5, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 35], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 65.55, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 65.55, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 40], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 66.6, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 66.6, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 45], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 67.65, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 67.65, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 68.7, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 68.7, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 55], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 69.75, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 69.75, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 60], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 70.8, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 70.8, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 65], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 71.85, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 71.85, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 70], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 72.9, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 72.9, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 75], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 73.95, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 73.95, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 80], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 75, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 75, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 85], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 70.0714, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 70.0714, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 90], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 65.1429, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 65.1429, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 95], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 60.2143, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 60.2143, r1 = 6, r2 = 2, center = false); } multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, -30], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 55.2857, r1 = 6, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 55.2857, r1 = 6, r2 = 2, center = false); } } diff --git a/tests/regression/dumptest/example022-expected.txt b/tests/regression/dumptest/example022-expected.txt index 4f224be..bd200f8 100644 --- a/tests/regression/dumptest/example022-expected.txt +++ b/tests/regression/dumptest/example022-expected.txt @@ -5,16 +5,16 @@ cube(size = [20, 20, 40], center = true); group() { multmatrix([[1, 0, 0, -5], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 40, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 40, r1 = 5, r2 = 5, center = true); } multmatrix([[1, 0, 0, -5], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 40, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 40, r1 = 5, r2 = 5, center = true); } multmatrix([[1, 0, 0, 5], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 40, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 40, r1 = 5, r2 = 5, center = true); } multmatrix([[1, 0, 0, 5], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 40, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 40, r1 = 5, r2 = 5, center = true); } } } @@ -30,94 +30,94 @@ group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -5], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 5, r2 = 5, center = true); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -5], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 5, r2 = 5, center = true); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 5], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 5, r2 = 5, center = true); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 5], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 5, r2 = 5, center = true); } } } group() { multmatrix([[2.22045e-16, -2.22045e-16, 1, 0], [1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -10], [0, 1, 0, -15], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true); } } multmatrix([[2.22045e-16, -2.22045e-16, 1, 0], [1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -10], [0, 1, 0, 15], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true); } } multmatrix([[2.22045e-16, -2.22045e-16, 1, 0], [1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 10], [0, 1, 0, -15], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true); } } multmatrix([[2.22045e-16, -2.22045e-16, 1, 0], [1, 0, -2.22045e-16, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 10], [0, 1, 0, 15], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true); } } } group() { multmatrix([[2.22045e-16, 1, 2.22045e-16, 0], [0, 2.22045e-16, -1, 0], [-1, 2.22045e-16, 0, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -15], [0, 1, 0, -5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 20, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true); } } multmatrix([[2.22045e-16, 1, 2.22045e-16, 0], [0, 2.22045e-16, -1, 0], [-1, 2.22045e-16, 0, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -15], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 20, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true); } } multmatrix([[2.22045e-16, 1, 2.22045e-16, 0], [0, 2.22045e-16, -1, 0], [-1, 2.22045e-16, 0, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 15], [0, 1, 0, -5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 20, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true); } } multmatrix([[2.22045e-16, 1, 2.22045e-16, 0], [0, 2.22045e-16, -1, 0], [-1, 2.22045e-16, 0, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 15], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 20, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 20, r1 = 5, r2 = 5, center = true); } } } } group() { multmatrix([[1, 0, 0, -5], [0, 1, 0, -10], [0, 0, 1, -15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, -5], [0, 1, 0, -10], [0, 0, 1, 15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, -5], [0, 1, 0, 10], [0, 0, 1, -15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, -5], [0, 1, 0, 10], [0, 0, 1, 15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 5], [0, 1, 0, -10], [0, 0, 1, -15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 5], [0, 1, 0, -10], [0, 0, 1, 15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 5], [0, 1, 0, 10], [0, 0, 1, -15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 5], [0, 1, 0, 10], [0, 0, 1, 15], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } } } diff --git a/tests/regression/dumptest/for-nested-tests-expected.txt b/tests/regression/dumptest/for-nested-tests-expected.txt index 24fd447..d1034b3 100644 --- a/tests/regression/dumptest/for-nested-tests-expected.txt +++ b/tests/regression/dumptest/for-nested-tests-expected.txt @@ -1,111 +1,111 @@ group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 5], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 5], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 5], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 5], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 5], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 5], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 10], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 10], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 5], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 5], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 10], [0, 0, 1, 20], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 30], [0, 1, 0, 10], [0, 0, 1, 30], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 3); + sphere($fn = 0, $fa = 12, $fs = 2, r = 3); } } diff --git a/tests/regression/dumptest/for-tests-expected.txt b/tests/regression/dumptest/for-tests-expected.txt index ce8953b..f9cf5e0 100644 --- a/tests/regression/dumptest/for-tests-expected.txt +++ b/tests/regression/dumptest/for-tests-expected.txt @@ -5,60 +5,60 @@ } multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 3, r2 = 3, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = false); } } group() { multmatrix([[1, 0, 0, -20], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); } multmatrix([[1, 0, 0, -10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 2, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 2, r2 = 2, center = false); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 3, r2 = 3, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = false); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 4, r2 = 4, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 4, r2 = 4, center = false); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false); } } group() { multmatrix([[1, 0, 0, -20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); } multmatrix([[1, 0, 0, -10], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 2, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 2, r2 = 2, center = false); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 3, r2 = 3, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = false); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 4, r2 = 4, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 4, r2 = 4, center = false); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false); } } group() { multmatrix([[1, 0, 0, -20], [0, 1, 0, 30], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 2, r1 = 0.5, r2 = 0.5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 2, r1 = 0.5, r2 = 0.5, center = true); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 30], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 3, r2 = 3, center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 2, r1 = 1.5, r2 = 1.5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 2, r1 = 1.5, r2 = 1.5, center = true); } } multmatrix([[1, 0, 0, 20], [0, 1, 0, 30], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 5, r2 = 5, center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 2, r1 = 2.5, r2 = 2.5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 2, r1 = 2.5, r2 = 2.5, center = true); } } } @@ -82,19 +82,19 @@ group(); group() { multmatrix([[1, 0, 0, -20], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); } multmatrix([[1, 0, 0, -10], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 2, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 2, r2 = 2, center = false); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 3, r2 = 3, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = false); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 4, r2 = 4, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 4, r2 = 4, center = false); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false); } } group(); @@ -102,13 +102,13 @@ group(); group() { multmatrix([[1, 0, 0, -20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 1, r2 = 1, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false); } multmatrix([[1, 0, 0, -10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 2, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 2, r2 = 2, center = false); } multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 5, r2 = 5, center = false); } } diff --git a/tests/regression/dumptest/highlight-and-background-modifier-expected.txt b/tests/regression/dumptest/highlight-and-background-modifier-expected.txt index 8f13dcd..a525d68 100644 --- a/tests/regression/dumptest/highlight-and-background-modifier-expected.txt +++ b/tests/regression/dumptest/highlight-and-background-modifier-expected.txt @@ -1,11 +1,11 @@ difference() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); - %cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + %cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } multmatrix([[1, 0, 0, 13], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); - %cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + %cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } } diff --git a/tests/regression/dumptest/highlight-modifier-expected.txt b/tests/regression/dumptest/highlight-modifier-expected.txt index ca75e52..c0f1da2 100644 --- a/tests/regression/dumptest/highlight-modifier-expected.txt +++ b/tests/regression/dumptest/highlight-modifier-expected.txt @@ -1,5 +1,5 @@ difference() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } diff --git a/tests/regression/dumptest/hull2-tests-expected.txt b/tests/regression/dumptest/hull2-tests-expected.txt index d060d1d..e4c5a5b 100644 --- a/tests/regression/dumptest/hull2-tests-expected.txt +++ b/tests/regression/dumptest/hull2-tests-expected.txt @@ -1,11 +1,11 @@ group() { hull() { multmatrix([[1, 0, 0, 15], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); } difference() { - circle($fn = 0, $fa = 12, $fs = 1, r = 10); - circle($fn = 0, $fa = 12, $fs = 1, r = 5); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 5); } } } @@ -13,9 +13,9 @@ group() { hull() { multmatrix([[1, 0, 0, 15], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); } - circle($fn = 0, $fa = 12, $fs = 1, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); } } } @@ -38,18 +38,18 @@ group() { group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 3); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 3); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } } group() { multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 3); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 3); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } } } diff --git a/tests/regression/dumptest/hull3-tests-expected.txt b/tests/regression/dumptest/hull3-tests-expected.txt index bde58c9..af48b7f 100644 --- a/tests/regression/dumptest/hull3-tests-expected.txt +++ b/tests/regression/dumptest/hull3-tests-expected.txt @@ -1,7 +1,7 @@ hull(); hull(); hull() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 10, r2 = 10, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 10, r2 = 10, center = false); multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) { cube(size = [5, 5, 5], center = true); } @@ -9,11 +9,11 @@ multmatrix([[1, 0, 0, 25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { hull() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 3, r2 = 3, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = false); } difference() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 4, r1 = 10, r2 = 10, center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 5, r2 = 5, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 4, r1 = 10, r2 = 10, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 5, r2 = 5, center = true); } } } diff --git a/tests/regression/dumptest/import-expected.txt b/tests/regression/dumptest/import-expected.txt index 2c66bf4..b1d81de 100644 --- a/tests/regression/dumptest/import-expected.txt +++ b/tests/regression/dumptest/import-expected.txt @@ -1,2 +1,2 @@ - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/import_dxf-expected.txt b/tests/regression/dumptest/import_dxf-expected.txt index 2c66bf4..b1d81de 100644 --- a/tests/regression/dumptest/import_dxf-expected.txt +++ b/tests/regression/dumptest/import_dxf-expected.txt @@ -1,2 +1,2 @@ - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/import_dxf-tests-expected.txt b/tests/regression/dumptest/import_dxf-tests-expected.txt index 2fdbbca..977efcc 100644 --- a/tests/regression/dumptest/import_dxf-tests-expected.txt +++ b/tests/regression/dumptest/import_dxf-tests-expected.txt @@ -1,24 +1,24 @@ - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); multmatrix([[1, 0, 0, -210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/polygons.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/polygons.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } multmatrix([[1, 0, 0, -210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/polygons.dxf", layer = "", origin = [0, 110], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/polygons.dxf", layer = "", origin = [0, 110], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } multmatrix([[1, 0, 0, -210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/polygons.dxf", layer = "", origin = [110, 110], scale = 0.5, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/polygons.dxf", layer = "", origin = [110, 110], scale = 0.5, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } - import(file = "../../dxf/multiple-layers.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/multiple-layers.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); multmatrix([[1, 0, 0, -200], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/multiple-layers.dxf", layer = "0", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/multiple-layers.dxf", layer = "0", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/multiple-layers.dxf", layer = "0", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/multiple-layers.dxf", layer = "0", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } multmatrix([[1, 0, 0, 200], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/multiple-layers.dxf", layer = "noname", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/multiple-layers.dxf", layer = "noname", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "../../dxf/multiple-layers.dxf", layer = "Layer with a pretty long name including \\ \"special\" /'\\\\ characters", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "../../dxf/multiple-layers.dxf", layer = "Layer with a pretty long name including \\ \"special\" /'\\\\ characters", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } diff --git a/tests/regression/dumptest/import_off-expected.txt b/tests/regression/dumptest/import_off-expected.txt index 2c66bf4..b1d81de 100644 --- a/tests/regression/dumptest/import_off-expected.txt +++ b/tests/regression/dumptest/import_off-expected.txt @@ -1,2 +1,2 @@ - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/import_stl-expected.txt b/tests/regression/dumptest/import_stl-expected.txt index 2c66bf4..b1d81de 100644 --- a/tests/regression/dumptest/import_stl-expected.txt +++ b/tests/regression/dumptest/import_stl-expected.txt @@ -1,2 +1,2 @@ - import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/import_stl-tests-expected.txt b/tests/regression/dumptest/import_stl-tests-expected.txt index 8d7bbc4..ac702f6 100644 --- a/tests/regression/dumptest/import_stl-tests-expected.txt +++ b/tests/regression/dumptest/import_stl-tests-expected.txt @@ -1,2 +1,2 @@ - import(file = "import.stl", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "import.stl", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/include-tests-expected.txt b/tests/regression/dumptest/include-tests-expected.txt index 33f9156..d4b5065 100644 --- a/tests/regression/dumptest/include-tests-expected.txt +++ b/tests/regression/dumptest/include-tests-expected.txt @@ -4,29 +4,29 @@ } multmatrix([[1, 0, 0, 2], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 0.7, r2 = 0.2, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 0.7, r2 = 0.2, center = true); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, -2], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { - cylinder($fn = 10, $fa = 12, $fs = 1, h = 1, r1 = 0.5, r2 = 0.5, center = true); + cylinder($fn = 10, $fa = 12, $fs = 2, h = 1, r1 = 0.5, r2 = 0.5, center = true); } } multmatrix([[1, 0, 0, -2], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { - sphere($fn = 8, $fa = 12, $fs = 1, r = 0.5); + sphere($fn = 8, $fa = 12, $fs = 2, r = 0.5); } } multmatrix([[1, 0, 0, -2], [0, 1, 0, -2], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { difference() { cube(size = [1, 1, 1], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 2, r1 = 0.4, r2 = 0.4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 2, r1 = 0.4, r2 = 0.4, center = true); } } } multmatrix([[1, 0, 0, 0], [0, 1, 0, -2], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 16, $fa = 12, $fs = 1, r = 0.7); + sphere($fn = 16, $fa = 12, $fs = 2, r = 0.7); } } diff --git a/tests/regression/dumptest/intersection-tests-expected.txt b/tests/regression/dumptest/intersection-tests-expected.txt index 5613abf..e6bbf32 100644 --- a/tests/regression/dumptest/intersection-tests-expected.txt +++ b/tests/regression/dumptest/intersection-tests-expected.txt @@ -1,7 +1,7 @@ intersection(); intersection(); intersection() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 3], [0, 0, 0, 1]]) { cube(size = [4, 4, 6], center = true); } @@ -9,15 +9,15 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { cube(size = [10, 10, 10], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 12, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 12, r1 = 4, r2 = 4, center = true); } } multmatrix([[1, 0, 0, 12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { intersection() { cube(size = [10, 10, 10], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 12, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 12, r1 = 4, r2 = 4, center = true); multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 12, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 12, r1 = 4, r2 = 4, center = true); } } } @@ -25,7 +25,7 @@ intersection() { cube(size = [10, 10, 10], center = true); multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 4, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 4, r1 = 4, r2 = 4, center = true); } } } @@ -33,7 +33,7 @@ intersection() { cube(size = [10, 10, 10], center = true); multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 6.99], [0, 0, 0, 1]]) { - cylinder($fn = 0, $fa = 12, $fs = 1, h = 4, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 4, r1 = 4, r2 = 4, center = true); } } } diff --git a/tests/regression/dumptest/linear_extrude-expected.txt b/tests/regression/dumptest/linear_extrude-expected.txt index c6034d9..ec46e66 100644 --- a/tests/regression/dumptest/linear_extrude-expected.txt +++ b/tests/regression/dumptest/linear_extrude-expected.txt @@ -1,2 +1,2 @@ - linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/linear_extrude-tests-expected.txt b/tests/regression/dumptest/linear_extrude-tests-expected.txt index 08b9f3e..cba1189 100644 --- a/tests/regression/dumptest/linear_extrude-tests-expected.txt +++ b/tests/regression/dumptest/linear_extrude-tests-expected.txt @@ -1,31 +1,31 @@ - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2) { cube(size = [1, 1, 1], center = false); } - linear_extrude(height = 10, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 10, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { square(size = [10, 10], center = false); } multmatrix([[1, 0, 0, 19], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 10, center = true, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 10, center = true, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { difference() { - circle($fn = 0, $fa = 12, $fs = 1, r = 5); - circle($fn = 0, $fa = 12, $fs = 1, r = 3); + circle($fn = 0, $fa = 12, $fs = 2, r = 5); + circle($fn = 0, $fa = 12, $fs = 2, r = 3); } } } multmatrix([[1, 0, 0, 31.5], [0, 1, 0, 2.5], [0, 0, 1, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 10, center = false, convexity = 1, twist = -45, slices = 3, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 10, center = false, convexity = 1, twist = -45, slices = 3, $fn = 0, $fa = 12, $fs = 2) { polygon(points = [[-5, -2.5], [5, -2.5], [0, 2.5]], paths = undef, convexity = 1); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 20, center = false, convexity = 1, twist = 45, slices = 2, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 20, center = false, convexity = 1, twist = 45, slices = 2, $fn = 0, $fa = 12, $fs = 2) { square(size = [10, 10], center = false); } } multmatrix([[1, 0, 0, 19], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 20, center = false, convexity = 1, twist = 45, slices = 10, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 20, center = false, convexity = 1, twist = 45, slices = 10, $fn = 0, $fa = 12, $fs = 2) { square(size = [10, 10], center = false); } } diff --git a/tests/regression/dumptest/minkowski2-tests-expected.txt b/tests/regression/dumptest/minkowski2-tests-expected.txt index fe78b90..dc3ad86 100644 --- a/tests/regression/dumptest/minkowski2-tests-expected.txt +++ b/tests/regression/dumptest/minkowski2-tests-expected.txt @@ -5,7 +5,7 @@ square(size = [10, 10], center = true); square(size = [8, 8], center = true); } - circle($fn = 0, $fa = 12, $fs = 1, r = 2); + circle($fn = 0, $fa = 12, $fs = 2, r = 2); } } } @@ -16,7 +16,7 @@ square(size = [10, 10], center = false); square(size = [5, 5], center = false); } - circle($fn = 0, $fa = 12, $fs = 1, r = 5); + circle($fn = 0, $fa = 12, $fs = 2, r = 5); } } } @@ -24,7 +24,7 @@ group() { minkowski(convexity = 0) { square(size = [10, 10], center = false); - circle($fn = 0, $fa = 12, $fs = 1, r = 5); + circle($fn = 0, $fa = 12, $fs = 2, r = 5); } } } diff --git a/tests/regression/dumptest/minkowski3-tests-expected.txt b/tests/regression/dumptest/minkowski3-tests-expected.txt index 0226beb..5244014 100644 --- a/tests/regression/dumptest/minkowski3-tests-expected.txt +++ b/tests/regression/dumptest/minkowski3-tests-expected.txt @@ -5,7 +5,7 @@ cube(size = [10, 10, 5], center = true); cube(size = [8, 8, 10], center = true); } - cylinder($fn = 0, $fa = 12, $fs = 1, h = 1, r1 = 2, r2 = 2, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 2, r2 = 2, center = false); } } } @@ -16,7 +16,7 @@ cube(size = [10, 10, 5], center = false); cube(size = [5, 5, 5], center = false); } - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 5, r2 = 5, center = false); } } } @@ -24,7 +24,7 @@ group() { minkowski(convexity = 0) { cube(size = [10, 10, 5], center = false); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 5, r1 = 5, r2 = 5, center = false); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 5, r1 = 5, r2 = 5, center = false); } } } diff --git a/tests/regression/dumptest/projection-tests-expected.txt b/tests/regression/dumptest/projection-tests-expected.txt index e51ce8e..8b58004 100644 --- a/tests/regression/dumptest/projection-tests-expected.txt +++ b/tests/regression/dumptest/projection-tests-expected.txt @@ -3,25 +3,25 @@ projection(cut = true, convexity = 0) { square(size = [1, 1], center = false); } - linear_extrude(height = 20, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 20, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { projection(cut = false, convexity = 0) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); } } multmatrix([[1, 0, 0, 22], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 20, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 20, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 9], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); } } } } multmatrix([[1, 0, 0, 44], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - linear_extrude(height = 20, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + linear_extrude(height = 20, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 2) { projection(cut = true, convexity = 0) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); } } } diff --git a/tests/regression/dumptest/root-modifier-expected.txt b/tests/regression/dumptest/root-modifier-expected.txt index ca75e52..c0f1da2 100644 --- a/tests/regression/dumptest/root-modifier-expected.txt +++ b/tests/regression/dumptest/root-modifier-expected.txt @@ -1,5 +1,5 @@ difference() { - sphere($fn = 0, $fa = 12, $fs = 1, r = 10); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 30, r1 = 6, r2 = 6, center = true); + sphere($fn = 0, $fa = 12, $fs = 2, r = 10); + cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } diff --git a/tests/regression/dumptest/rotate_extrude-expected.txt b/tests/regression/dumptest/rotate_extrude-expected.txt index 9ab8f0f..c212d76 100644 --- a/tests/regression/dumptest/rotate_extrude-expected.txt +++ b/tests/regression/dumptest/rotate_extrude-expected.txt @@ -1,2 +1,2 @@ - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/rotate_extrude-tests-expected.txt b/tests/regression/dumptest/rotate_extrude-tests-expected.txt index f3deec2..42faff2 100644 --- a/tests/regression/dumptest/rotate_extrude-tests-expected.txt +++ b/tests/regression/dumptest/rotate_extrude-tests-expected.txt @@ -1,20 +1,20 @@ - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2); + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2) { cube(size = [1, 1, 1], center = false); } - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2) { multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); } } multmatrix([[1, 0, 0, 50], [0, 1, 0, -20], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2) { multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { - circle($fn = 0, $fa = 12, $fs = 1, r = 10); - circle($fn = 0, $fa = 12, $fs = 1, r = 8); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 8); } } } @@ -26,14 +26,14 @@ multmatrix([[1, 0, 0, 50], [0, 1, 0, 50], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { difference() { - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2) { multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 10); + circle($fn = 0, $fa = 12, $fs = 2, r = 10); } } - rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1) { + rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 2) { multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - circle($fn = 0, $fa = 12, $fs = 1, r = 8); + circle($fn = 0, $fa = 12, $fs = 2, r = 8); } } } diff --git a/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt b/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt index 3abef40..f79e0ce 100644 --- a/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt +++ b/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt @@ -1,2 +1,2 @@ - rotate_extrude(file = "../../dxf/open-polyline.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(file = "../../dxf/open-polyline.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); diff --git a/tests/regression/dumptest/sphere-expected.txt b/tests/regression/dumptest/sphere-expected.txt index 3a93101..1b8369f 100644 --- a/tests/regression/dumptest/sphere-expected.txt +++ b/tests/regression/dumptest/sphere-expected.txt @@ -1,2 +1,2 @@ - sphere($fn = 0, $fa = 12, $fs = 1, r = 1); + sphere($fn = 0, $fa = 12, $fs = 2, r = 1); diff --git a/tests/regression/dumptest/sphere-tests-expected.txt b/tests/regression/dumptest/sphere-tests-expected.txt index f6f6a49..84f8c23 100644 --- a/tests/regression/dumptest/sphere-tests-expected.txt +++ b/tests/regression/dumptest/sphere-tests-expected.txt @@ -1,21 +1,21 @@ - sphere($fn = 0, $fa = 12, $fs = 1, r = 1); + sphere($fn = 0, $fa = 12, $fs = 2, r = 1); multmatrix([[1, 0, 0, 2], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 0); + sphere($fn = 0, $fa = 12, $fs = 2, r = 0); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 0], [0, 1, 0, -11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 0, $fa = 12, $fs = 1, r = 5); + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 11], [0, 1, 0, -11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 5); + sphere($fn = 5, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 11], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 10, $fa = 12, $fs = 1, r = 5); + sphere($fn = 10, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 11], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { - sphere($fn = 15, $fa = 12, $fs = 1, r = 5); + sphere($fn = 15, $fa = 12, $fs = 2, r = 5); } multmatrix([[1, 0, 0, 22], [0, 1, 0, -11], [0, 0, 1, 0], [0, 0, 0, 1]]) { sphere($fn = 0, $fa = 20, $fs = 0.3, r = 5); diff --git a/tests/regression/dumptest/testcolornames-expected.txt b/tests/regression/dumptest/testcolornames-expected.txt index 626a266..56e664f 100644 --- a/tests/regression/dumptest/testcolornames-expected.txt +++ b/tests/regression/dumptest/testcolornames-expected.txt @@ -1,706 +1,706 @@ multmatrix([[1, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.803922, 0.360784, 0.360784, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.941176, 0.501961, 0.501961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.980392, 0.501961, 0.447059, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.913725, 0.588235, 0.478431, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.627451, 0.478431, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.862745, 0.0784314, 0.235294, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.698039, 0.133333, 0.133333, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.545098, 0, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.752941, 0.796078, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.713725, 0.756863, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.411765, 0.705882, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.0784314, 0.576471, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.780392, 0.0823529, 0.521569, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.858824, 0.439216, 0.576471, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.627451, 0.478431, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.498039, 0.313725, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.388235, 0.278431, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 1], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.270588, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.54902, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.647059, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.843137, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 1, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 1, 0.878431, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.980392, 0.803922, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.980392, 0.980392, 0.823529, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.937255, 0.835294, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.894118, 0.709804, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.854902, 0.72549, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.933333, 0.909804, 0.666667, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.941176, 0.901961, 0.54902, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.741176, 0.717647, 0.419608, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.901961, 0.901961, 0.980392, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.847059, 0.74902, 0.847059, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.866667, 0.627451, 0.866667, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.933333, 0.509804, 0.933333, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.854902, 0.439216, 0.839216, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 3], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.729412, 0.333333, 0.827451, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.576471, 0.439216, 0.858824, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.541176, 0.168627, 0.886275, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.580392, 0, 0.827451, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.6, 0.196078, 0.8, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.545098, 0, 0.545098, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.501961, 0, 0.501961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.294118, 0, 0.509804, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.282353, 0.239216, 0.545098, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.415686, 0.352941, 0.803922, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 4], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.482353, 0.407843, 0.933333, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.678431, 1, 0.184314, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.498039, 1, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.486275, 0.988235, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 1, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.196078, 0.803922, 0.196078, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.596078, 0.984314, 0.596078, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.564706, 0.933333, 0.564706, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.980392, 0.603922, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 1, 0.498039, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 5], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.235294, 0.701961, 0.443137, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.180392, 0.545098, 0.341176, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.133333, 0.545098, 0.133333, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.501961, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.392157, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.603922, 0.803922, 0.196078, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.419608, 0.556863, 0.137255, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.501961, 0.501961, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.333333, 0.419608, 0.184314, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.4, 0.803922, 0.666667, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.560784, 0.737255, 0.560784, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 6], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.12549, 0.698039, 0.666667, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.545098, 0.545098, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.501961, 0.501961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 1, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 1, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.878431, 1, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.686275, 0.933333, 0.933333, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.498039, 1, 0.831373, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.25098, 0.878431, 0.815686, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.282353, 0.819608, 0.8, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 7], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.807843, 0.819608, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.372549, 0.619608, 0.627451, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.27451, 0.509804, 0.705882, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.690196, 0.768627, 0.870588, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.690196, 0.878431, 0.901961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.678431, 0.847059, 0.901961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.529412, 0.807843, 0.921569, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.529412, 0.807843, 0.980392, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0.74902, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.117647, 0.564706, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.392157, 0.584314, 0.929412, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 8], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.254902, 0.411765, 0.882353, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0, 0.803922, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0, 0.545098, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0, 0.501961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.0980392, 0.0980392, 0.439216, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.972549, 0.862745, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.921569, 0.803922, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.894118, 0.768627, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.870588, 0.678431, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 9], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.960784, 0.870588, 0.701961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.870588, 0.721569, 0.529412, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.823529, 0.705882, 0.54902, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.737255, 0.560784, 0.560784, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.956863, 0.643137, 0.376471, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.854902, 0.647059, 0.12549, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.721569, 0.52549, 0.0431373, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.803922, 0.521569, 0.247059, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.823529, 0.411765, 0.117647, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.545098, 0.270588, 0.0745098, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.627451, 0.321569, 0.176471, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.647059, 0.164706, 0.164706, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.501961, 0, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 1, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.980392, 0.980392, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.941176, 1, 0.941176, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.960784, 1, 0.980392, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.941176, 1, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.941176, 0.972549, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 8], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.972549, 0.972549, 1, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.960784, 0.960784, 0.960784, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 11], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.960784, 0.933333, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.960784, 0.960784, 0.862745, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.992157, 0.960784, 0.901961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.980392, 0.941176, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 1, 0.941176, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.980392, 0.921569, 0.843137, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.980392, 0.941176, 0.901961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.941176, 0.960784, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([1, 0.894118, 0.882353, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 9], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.862745, 0.862745, 0.862745, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 10], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.827451, 0.827451, 0.827451, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.752941, 0.752941, 0.752941, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 1], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.662745, 0.662745, 0.662745, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 2], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.501961, 0.501961, 0.501961, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 3], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.411765, 0.411765, 0.411765, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 4], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.466667, 0.533333, 0.6, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 5], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.439216, 0.501961, 0.564706, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 6], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0.184314, 0.309804, 0.309804, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } multmatrix([[1, 0, 0, 7], [0, 1, 0, 13], [0, 0, 1, 0], [0, 0, 0, 1]]) { color([0, 0, 0, 1]) { - sphere($fn = 5, $fa = 12, $fs = 1, r = 0.8); + sphere($fn = 5, $fa = 12, $fs = 2, r = 0.8); } } diff --git a/tests/regression/opencsgtest/circle-tests-expected.png b/tests/regression/opencsgtest/circle-tests-expected.png index 7066eb9..2e5b314 100644 Binary files a/tests/regression/opencsgtest/circle-tests-expected.png and b/tests/regression/opencsgtest/circle-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/circle-tests-expected.png b/tests/regression/throwntogethertest/circle-tests-expected.png index 624a547..2e5b314 100644 Binary files a/tests/regression/throwntogethertest/circle-tests-expected.png and b/tests/regression/throwntogethertest/circle-tests-expected.png differ -- cgit v0.10.1 From 54ea77bcc9ded4d2561bdc0d12083132fe64417a Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 16:57:55 +0100 Subject: Added note about the bugfix diff --git a/RELEASE_NOTES b/RELEASE_NOTES index ac89511..146d658 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -29,6 +29,7 @@ o On some platforms it was possible to insertion rich text in the editor, causin o Less crashes due to CGAL assertions o OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available o include now searches librarydir +o The $fs parameter yielded only half the number of segments it should have Deprecations: o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. -- cgit v0.10.1 From bce7212b612315ac4c90edeaaf8c7ed04ba7720c Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 19:34:23 +0100 Subject: Added note about auto-generated documentation diff --git a/doc/TODO.txt b/doc/TODO.txt index 92ff8a0..22fff0a 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -223,6 +223,7 @@ o Use a logging framework to get debugging/info output more under control? DOCUMENTATION ------------- +o Auto-generate API documentation instead of, in addition to or combined with, the wikibooks docs. o Write checklists for typical extension work (add new module, add new function) -> make sure new test files are added -- cgit v0.10.1 From 81e3eb41025ba14471dfb5ad868c5f5a34e6ab83 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 19:49:52 +0100 Subject: Minor Eigen namespace update diff --git a/src/glview.cc b/src/glview.cc index 59a56d6..d9f6bb5 100644 --- a/src/glview.cc +++ b/src/glview.cc @@ -28,6 +28,7 @@ #include "Preferences.h" #include "renderer.h" #include "rendersettings.h" +#include "linalg.h" #include #include @@ -58,8 +59,6 @@ #define FAR_FAR_AWAY 100000.0 -#include - GLView::GLView(QWidget *parent) : QGLWidget(parent), renderer(NULL) { init(); @@ -600,18 +599,18 @@ void GLView::mouseMoveEvent(QMouseEvent *event) double mx = +(dx) * viewer_distance/1000; double my = -(dy) * viewer_distance/1000; - Eigen::Matrix3d aax, aay, aaz, tm3; - aax = Eigen::AngleAxisd(-(object_rot_x/180) * M_PI,Eigen::Vector3d::UnitX()); - aay = Eigen::AngleAxisd(-(object_rot_y/180) * M_PI,Eigen::Vector3d::UnitY()); - aaz = Eigen::AngleAxisd(-(object_rot_z/180) * M_PI,Eigen::Vector3d::UnitZ()); - tm3 = Eigen::Matrix3d::Identity(); + Matrix3d aax, aay, aaz, tm3; + aax = Eigen::AngleAxisd(-(object_rot_x/180) * M_PI, Vector3d::UnitX()); + aay = Eigen::AngleAxisd(-(object_rot_y/180) * M_PI, Vector3d::UnitY()); + aaz = Eigen::AngleAxisd(-(object_rot_z/180) * M_PI, Vector3d::UnitZ()); + tm3 = Matrix3d::Identity(); tm3 = aaz * (aay * (aax * tm3)); - Eigen::Matrix4d tm; - tm = Eigen::Matrix4d::Identity(); + Matrix4d tm; + tm = Matrix4d::Identity(); for (int i=0;i<3;i++) for (int j=0;j<3;j++) tm(j,i)=tm3(j,i); - Eigen::Matrix4d vec; + Matrix4d vec; vec << 0, 0, 0, mx, 0, 0, 0, 0, diff --git a/src/linalg.h b/src/linalg.h index e20d8d8..a83949e 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -10,6 +10,7 @@ using Eigen::Vector3d; typedef Eigen::AlignedBox BoundingBox; using Eigen::Matrix3f; using Eigen::Matrix3d; +using Eigen::Matrix4d; using Eigen::Transform3d; #endif -- cgit v0.10.1 From b18f3d2371203ba4e903d8be1c8ce8769bbbefdf Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 21:33:09 +0100 Subject: Note about include/use doc clarification diff --git a/doc/TODO.txt b/doc/TODO.txt index 22fff0a..fd938cf 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -226,6 +226,7 @@ DOCUMENTATION o Auto-generate API documentation instead of, in addition to or combined with, the wikibooks docs. o Write checklists for typical extension work (add new module, add new function) -> make sure new test files are added +o Clarify include/use better in the wikibook docs (e.g. that use'd modules have to be self-contained) TESTING ------- -- cgit v0.10.1 From 1f6c0b6cdc6d89378ff0a9702341a2b38d000ef8 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Tue, 20 Dec 2011 02:19:14 +0100 Subject: Added suggestion to output console log to a file diff --git a/doc/TODO.txt b/doc/TODO.txt index fd938cf..190d742 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -98,6 +98,7 @@ o Error reporting/debugging o Provide some interaction for debug walk-through? - Provide visual highlighting of geometry corresponding to code -> could aid debugging a lot + - Optionally output console log to a file o Computation - Run CGAL rendering in a background thread - Enable viewing/editing while rendering -- cgit v0.10.1 From 8c31bac6c7b2a77b8bd96a288535b84e5ee81488 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 17:06:13 +0100 Subject: Patch to fix not-unitized normal vectors due to floating point calculations. Patch by Xyne. diff --git a/src/export.cc b/src/export.cc index 6c427dd..89f60af 100644 --- a/src/export.cc +++ b/src/export.cc @@ -84,17 +84,25 @@ void export_stl(CGAL_Nef_polyhedron *root_N, std::ostream &output, QProgressDial stream << x3 << " " << y3 << " " << z3; std::string vs3 = stream.str(); if (vs1 != vs2 && vs1 != vs3 && vs2 != vs3) { - - double nx = (y1-y2)*(z1-z3) - (z1-z2)*(y1-y3); - double ny = (z1-z2)*(x1-x3) - (x1-x2)*(z1-z3); - double nz = (x1-x2)*(y1-y3) - (y1-y2)*(x1-x3); + // The above condition ensures that vs1-vs2, vs1-vs3, and their cross + // product are non-zero. Floating point arithmetic may however truncate + // small values to 0. This can be avoided by first scaling the components + // of vs1-vs2 and vs1-vs3. This has no effect on the resulting unit + // normal vector. + double dn[6] = { x1-x2, y1-y2, z1-z2, x1-x3, y1-y3, z1-z3 }; + double mindn = 1; + for (int i = 0; i < 6; ++i) { + double dx = abs(dn[i]); + if (dx < mindn && dx != 0) mindn = dx; + } + for (int i = 0; i < 6; ++i) dn[i] /= mindn; + double nx = dn[1]*dn[5] - dn[2]*dn[4]; + double ny = dn[2]*dn[3] - dn[0]*dn[5]; + double nz = dn[0]*dn[4] - dn[1]*dn[3]; double nlength = sqrt(nx*nx + ny*ny + nz*nz); - // Avoid generating normals for polygons with zero area - double eps = 0.000001; - if (nlength < eps) nlength = 1.0; - output << " facet normal " - << nx / nlength << " " - << ny / nlength << " " + output << " facet normal " + << nx / nlength << " " + << ny / nlength << " " << nz / nlength << "\n"; output << " outer loop\n"; output << " vertex " << vs1 << "\n"; @@ -164,7 +172,7 @@ void export_dxf(CGAL_Nef_polyhedron *root_N, std::ostream &output, QProgressDial << y2 << "\n"; } } - + output << " 0\n" << "ENDSEC\n"; -- cgit v0.10.1 From f707466580f526f75ac85af3a628667797874645 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 19 Dec 2011 15:36:52 +0100 Subject: simple surface test diff --git a/testdata/scad/features/surface-simple.dat b/testdata/scad/features/surface-simple.dat new file mode 100644 index 0000000..32eba08 --- /dev/null +++ b/testdata/scad/features/surface-simple.dat @@ -0,0 +1,2 @@ +0 1 +2 3 diff --git a/testdata/scad/features/surface-simple.scad b/testdata/scad/features/surface-simple.scad new file mode 100644 index 0000000..9659143 --- /dev/null +++ b/testdata/scad/features/surface-simple.scad @@ -0,0 +1 @@ +surface("surface-simple.dat", center=true); -- cgit v0.10.1 From 0e59b194abbe5b261e5aa8ca9fcaaffc6b019b01 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 17:41:30 +0100 Subject: Expected files for surface-simple diff --git a/tests/regression/cgalpngtest/surface-simple-expected.png b/tests/regression/cgalpngtest/surface-simple-expected.png new file mode 100644 index 0000000..4152c38 Binary files /dev/null and b/tests/regression/cgalpngtest/surface-simple-expected.png differ diff --git a/tests/regression/dumptest/surface-simple-expected.txt b/tests/regression/dumptest/surface-simple-expected.txt new file mode 100644 index 0000000..3b42fcb --- /dev/null +++ b/tests/regression/dumptest/surface-simple-expected.txt @@ -0,0 +1,2 @@ + surface(file = "surface-simple.dat", center = true); + diff --git a/tests/regression/opencsgtest/surface-simple-expected.png b/tests/regression/opencsgtest/surface-simple-expected.png new file mode 100644 index 0000000..2abef81 Binary files /dev/null and b/tests/regression/opencsgtest/surface-simple-expected.png differ diff --git a/tests/regression/throwntogethertest/surface-simple-expected.png b/tests/regression/throwntogethertest/surface-simple-expected.png new file mode 100644 index 0000000..2abef81 Binary files /dev/null and b/tests/regression/throwntogethertest/surface-simple-expected.png differ -- cgit v0.10.1 From 9113cf42d08e828a2ba7c4e40ac24a937f17b306 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 17:42:11 +0100 Subject: Handle missing expected files gracefully diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index 848a6eb..967e334 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -93,7 +93,7 @@ def compare_png(resultfilename): compare_method = 'NCC' msg = 'ImageMagick image comparison: ' + options.convert_exec + ' '+ ' '.join(args[2:]) - msg += '\nexpected image: ' + expectedfilename + '\n' + msg += '\n expected image: ' + expectedfilename + '\n' print >> sys.stderr, msg if not resultfilename: print >> sys.stderr, "Error: OpenSCAD did not generate an image to test" diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 7407b15..87ac3df 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -151,14 +151,14 @@ def parsetest(teststring): "Test time.*?Test (Passed)", # pass/fail "Output:(.*?)", 'Command:.*?-s" "(.*?)"', # type - "actual .*?:(.*?)\n", - "expected .*?:(.*?)\n", + "^ actual .*?:(.*?)\n", + "^ expected .*?:(.*?)\n", 'Command:.*?(testdata.*?)"' # scadfile ] hits = map( lambda pattern: ezsearch(pattern,teststring), patterns ) test = Test(hits[0],hits[1],hits[2]=='Passed',hits[3],hits[4],hits[5],hits[6],hits[7],teststring) - test.actualfile_data = tryread(test.actualfile) - test.expectedfile_data = tryread(test.expectedfile) + if len(test.actualfile) > 0: test.actualfile_data = tryread(test.actualfile) + if len(test.actualfile) > 0: test.expectedfile_data = tryread(test.expectedfile) return test def parselog(data): @@ -274,10 +274,12 @@ TESTLOG wikiname_a = wikify_filename(tmp,wiki_rootpath,sysid) tmp = t.expectedfile.replace(os.path.dirname(builddir),'') wikiname_e = wikify_filename(tmp,wiki_rootpath,sysid) - imgs[wikiname_e] = t.expectedfile_data + if hasattr(t, 'expectedfile_data'): + imgs[wikiname_e] = t.expectedfile_data if t.actualfile: actualfile_wiki = '[[File:'+wikiname_a+'|250px]]' - imgs[wikiname_a] = t.actualfile_data + if hasattr(t, 'actualfile_data'): + imgs[wikiname_a] = t.actualfile_data else: actualfile_wiki = 'No image generated.' newchunk = re.sub('FTESTNAME',t.fullname,repeat1) -- cgit v0.10.1 From 8d10aa298295a31c2bc2ad1bae4f2edc364bed38 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 17:43:01 +0100 Subject: bugfix: surface() modules with center=true wasn't exactly centered in the XY plane diff --git a/src/surface.cc b/src/surface.cc index 1a5f9bd..39d1972 100644 --- a/src/surface.cc +++ b/src/surface.cc @@ -129,8 +129,8 @@ PolySet *SurfaceNode::evaluate_polyset(class PolySetEvaluator *) const p->convexity = convexity; - double ox = center ? -columns/2.0 : 0; - double oy = center ? -lines/2.0 : 0; + double ox = center ? -(columns-1)/2.0 : 0; + double oy = center ? -(lines-1)/2.0 : 0; for (int i = 1; i < lines; i++) for (int j = 1; j < columns; j++) -- cgit v0.10.1 From bce8e2204311e5f900bbffe4122aaafcada4e2cf Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 17:43:30 +0100 Subject: bugfix: surface() modules with center=true wasn't exactly centered in the XY plane diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 146d658..0de366e 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -30,6 +30,7 @@ o Less crashes due to CGAL assertions o OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available o include now searches librarydir o The $fs parameter yielded only half the number of segments it should have +o surface(center=true) is now correctly centered in the XY plane Deprecations: o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. -- cgit v0.10.1 From 6fd779c2be83170b59d183f5374898c7beafd87a Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 18:03:23 +0100 Subject: bugfix: render() statement containing only 2D geometry caused a crash diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc index 7a9566b..3285b46 100644 --- a/src/PolySetCGALEvaluator.cc +++ b/src/PolySetCGALEvaluator.cc @@ -396,7 +396,7 @@ PolySet *PolySetCGALEvaluator::evaluatePolySet(const RenderNode &node) CGAL_Nef_polyhedron N = this->cgalevaluator.evaluateCGALMesh(node); PolySet *ps = NULL; if (!N.empty()) { - if (!N.p3->is_simple()) { + if (N.dim == 3 && !N.p3->is_simple()) { PRINTF("WARNING: Body of render() isn't valid 2-manifold!"); } else { -- cgit v0.10.1 From 16f644872f6f6e55dc97be92d72f09f8c4acdf58 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 18:03:58 +0100 Subject: Added 2D render() test diff --git a/testdata/scad/features/render-2d-tests.scad b/testdata/scad/features/render-2d-tests.scad new file mode 100644 index 0000000..683ffe4 --- /dev/null +++ b/testdata/scad/features/render-2d-tests.scad @@ -0,0 +1,6 @@ +render() { + difference() { + square(100, center=true); + circle(r=30); + } +} diff --git a/tests/regression/cgalpngtest/render-2d-tests-expected.png b/tests/regression/cgalpngtest/render-2d-tests-expected.png new file mode 100644 index 0000000..19ea16a Binary files /dev/null and b/tests/regression/cgalpngtest/render-2d-tests-expected.png differ diff --git a/tests/regression/dumptest/render-2d-tests-expected.txt b/tests/regression/dumptest/render-2d-tests-expected.txt new file mode 100644 index 0000000..26b916c --- /dev/null +++ b/tests/regression/dumptest/render-2d-tests-expected.txt @@ -0,0 +1,7 @@ + render(convexity = 1) { + difference() { + square(size = [100, 100], center = true); + circle($fn = 0, $fa = 12, $fs = 2, r = 30); + } + } + diff --git a/tests/regression/opencsgtest/render-2d-tests-expected.png b/tests/regression/opencsgtest/render-2d-tests-expected.png new file mode 100644 index 0000000..0bf6288 Binary files /dev/null and b/tests/regression/opencsgtest/render-2d-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/render-2d-tests-expected.png b/tests/regression/throwntogethertest/render-2d-tests-expected.png new file mode 100644 index 0000000..0bf6288 Binary files /dev/null and b/tests/regression/throwntogethertest/render-2d-tests-expected.png differ -- cgit v0.10.1 From 95c952c5fa1103b99ad3b2cd2328020c1d1dd82d Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 20:44:19 +0100 Subject: Updated expected file for new sphere evaluation diff --git a/tests/regression/cgalpngtest/sphere-tests-expected.png b/tests/regression/cgalpngtest/sphere-tests-expected.png index 6ad650f..f2a11f3 100644 Binary files a/tests/regression/cgalpngtest/sphere-tests-expected.png and b/tests/regression/cgalpngtest/sphere-tests-expected.png differ -- cgit v0.10.1 From 5b1556e6ca05bdea518c47687494011b816d37f1 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 20:44:36 +0100 Subject: Updated expected file for surface(center=true) bugfix diff --git a/tests/regression/cgalpngtest/example010-expected.png b/tests/regression/cgalpngtest/example010-expected.png index f611b12..68ecc9e 100644 Binary files a/tests/regression/cgalpngtest/example010-expected.png and b/tests/regression/cgalpngtest/example010-expected.png differ diff --git a/tests/regression/throwntogethertest/example010-expected.png b/tests/regression/throwntogethertest/example010-expected.png index 37e6545..854eea8 100644 Binary files a/tests/regression/throwntogethertest/example010-expected.png and b/tests/regression/throwntogethertest/example010-expected.png differ -- cgit v0.10.1 From 3e419ce31871eb930b4ef2b96f84e2db800f81b8 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 21:48:01 +0100 Subject: bugfix: Sometimes, the CSG normalization created extremely large trees. Rewrote the algorithm based on the original Goldfeather paper. Fixes #44 diff --git a/src/csgterm.cc b/src/csgterm.cc index b21a20c..49f3dbb 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -72,31 +72,29 @@ CSGTerm::~CSGTerm() shared_ptr CSGTerm::normalize(shared_ptr &term) { // This function implements the CSG normalization - // Reference: Florian Kirsch, Juergen Doeller, - // OpenCSG: A Library for Image-Based CSG Rendering, - // University of Potsdam, Hasso-Plattner-Institute, Germany - // http://www.opencsg.org/data/csg_freenix2005_paper.pdf + // Reference: + // Goldfeather, J., Molnar, S., Turk, G., and Fuchs, H. Near + // Realtime CSG Rendering Using Tree Normalization and Geometric + // Pruning. IEEE Computer Graphics and Applications, 9(3):20-28, + // 1989. + // http://www.cc.gatech.edu/~turk/my_papers/pxpl_csg.pdf if (term->type == TYPE_PRIMITIVE) return term; - shared_ptr x = normalize(term->left); - shared_ptr y = normalize(term->right); + do { + while (normalize_tail(term)) {} + normalize(term->left); + } while (term->type != TYPE_UNION && + (term->right->type != TYPE_PRIMITIVE || term->left->type == TYPE_UNION)); + normalize(term->right); - shared_ptr t1(term); - if (x != term->left || y != term->right) t1.reset(new CSGTerm(term->type, x, y)); - - shared_ptr t2; - while (1) { - t2 = normalize_tail(t1); - if (t1 == t2) break; - t1 = t2; - } - - return t1; + return term; } -shared_ptr CSGTerm::normalize_tail(shared_ptr &term) +bool CSGTerm::normalize_tail(shared_ptr &term) { + if (term->type == TYPE_UNION) return false; // Don't normalize outer union + // Part A: The 'x . (y . z)' expressions shared_ptr x = term->left; @@ -141,7 +139,10 @@ shared_ptr CSGTerm::normalize_tail(shared_ptr &term) shared_ptr(new CSGTerm(TYPE_INTERSECTION, x, y)), z); } - if (result) return shared_ptr(result); + if (result) { + term.reset(result); + return true; + } // Part B: The '(x . y) . z' expressions @@ -168,9 +169,12 @@ shared_ptr CSGTerm::normalize_tail(shared_ptr &term) new CSGTerm(TYPE_INTERSECTION, y, z)); } - if (result) return shared_ptr(result); + if (result) { + term.reset(result); + return true; + } - return term; + return false; } std::string CSGTerm::dump() diff --git a/src/csgterm.h b/src/csgterm.h index 1895839..1583c62 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -32,7 +32,7 @@ public: ~CSGTerm(); static shared_ptr normalize(shared_ptr &term); - static shared_ptr normalize_tail(shared_ptr &term); + static bool normalize_tail(shared_ptr &term); std::string dump(); }; -- cgit v0.10.1 From 2bfd2a379d8748902ed5a48f9e8a536907f641d5 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 21:59:28 +0100 Subject: CSG normalization bugfix diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 0de366e..b9648d2 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -21,6 +21,7 @@ o Added import and export of the OFF file format o Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated. Bugfixes: +o Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview o square() crashed if any of the dimensions were zero o Flush Caches didn't flush cached USE'd modules o STL export should be a bit more robust -- cgit v0.10.1 From 51c28e8a5ba7a3d4897389498e0a2aa606e78cf9 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 22:20:27 +0100 Subject: fix for normal fix: would fail in some extreme cases (e.g. if there are components with very different orders of magnitude, as may happen when floating point errors fail to produce a 0) diff --git a/src/export.cc b/src/export.cc index 89f60af..99bce98 100644 --- a/src/export.cc +++ b/src/export.cc @@ -90,12 +90,14 @@ void export_stl(CGAL_Nef_polyhedron *root_N, std::ostream &output, QProgressDial // of vs1-vs2 and vs1-vs3. This has no effect on the resulting unit // normal vector. double dn[6] = { x1-x2, y1-y2, z1-z2, x1-x3, y1-y3, z1-z3 }; - double mindn = 1; - for (int i = 0; i < 6; ++i) { - double dx = abs(dn[i]); - if (dx < mindn && dx != 0) mindn = dx; + double maxdn = 0; + int i; + for (i = 0; i < 6; ++i) { + double dx = dn[i]; + if (dx < 0) dx = -dx; + if (dx > maxdn) maxdn = dx; } - for (int i = 0; i < 6; ++i) dn[i] /= mindn; + for (i = 0; i < 6; ++i) dn[i] /= maxdn; double nx = dn[1]*dn[5] - dn[2]*dn[4]; double ny = dn[2]*dn[3] - dn[0]*dn[5]; double nz = dn[0]*dn[4] - dn[1]*dn[3]; -- cgit v0.10.1 From 91d9d9c4b5e4c0b2c1a5a5796eb3b9323710e74b Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 21 Dec 2011 22:47:00 +0100 Subject: Added note about tree pruning diff --git a/src/csgterm.cc b/src/csgterm.cc index 49f3dbb..1b9cb1d 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -81,6 +81,12 @@ shared_ptr CSGTerm::normalize(shared_ptr &term) if (term->type == TYPE_PRIMITIVE) return term; + // FIXME: We can optimize the normalized tree by pruning based on bounding boxes + // as described in the above mentioned paper: + // 1) If the bounding boxes of two intersected nodes don't intersect, prune the + // intersection node + // 2) If the bounding boxes of two subtracted nodes don't intersect, replace the + // difference node with the positive operator do { while (normalize_tail(term)) {} normalize(term->left); -- cgit v0.10.1 From d7ca192077f127a2d05bed73d1814a8045823335 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 22 Dec 2011 04:09:52 +0100 Subject: Removed old debug output diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index a58c1fd..469e51c 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -322,10 +322,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) } assert(csgInfo.root_norm_term); - if (csgInfo.root_norm_term.use_count() <= 1) { - fprintf(stderr, "XXX\n"); - } - + csgInfo.root_chain = new CSGChain(); csgInfo.root_chain->import(csgInfo.root_norm_term); fprintf(stderr, "Normalized CSG tree has %d elements\n", int(csgInfo.root_chain->polysets.size())); -- cgit v0.10.1 From 8d5be2c5247f806fb3ec9c9a197ae97b5d565dc7 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 22 Dec 2011 04:12:15 +0100 Subject: Implemented CSG tree pruning - this should significantly improve performance of difficult models in OpenCSG preview mode diff --git a/src/CSGTermEvaluator.cc b/src/CSGTermEvaluator.cc index 1aedfec..fc76d56 100644 --- a/src/CSGTermEvaluator.cc +++ b/src/CSGTermEvaluator.cc @@ -48,11 +48,11 @@ void CSGTermEvaluator::applyToChildren(const AbstractNode &node, CSGTermEvaluato t1 = t2; } else if (t2 && t1) { if (op == CSGT_UNION) { - t1.reset(new CSGTerm(CSGTerm::TYPE_UNION, t1, t2)); + t1 = CSGTerm::createCSGTerm(CSGTerm::TYPE_UNION, t1, t2); } else if (op == CSGT_DIFFERENCE) { - t1.reset(new CSGTerm(CSGTerm::TYPE_DIFFERENCE, t1, t2)); + t1 = CSGTerm::createCSGTerm(CSGTerm::TYPE_DIFFERENCE, t1, t2); } else if (op == CSGT_INTERSECTION) { - t1.reset(new CSGTerm(CSGTerm::TYPE_INTERSECTION, t1, t2)); + t1 = CSGTerm::createCSGTerm(CSGTerm::TYPE_INTERSECTION, t1, t2); } } } diff --git a/src/csgterm.cc b/src/csgterm.cc index 1b9cb1d..426adca 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -26,6 +26,7 @@ #include "csgterm.h" #include "polyset.h" +#include "linalg.h" #include /*! @@ -47,29 +48,102 @@ */ +shared_ptr CSGTerm::createCSGTerm(type_e type, shared_ptr left, shared_ptr right) +{ + if (type != TYPE_PRIMITIVE) { + // In case we're creating a CSG terms from a pruned tree, left/right can be NULL + if (!right) { + if (type == TYPE_UNION || type == TYPE_DIFFERENCE) return left; + else return right; + } + if (!left) { + if (type == TYPE_UNION) return right; + else return left; + } + } + + // Pruning the tree. For details, see: + // http://www.cc.gatech.edu/~turk/my_papers/pxpl_csg.pdf + const BoundingBox &leftbox = left->getBoundingBox(); + const BoundingBox &rightbox = right->getBoundingBox(); + if (type == TYPE_INTERSECTION) { + BoundingBox newbox(leftbox.min().cwise().max(rightbox.min()), + leftbox.max().cwise().min(rightbox.max())); + if (newbox.isNull()) { + return shared_ptr(); // Prune entire product + } + } + else if (type == TYPE_DIFFERENCE) { + BoundingBox newbox(leftbox.min().cwise().max(rightbox.min()), + leftbox.max().cwise().min(rightbox.max())); + if (newbox.isNull()) { + return left; // Prune the negative component + } + } + + return shared_ptr(new CSGTerm(type, left, right)); +} + +shared_ptr CSGTerm::createCSGTerm(type_e type, CSGTerm *left, CSGTerm *right) +{ + return createCSGTerm(type, shared_ptr(left), shared_ptr(right)); +} + CSGTerm::CSGTerm(const shared_ptr &polyset, const Transform3d &matrix, const double color[4], const std::string &label) - : type(TYPE_PRIMITIVE), polyset(polyset), label(label) + : type(TYPE_PRIMITIVE), polyset(polyset), label(label), m(matrix) { - this->m = matrix; for (int i = 0; i < 4; i++) this->color[i] = color[i]; + initBoundingBox(); } CSGTerm::CSGTerm(type_e type, shared_ptr left, shared_ptr right) - : type(type), left(left), right(right) + : type(type), left(left), right(right), m(Transform3d::Identity()) { + initBoundingBox(); } CSGTerm::CSGTerm(type_e type, CSGTerm *left, CSGTerm *right) - : type(type), left(left), right(right) + : type(type), left(left), right(right), m(Transform3d::Identity()) { + initBoundingBox(); } CSGTerm::~CSGTerm() { } +void CSGTerm::initBoundingBox() +{ + if (this->type == TYPE_PRIMITIVE) { + BoundingBox polybox = this->polyset->getBoundingBox(); + this->bbox.extend(this->m * polybox.min()); + this->bbox.extend(this->m * polybox.max()); + } + else { + const BoundingBox &leftbox = this->left->getBoundingBox(); + const BoundingBox &rightbox = this->right->getBoundingBox(); + switch (this->type) { + case TYPE_UNION: + this->bbox.extend(this->m * leftbox.min().cwise().min(rightbox.min())); + this->bbox.extend(this->m * leftbox.max().cwise().max(rightbox.max())); + break; + case TYPE_INTERSECTION: + this->bbox.extend(this->m * leftbox.min().cwise().max(rightbox.min())); + this->bbox.extend(this->m * leftbox.max().cwise().min(rightbox.max())); + break; + case TYPE_DIFFERENCE: + this->bbox.extend(this->m * leftbox.min()); + this->bbox.extend(this->m * leftbox.max()); + break; + case TYPE_PRIMITIVE: + break; + default: + assert(false); + } + } +} -shared_ptr CSGTerm::normalize(shared_ptr &term) +shared_ptr CSGTerm::normalize(shared_ptr term) { // This function implements the CSG normalization // Reference: @@ -79,27 +153,34 @@ shared_ptr CSGTerm::normalize(shared_ptr &term) // 1989. // http://www.cc.gatech.edu/~turk/my_papers/pxpl_csg.pdf - if (term->type == TYPE_PRIMITIVE) return term; + if (term->type == TYPE_PRIMITIVE) { + return term; + } - // FIXME: We can optimize the normalized tree by pruning based on bounding boxes - // as described in the above mentioned paper: - // 1) If the bounding boxes of two intersected nodes don't intersect, prune the - // intersection node - // 2) If the bounding boxes of two subtracted nodes don't intersect, replace the - // difference node with the positive operator do { - while (normalize_tail(term)) {} - normalize(term->left); + while (term && normalize_tail(term)) { } + if (!term || term->type == TYPE_PRIMITIVE) return term; + term->left = normalize(term->left); } while (term->type != TYPE_UNION && (term->right->type != TYPE_PRIMITIVE || term->left->type == TYPE_UNION)); - normalize(term->right); + term->right = normalize(term->right); + + // FIXME: Do we need to take into account any transformation of item here? + if (!term->right) { + if (term->type == TYPE_UNION || term->type == TYPE_DIFFERENCE) return term->left; + else return term->right; + } + if (!term->left) { + if (term->type == TYPE_UNION) return term->right; + else return term->left; + } return term; } bool CSGTerm::normalize_tail(shared_ptr &term) { - if (term->type == TYPE_UNION) return false; // Don't normalize outer union + if (term->type == TYPE_UNION || term->type == TYPE_PRIMITIVE) return false; // Part A: The 'x . (y . z)' expressions @@ -107,46 +188,48 @@ bool CSGTerm::normalize_tail(shared_ptr &term) shared_ptr y = term->right->left; shared_ptr z = term->right->right; - CSGTerm *result = NULL; + shared_ptr result = term; // 1. x - (y + z) -> (x - y) - z if (term->type == TYPE_DIFFERENCE && term->right->type == TYPE_UNION) { - result = new CSGTerm(TYPE_DIFFERENCE, - shared_ptr(new CSGTerm(TYPE_DIFFERENCE, x, y)), + term = createCSGTerm(TYPE_DIFFERENCE, + createCSGTerm(TYPE_DIFFERENCE, x, y), z); + return true; } // 2. x * (y + z) -> (x * y) + (x * z) else if (term->type == TYPE_INTERSECTION && term->right->type == TYPE_UNION) { - result = new CSGTerm(TYPE_UNION, - new CSGTerm(TYPE_INTERSECTION, x, y), - new CSGTerm(TYPE_INTERSECTION, x, z)); + term = createCSGTerm(TYPE_UNION, + createCSGTerm(TYPE_INTERSECTION, x, y), + createCSGTerm(TYPE_INTERSECTION, x, z)); + return true; } // 3. x - (y * z) -> (x - y) + (x - z) else if (term->type == TYPE_DIFFERENCE && term->right->type == TYPE_INTERSECTION) { - result = new CSGTerm(TYPE_UNION, - new CSGTerm(TYPE_DIFFERENCE, x, y), - new CSGTerm(TYPE_DIFFERENCE, x, z)); + term = createCSGTerm(TYPE_UNION, + createCSGTerm(TYPE_DIFFERENCE, x, y), + createCSGTerm(TYPE_DIFFERENCE, x, z)); + return true; } // 4. x * (y * z) -> (x * y) * z else if (term->type == TYPE_INTERSECTION && term->right->type == TYPE_INTERSECTION) { - result = new CSGTerm(TYPE_INTERSECTION, - shared_ptr(new CSGTerm(TYPE_INTERSECTION, x, y)), + term = createCSGTerm(TYPE_INTERSECTION, + createCSGTerm(TYPE_INTERSECTION, x, y), z); + return true; } // 5. x - (y - z) -> (x - y) + (x * z) else if (term->type == TYPE_DIFFERENCE && term->right->type == TYPE_DIFFERENCE) { - result = new CSGTerm(TYPE_UNION, - new CSGTerm(TYPE_DIFFERENCE, x, y), - new CSGTerm(TYPE_INTERSECTION, x, z)); + term = createCSGTerm(TYPE_UNION, + createCSGTerm(TYPE_DIFFERENCE, x, y), + createCSGTerm(TYPE_INTERSECTION, x, z)); + return true; } // 6. x * (y - z) -> (x * y) - z else if (term->type == TYPE_INTERSECTION && term->right->type == TYPE_DIFFERENCE) { - result = new CSGTerm(TYPE_DIFFERENCE, - shared_ptr(new CSGTerm(TYPE_INTERSECTION, x, y)), + term = createCSGTerm(TYPE_DIFFERENCE, + createCSGTerm(TYPE_INTERSECTION, x, y), z); - } - if (result) { - term.reset(result); return true; } @@ -158,28 +241,26 @@ bool CSGTerm::normalize_tail(shared_ptr &term) // 7. (x - y) * z -> (x * z) - y if (term->left->type == TYPE_DIFFERENCE && term->type == TYPE_INTERSECTION) { - result = new CSGTerm(TYPE_DIFFERENCE, - shared_ptr(new CSGTerm(TYPE_INTERSECTION, x, z)), + term = createCSGTerm(TYPE_DIFFERENCE, + createCSGTerm(TYPE_INTERSECTION, x, z), y); + return true; } // 8. (x + y) - z -> (x - z) + (y - z) else if (term->left->type == TYPE_UNION && term->type == TYPE_DIFFERENCE) { - result = new CSGTerm(TYPE_UNION, - new CSGTerm(TYPE_DIFFERENCE, x, z), - new CSGTerm(TYPE_DIFFERENCE, y, z)); + term = createCSGTerm(TYPE_UNION, + createCSGTerm(TYPE_DIFFERENCE, x, z), + createCSGTerm(TYPE_DIFFERENCE, y, z)); + return true; } // 9. (x + y) * z -> (x * z) + (y * z) else if (term->left->type == TYPE_UNION && term->type == TYPE_INTERSECTION) { - result = new CSGTerm(TYPE_UNION, - new CSGTerm(TYPE_INTERSECTION, x, z), - new CSGTerm(TYPE_INTERSECTION, y, z)); - } - - if (result) { - term.reset(result); + term = createCSGTerm(TYPE_UNION, + createCSGTerm(TYPE_INTERSECTION, x, z), + createCSGTerm(TYPE_INTERSECTION, y, z)); return true; } - + return false; } diff --git a/src/csgterm.h b/src/csgterm.h index 1583c62..4930349 100644 --- a/src/csgterm.h +++ b/src/csgterm.h @@ -18,23 +18,35 @@ public: TYPE_DIFFERENCE }; + static shared_ptr createCSGTerm(type_e type, shared_ptr left, shared_ptr right); + static shared_ptr createCSGTerm(type_e type, CSGTerm *left, CSGTerm *right); + type_e type; shared_ptr polyset; std::string label; shared_ptr left; shared_ptr right; - Transform3d m; - double color[4]; + BoundingBox bbox; CSGTerm(const shared_ptr &polyset, const Transform3d &matrix, const double color[4], const std::string &label); - CSGTerm(type_e type, shared_ptr left, shared_ptr right); - CSGTerm(type_e type, CSGTerm *left, CSGTerm *right); ~CSGTerm(); - static shared_ptr normalize(shared_ptr &term); + const BoundingBox &getBoundingBox() const { return this->bbox; } + + static shared_ptr normalize(shared_ptr term); static bool normalize_tail(shared_ptr &term); std::string dump(); +private: + CSGTerm(type_e type, shared_ptr left, shared_ptr right); + CSGTerm(type_e type, CSGTerm *left, CSGTerm *right); + + void initBoundingBox(); + + Transform3d m; + double color[4]; + + friend class CSGChain; }; class CSGChain -- cgit v0.10.1 From 9c4efafc6e2f07e96b035c0dd847667240c53851 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 22 Dec 2011 04:16:38 +0100 Subject: Update test case: Since we're now pruning the normalized tree, subtracted objects which don't touch won't be visible in thrown together mode. Use debug operators in such cases diff --git a/tests/regression/throwntogethertest/difference-tests-expected.png b/tests/regression/throwntogethertest/difference-tests-expected.png index ee75bad..183700c 100644 Binary files a/tests/regression/throwntogethertest/difference-tests-expected.png and b/tests/regression/throwntogethertest/difference-tests-expected.png differ -- cgit v0.10.1 From 62fdb2431f1966f2e1ee6bc465c88f666a673feb Mon Sep 17 00:00:00 2001 From: Don Bright Date: Thu, 22 Dec 2011 06:36:27 -0600 Subject: fix crash bug diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index 469e51c..c2be326 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -289,9 +289,10 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) exit(1); } - QFileInfo fileInfo(filename); - if (!sysinfo_dump) + if (!sysinfo_dump) { + QFileInfo fileInfo(filename); QDir::setCurrent(fileInfo.absolutePath()); + } AbstractNode::resetIndexCounter(); AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst); -- cgit v0.10.1 From cd3d816f93038e9cb35aaf8b8e0852dc8bb4cd49 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Fri, 23 Dec 2011 13:57:34 +0100 Subject: fix for recently introduced bug: If no actual image was generated, we failed to output the expected image diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 87ac3df..5e25052 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -158,7 +158,7 @@ def parsetest(teststring): hits = map( lambda pattern: ezsearch(pattern,teststring), patterns ) test = Test(hits[0],hits[1],hits[2]=='Passed',hits[3],hits[4],hits[5],hits[6],hits[7],teststring) if len(test.actualfile) > 0: test.actualfile_data = tryread(test.actualfile) - if len(test.actualfile) > 0: test.expectedfile_data = tryread(test.expectedfile) + if len(test.expectedfile) > 0: test.expectedfile_data = tryread(test.expectedfile) return test def parselog(data): -- cgit v0.10.1 From 03a2da9f4a63d8e384c91b0daf41eecdb9079336 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Fri, 23 Dec 2011 14:12:35 +0100 Subject: Test case for recent CSG regression reported by Ed Nisley diff --git a/testdata/scad/bugs/bbox-transform-bug.scad b/testdata/scad/bugs/bbox-transform-bug.scad new file mode 100644 index 0000000..ccd2eab --- /dev/null +++ b/testdata/scad/bugs/bbox-transform-bug.scad @@ -0,0 +1,9 @@ +// +// Bug description: The intersection results in an empty object. +// Cause: The rotated bounding box is wrongly calculated, yielding a +// box which don't overlap with the bounding box of the second object. +// +intersection() { + rotate(45) cube(10); + translate([3,2,0]) cube(10); +} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e98dd8e..20a9ede 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -531,7 +531,8 @@ list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES}) list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES}) -list(APPEND THROWNTOGETHERTEST_FILES ${CGALPNGTEST_FILES}) +list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/bbox-transform-bug.scad) +list(APPEND THROWNTOGETHERTEST_FILES ${OPENCSGTEST_FILES}) # Disable tests which are known to cause floating point comparison issues # Once we're capable of comparing these across platforms, we can put these back in diff --git a/tests/regression/opencsgtest/bbox-transform-bug-expected.png b/tests/regression/opencsgtest/bbox-transform-bug-expected.png new file mode 100644 index 0000000..060b921 Binary files /dev/null and b/tests/regression/opencsgtest/bbox-transform-bug-expected.png differ diff --git a/tests/regression/throwntogethertest/bbox-transform-bug-expected.png b/tests/regression/throwntogethertest/bbox-transform-bug-expected.png new file mode 100644 index 0000000..f65e09c Binary files /dev/null and b/tests/regression/throwntogethertest/bbox-transform-bug-expected.png differ -- cgit v0.10.1 From 9d89cc6cf3c636d7d7935f2473710d7f18377e7f Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Fri, 23 Dec 2011 14:27:07 +0100 Subject: Added suggestion diff --git a/doc/TODO.txt b/doc/TODO.txt index 190d742..4fac889 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -166,6 +166,9 @@ o Mesh optimization on STL export - Remove super small triangles (all sides are short) - Replace super thin triangles (one h is short) o Misc + - center as default: Very often, center=true is used everywhere. + Make a global variable ($center?) control this to beautify code + and the avoid typical errors when forgetting to specify center - Go through default values of parameters (e.g. cube() has x,y,z=1 while linear_extrude() has height=100) - Add support for symbolic names to child() statement - Add 'lines' object type for non-solid 2d drawings -- cgit v0.10.1 From 9fa18d53921ed7b2da4892d12958a6705f5a960b Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Fri, 23 Dec 2011 14:33:40 +0100 Subject: Fixed CSG regression reported by Ed Nisley; bounding boxes are now transformed correctly diff --git a/openscad.pro b/openscad.pro index ac49807..50a419d 100644 --- a/openscad.pro +++ b/openscad.pro @@ -232,6 +232,7 @@ SOURCES += src/openscad.cc \ src/CSGTermEvaluator.cc \ src/Tree.cc \ src/mathc99.cc \ + src/linalg.cc \ src/PolySetCache.cc \ src/PolySetEvaluator.cc diff --git a/src/csgterm.cc b/src/csgterm.cc index 426adca..56fcbb5 100644 --- a/src/csgterm.cc +++ b/src/csgterm.cc @@ -115,25 +115,22 @@ CSGTerm::~CSGTerm() void CSGTerm::initBoundingBox() { if (this->type == TYPE_PRIMITIVE) { - BoundingBox polybox = this->polyset->getBoundingBox(); - this->bbox.extend(this->m * polybox.min()); - this->bbox.extend(this->m * polybox.max()); + this->bbox = this->m * this->polyset->getBoundingBox(); } else { const BoundingBox &leftbox = this->left->getBoundingBox(); const BoundingBox &rightbox = this->right->getBoundingBox(); switch (this->type) { case TYPE_UNION: - this->bbox.extend(this->m * leftbox.min().cwise().min(rightbox.min())); - this->bbox.extend(this->m * leftbox.max().cwise().max(rightbox.max())); + this->bbox = this->m * BoundingBox(leftbox.min().cwise().min(rightbox.min()), + leftbox.max().cwise().max(rightbox.max())); break; case TYPE_INTERSECTION: - this->bbox.extend(this->m * leftbox.min().cwise().max(rightbox.min())); - this->bbox.extend(this->m * leftbox.max().cwise().min(rightbox.max())); + this->bbox = this->m * BoundingBox(leftbox.min().cwise().max(rightbox.min()), + leftbox.max().cwise().min(rightbox.max())); break; case TYPE_DIFFERENCE: - this->bbox.extend(this->m * leftbox.min()); - this->bbox.extend(this->m * leftbox.max()); + this->bbox = this->m * leftbox; break; case TYPE_PRIMITIVE: break; @@ -330,11 +327,7 @@ BoundingBox CSGChain::getBoundingBox() const if (types[i] != CSGTerm::TYPE_DIFFERENCE) { BoundingBox psbox = polysets[i]->getBoundingBox(); if (!psbox.isNull()) { - Eigen::Transform3d t; - // Column-major vs. Row-major - t = matrices[i]; - bbox.extend(t * psbox.min()); - bbox.extend(t * psbox.max()); + bbox.extend(matrices[i] * psbox); } } } diff --git a/src/linalg.h b/src/linalg.h index a83949e..c1a14d1 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -13,4 +13,6 @@ using Eigen::Matrix3d; using Eigen::Matrix4d; using Eigen::Transform3d; +BoundingBox operator*(const Transform3d &m, const BoundingBox &box); + #endif diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 20a9ede..a8ab9b9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -244,6 +244,7 @@ add_definitions(-DOPENSCAD_TESTING) set(CORE_SOURCES tests-common.cc ../src/mathc99.cc + ../src/linalg.cc ../src/handle_dep.cc ../src/value.cc ../src/expr.cc diff --git a/tests/regression/opencsgtest/bbox-transform-bug-expected.png b/tests/regression/opencsgtest/bbox-transform-bug-expected.png index 060b921..52e4f2a 100644 Binary files a/tests/regression/opencsgtest/bbox-transform-bug-expected.png and b/tests/regression/opencsgtest/bbox-transform-bug-expected.png differ diff --git a/tests/regression/opencsgtest/transform-tests-expected.png b/tests/regression/opencsgtest/transform-tests-expected.png index dc43942..52f4330 100644 Binary files a/tests/regression/opencsgtest/transform-tests-expected.png and b/tests/regression/opencsgtest/transform-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/bbox-transform-bug-expected.png b/tests/regression/throwntogethertest/bbox-transform-bug-expected.png index f65e09c..dd55c91 100644 Binary files a/tests/regression/throwntogethertest/bbox-transform-bug-expected.png and b/tests/regression/throwntogethertest/bbox-transform-bug-expected.png differ diff --git a/tests/regression/throwntogethertest/intersection_for-tests-expected.png b/tests/regression/throwntogethertest/intersection_for-tests-expected.png index c80a576..4721663 100644 Binary files a/tests/regression/throwntogethertest/intersection_for-tests-expected.png and b/tests/regression/throwntogethertest/intersection_for-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/transform-tests-expected.png b/tests/regression/throwntogethertest/transform-tests-expected.png index a120581..52f4330 100644 Binary files a/tests/regression/throwntogethertest/transform-tests-expected.png and b/tests/regression/throwntogethertest/transform-tests-expected.png differ -- cgit v0.10.1