From 0407d287b035e4f3aabf718f290eb31365fad26e Mon Sep 17 00:00:00 2001 From: Brad Pitcher Date: Tue, 4 Oct 2011 23:38:25 -0700 Subject: disable eigen alignment diff --git a/src/dxfdata.h b/src/dxfdata.h index d24541c..e2f229e 100644 --- a/src/dxfdata.h +++ b/src/dxfdata.h @@ -1,5 +1,8 @@ #ifndef DXFDATA_H_ #define DXFDATA_H_ +#ifndef EIGEN_DONT_ALIGN +#define EIGEN_DONT_ALIGN +#endif #include #include @@ -30,7 +33,7 @@ public: } }; - std::vector > points; + std::vector points; std::vector paths; std::vector dims; diff --git a/src/linalg.h b/src/linalg.h index 06991cf..eb1ed3c 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -1,6 +1,8 @@ #ifndef LINALG_H_ #define LINALG_H_ - +#ifndef EIGEN_DONT_ALIGN +#define EIGEN_DONT_ALIGN +#endif #include #include -- cgit v0.10.1 From 45060878b56070fa12e6f0bb85bad1f6e1687b71 Mon Sep 17 00:00:00 2001 From: Brad Pitcher Date: Tue, 4 Oct 2011 23:58:34 -0700 Subject: enable compiling with mingw-cross-env diff --git a/boost.pri b/boost.pri index 34a9dd2..2ec580f 100644 --- a/boost.pri +++ b/boost.pri @@ -10,9 +10,14 @@ boost { } } - win32 { - LIBS += -llibboost_thread-vc90-mt-s-1_46_1 -llibboost_program_options-vc90-mt-s-1_46_1 - } else { - LIBS += -lboost_thread -lboost_program_options + CONFIG(mingw-cross-env) { + LIBS += -lboost_thread_win32-mt -lboost_program_options-mt + } + else { + win32 { + LIBS += -llibboost_thread-vc90-mt-s-1_46_1 -llibboost_program_options-vc90-mt-s-1_46_1 + } else { + LIBS += -lboost_thread -lboost_program_options + } } } diff --git a/cgal.pri b/cgal.pri index 49e44de..bb32d1f 100644 --- a/cgal.pri +++ b/cgal.pri @@ -1,5 +1,6 @@ cgal { DEFINES += ENABLE_CGAL + CONFIG(mingw-cross-env):DEFINES += BOOST_STATIC BOOST_THREAD_USE_LIB Boost_USE_STATIC_LIBS isEmpty(DEPLOYDIR) { # Optionally specify location of CGAL using the @@ -13,10 +14,15 @@ cgal { } } - win32 { - LIBS += $$CGAL_DIR/auxiliary/gmp/lib/libmpfr-4.lib -lCGAL-vc90-mt-s - } else { - LIBS += -lgmp -lmpfr -lCGAL + CONFIG(mingw-cross-env) { + LIBS += -lgmp -lmpfr -lCGAL + } + else { + win32 { + LIBS += $$CGAL_DIR/auxiliary/gmp/lib/libmpfr-4.lib -lCGAL-vc90-mt-s + } else { + LIBS += -lgmp -lmpfr -lCGAL + } } QMAKE_CXXFLAGS += -frounding-math } diff --git a/eigen2.pri b/eigen2.pri index 8344f00..e8bb42c 100644 --- a/eigen2.pri +++ b/eigen2.pri @@ -9,6 +9,11 @@ else { INCLUDEPATH += /opt/local/include/eigen2 } else { - INCLUDEPATH += /usr/include/eigen2 + CONFIG(mingw-cross-env) { + INCLUDEPATH += mingw-cross-env/include/eigen2 + } + else { + INCLUDEPATH += /usr/include/eigen2 + } } } diff --git a/glew.pri b/glew.pri index f2aca4e..3878e6b 100644 --- a/glew.pri +++ b/glew.pri @@ -16,4 +16,5 @@ glew { unix:LIBS += -lGLEW win32:LIBS += -lglew32s + CONFIG(mingw-cross-env):DEFINES += GLEW_STATIC } diff --git a/openscad.pro b/openscad.pro index 3a41800..361525a 100644 --- a/openscad.pro +++ b/openscad.pro @@ -39,8 +39,14 @@ DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONT !isEmpty(VERSION_DAY): DEFINES += OPENSCAD_DAY=$$VERSION_DAY win32:DEFINES += _USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS YY_NO_UNISTD_H -#disable warning about too long decorated names -win32:QMAKE_CXXFLAGS += -wd4503 +CONFIG(mingw-cross-env) { + LIBS += mingw-prefix/lib/libglew32s.a mingw-prefix/lib/libglut.a mingw-prefix/lib/libopengl32.a mingw-prefix/lib/libGLEW.a mingw-prefix/lib/libglaux.a mingw-prefix/lib/libglu32.a mingw-prefix/lib/libopencsg.a mingw-prefix/lib/libmpfr.a mingw-prefix/lib/libCGAL.a + QMAKE_CXXFLAGS += -fpermissive +} +else { + #disable warning about too long decorated names + win32:QMAKE_CXXFLAGS += -wd4503 +} TEMPLATE = app diff --git a/src/CSGTermEvaluator.h b/src/CSGTermEvaluator.h index cca6c91..b359f5b 100644 --- a/src/CSGTermEvaluator.h +++ b/src/CSGTermEvaluator.h @@ -6,6 +6,10 @@ #include #include "visitor.h" +#if defined __WIN32__ && ! defined _MSC_VER +#include +#endif + class CSGTermEvaluator : public Visitor { public: diff --git a/src/lexer.l b/src/lexer.l index 3cd4a19..cf5cb6d 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -35,8 +35,11 @@ #include #include -//isatty for visual c++ -#ifdef _MSC_VER +//isatty for visual c++ and mingw-cross-env +#if defined __WIN32__ && ! defined _MSC_VER +#include "unistd.h" +#endif +#if defined __WIN32__ || defined _MSC_VER extern "C" int __cdecl _isatty(int _FileHandle); #define isatty _isatty #endif -- cgit v0.10.1 From 6acf0b5019d8b68d81f6c1facd6f889c1f468b53 Mon Sep 17 00:00:00 2001 From: Brad Pitcher Date: Sun, 16 Oct 2011 00:39:17 -0700 Subject: support mingw win32 builds diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 9261d7a..e12cd9d 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -1,7 +1,9 @@ #!/bin/sh # # This script creates a binary release of OpenSCAD. -# This should work under Mac OS X and Windows (msys). Linux support pending. +# This should work under Mac OS X, Windows (msys), and Linux cross-compiling +# for windows using mingw-cross-env (use like: OS=LINXWIN release-common.sh). +# Linux support pending. # The script will create a file called openscad-.zip # in the current directory. # @@ -54,9 +56,23 @@ case $OS in ZIPARGS="a -tzip" TARGET=release ;; + LINXWIN) + unset CONFIG + TARGET=release + ZIP="zip" + ZIPARGS="-r" + ;; +esac + +case $OS in + LINXWIN) + i686-pc-mingw32-qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro + ;; + *) + qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro + ;; esac -qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro make -s clean case $OS in MACOSX) @@ -122,4 +138,16 @@ case $OS in rm -rf openscad-$VERSION echo "Binary created: openscad-$VERSION.zip" ;; + LINXWIN) + #package + cp $TARGET/openscad.exe openscad-$VERSION + rm -f OpenSCAD-$VERSION.zip + "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION + cp scripts/installer.nsi openscad-$VERSION/ + cd openscad-$VERSION && makensis installer.nsi && cd .. + cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe + rm -rf openscad-$VERSION + echo "Binary created: OpenSCAD-$VERSION.zip" + echo "Installer created: OpenSCAD-$VERSION-Installer.exe" + ;; esac diff --git a/scripts/update-web.sh b/scripts/update-web.sh index 4180d01..9036d9b 100755 --- a/scripts/update-web.sh +++ b/scripts/update-web.sh @@ -1,13 +1,27 @@ #!/bin/bash -dmgfile=$1 -if [ -z "$dmgfile" ]; then - echo "Usage: $0 " +# Works with Mac OS X and Linux cross-compiling for windows using +# mingw-cross-env (use like: OS=LINXWIN update-web.sh file1.zip file2.exe). + +file1=$1 +if [ -z "$file1" ]; then + echo "Usage: $0 []" exit 1 fi + +if [[ $OSTYPE =~ "darwin" ]]; then + OS=MACOSX +fi + indexfile=../openscad.github.com/index.html if [ -f $indexfile ]; then - sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$dmgfile\\3$dmgfile\\5/" $indexfile + if [ $OS == MACOSX ]; then + sed -i .backup -e "s/^\(.*mac-snapshot.*\)\(OpenSCAD-.*\.dmg\)\(.*\)\(OpenSCAD-.*dmg\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile + elif [ $OS == LINXWIN ]; then + file2=$2 + sed -i .backup -e "s/^\(.*win-snapshot-zip.*\)\(OpenSCAD-.*\.zip\)\(.*\)\(OpenSCAD-.*zip\)\(.*$\)/\\1$file1\\3$file1\\5/" $indexfile + sed -i .backup -e "s/^\(.*win-snapshot-exe.*\)\(OpenSCAD-.*-Installer\.exe\)\(.*\)\(OpenSCAD-.*-Installer.exe\)\(.*$\)/\\1$file2\\3$file2\\5/" $indexfile + fi echo "Web page updated. Remember to commit and push openscad.github.com" else echo "Web page not found at $indexfile" -- cgit v0.10.1 From b64de29a302fa09f4e9409f57d344c602566e442 Mon Sep 17 00:00:00 2001 From: Brad Pitcher Date: Sat, 22 Oct 2011 14:07:14 -0700 Subject: fix mingw-cross-env location diff --git a/openscad.pro b/openscad.pro index 361525a..ed65a03 100644 --- a/openscad.pro +++ b/openscad.pro @@ -40,7 +40,7 @@ DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONT win32:DEFINES += _USE_MATH_DEFINES NOMINMAX _CRT_SECURE_NO_WARNINGS YY_NO_UNISTD_H CONFIG(mingw-cross-env) { - LIBS += mingw-prefix/lib/libglew32s.a mingw-prefix/lib/libglut.a mingw-prefix/lib/libopengl32.a mingw-prefix/lib/libGLEW.a mingw-prefix/lib/libglaux.a mingw-prefix/lib/libglu32.a mingw-prefix/lib/libopencsg.a mingw-prefix/lib/libmpfr.a mingw-prefix/lib/libCGAL.a + LIBS += mingw-cross-env/lib/libglew32s.a mingw-cross-env/lib/libglut.a mingw-cross-env/lib/libopengl32.a mingw-cross-env/lib/libGLEW.a mingw-cross-env/lib/libglaux.a mingw-cross-env/lib/libglu32.a mingw-cross-env/lib/libopencsg.a mingw-cross-env/lib/libmpfr.a mingw-cross-env/lib/libCGAL.a QMAKE_CXXFLAGS += -fpermissive } else { -- cgit v0.10.1 From e29ba42d591a6bf24f38fecc4409af1e597732db Mon Sep 17 00:00:00 2001 From: Brad Pitcher Date: Tue, 1 Nov 2011 11:47:37 -0700 Subject: bring inline with master diff --git a/cgal.pri b/cgal.pri index 96cd2ba..1d9ef22 100644 --- a/cgal.pri +++ b/cgal.pri @@ -1,6 +1,5 @@ cgal { DEFINES += ENABLE_CGAL - CONFIG(mingw-cross-env):DEFINES += BOOST_STATIC BOOST_THREAD_USE_LIB Boost_USE_STATIC_LIBS isEmpty(DEPLOYDIR) { # Optionally specify location of CGAL using the diff --git a/src/CSGTermEvaluator.h b/src/CSGTermEvaluator.h index 9d1fabe..3a8122b 100644 --- a/src/CSGTermEvaluator.h +++ b/src/CSGTermEvaluator.h @@ -7,10 +7,6 @@ #include #include "visitor.h" -#if defined __WIN32__ && ! defined _MSC_VER -#include -#endif - class CSGTermEvaluator : public Visitor { public: diff --git a/src/dxfdata.h b/src/dxfdata.h index 17da1b9..7eea6a9 100644 --- a/src/dxfdata.h +++ b/src/dxfdata.h @@ -1,8 +1,5 @@ #ifndef DXFDATA_H_ #define DXFDATA_H_ -#ifndef EIGEN_DONT_ALIGN -#define EIGEN_DONT_ALIGN -#endif #include "linalg.h" #include diff --git a/src/linalg.h b/src/linalg.h index 744e810..e20d8d8 100644 --- a/src/linalg.h +++ b/src/linalg.h @@ -1,8 +1,6 @@ #ifndef LINALG_H_ #define LINALG_H_ -#ifndef EIGEN_DONT_ALIGN -#define EIGEN_DONT_ALIGN -#endif + #include #include #include -- cgit v0.10.1 From d27a20d01f3402c27465d46d9c970d4571e92958 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 6 Nov 2011 19:18:59 +0100 Subject: Initial work: Created a Filename class diff --git a/src/importnode.h b/src/importnode.h index c08ecc9..bcb229f 100644 --- a/src/importnode.h +++ b/src/importnode.h @@ -3,6 +3,7 @@ #include "node.h" #include "visitor.h" +#include "value.h" enum import_type_e { TYPE_UNKNOWN, @@ -22,7 +23,7 @@ public: virtual std::string name() const; import_type_e type; - std::string filename; + Filename filename; std::string layername; int convexity; double fn, fs, fa; diff --git a/src/linearextrudenode.h b/src/linearextrudenode.h index 503f1bd..112eccc 100644 --- a/src/linearextrudenode.h +++ b/src/linearextrudenode.h @@ -3,6 +3,7 @@ #include "node.h" #include "visitor.h" +#include "value.h" class LinearExtrudeNode : public AbstractPolyNode { @@ -23,7 +24,8 @@ public: double fn, fs, fa, height, twist; double origin_x, origin_y, scale; bool center, has_twist; - std::string filename, layername; + Filename filename; + std::string layername; virtual PolySet *evaluate_polyset(class PolySetEvaluator *) const; }; diff --git a/src/rotateextrudenode.h b/src/rotateextrudenode.h index 613d44b..86da356 100644 --- a/src/rotateextrudenode.h +++ b/src/rotateextrudenode.h @@ -3,6 +3,7 @@ #include "node.h" #include "visitor.h" +#include "value.h" class RotateExtrudeNode : public AbstractPolyNode { @@ -21,7 +22,8 @@ public: int convexity; double fn, fs, fa; double origin_x, origin_y, scale; - std::string filename, layername; + Filename filename; + std::string layername; virtual PolySet *evaluate_polyset(class PolySetEvaluator *) const; }; diff --git a/src/surface.cc b/src/surface.cc index cdac4ec..ec5d790 100644 --- a/src/surface.cc +++ b/src/surface.cc @@ -58,7 +58,7 @@ public: virtual std::string toString() const; virtual std::string name() const { return "surface"; } - std::string filename; + Filename filename; bool center; int convexity; virtual PolySet *evaluate_polyset(class PolySetEvaluator *) const; diff --git a/src/value.h b/src/value.h index fb6500c..f3a4fdf 100644 --- a/src/value.h +++ b/src/value.h @@ -4,6 +4,13 @@ #include #include +class Filename : public std::string +{ +public: + Filename() : std::string() {} + Filename(const std::string &f) : std::string(f) {} +}; + class Value { public: -- cgit v0.10.1 From f8090c2a534c2efccaabd9e6fa2308895aa94db6 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 6 Nov 2011 22:13:31 +0100 Subject: Reinstated old -x and -s cmd-line parameters for backwards compatibility diff --git a/RELEASE_NOTES b/RELEASE_NOTES index cc6d99e..d67766c 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -30,7 +30,7 @@ o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated. o The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude() are now deprecated. Use an import() child instead. o import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead. -o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). +o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated. o F2 and F3 for Save and Reload is now deprecated OpenSCAD 2011.06 diff --git a/src/openscad.cc b/src/openscad.cc index 678d87a..d708a8e 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -134,6 +134,8 @@ int main(int argc, char **argv) ("help,h", "help message") ("version,v", "print the version") ("o,o", po::value(), "out-file") + ("s,s", po::value(), "stl-file") + ("x,x", po::value(), "dxf-file") ("d,d", po::value(), "deps-file") ("m,m", po::value(), "makefile") ("D,D", po::value >(), "var=val"); @@ -160,6 +162,16 @@ int main(int argc, char **argv) if (output_file) help(argv[0]); output_file = vm["o"].as().c_str(); } + if (vm.count("s")) { + fprintf(stderr, "DEPRECATED: The -s option is deprecated. Use -o instead.\n"); + if (output_file) help(argv[0]); + output_file = vm["s"].as().c_str(); + } + if (vm.count("x")) { + fprintf(stderr, "DEPRECATED: The -x option is deprecated. Use -o instead.\n"); + if (output_file) help(argv[0]); + output_file = vm["x"].as().c_str(); + } if (vm.count("d")) { if (deps_output_file) help(argv[0]); -- cgit v0.10.1 From 75c9749589c86413ff937350ebb3bdd72d345ec7 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 00:36:30 +0100 Subject: compile fix in debug mode diff --git a/tests/OffscreenContext.mm b/tests/OffscreenContext.mm index eb2f777..2bbaffa 100644 --- a/tests/OffscreenContext.mm +++ b/tests/OffscreenContext.mm @@ -48,20 +48,20 @@ OffscreenContext *create_offscreen_context(int w, int h) glewInit(); #ifdef DEBUG - cout << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; - cout << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" + std::cout << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; + std::cout << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" << "OpenGL version " << (const char *)glGetString(GL_VERSION) << "\n"; - cout << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; + std::cout << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; if (GLEW_ARB_framebuffer_object) { - cout << "ARB_FBO supported\n"; + std::cout << "ARB_FBO supported\n"; } if (GLEW_EXT_framebuffer_object) { - cout << "EXT_FBO supported\n"; + std::cout << "EXT_FBO supported\n"; } if (GLEW_EXT_packed_depth_stencil) { - cout << "EXT_packed_depth_stencil\n"; + std::cout << "EXT_packed_depth_stencil\n"; } #endif -- cgit v0.10.1 From 58502a2c346d46e1240f32721e00b1ed6a65a324 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 00:37:32 +0100 Subject: Debug output: FBO bit depth info diff --git a/tests/OffscreenView.cc b/tests/OffscreenView.cc index e34fbce..46951c1 100644 --- a/tests/OffscreenView.cc +++ b/tests/OffscreenView.cc @@ -16,6 +16,20 @@ OffscreenView::OffscreenView(size_t width, size_t height) for (int i = 0; i < 10; i++) this->shaderinfo[i] = 0; this->ctx = create_offscreen_context(width, height); if ( this->ctx == NULL ) throw -1; + +#ifdef DEBUG + GLint rbits, gbits, bbits, abits, dbits, sbits; + glGetIntegerv(GL_RED_BITS, &rbits); + glGetIntegerv(GL_GREEN_BITS, &gbits); + glGetIntegerv(GL_BLUE_BITS, &bbits); + glGetIntegerv(GL_ALPHA_BITS, &abits); + glGetIntegerv(GL_DEPTH_BITS, &dbits); + glGetIntegerv(GL_STENCIL_BITS, &sbits); + + fprintf(stderr, "FBO: RGBA(%d%d%d%d), depth(%d), stencil(%d)\n", + rbits, gbits, bbits, abits, dbits, sbits); +#endif + initializeGL(); resizeGL(width, height); } -- cgit v0.10.1 From 0777597522984a6b253f34b2fe4f9e02160731f7 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 00:59:25 +0100 Subject: Temporarily disable tests causing floating point comparison errors across platforms diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fb007cc..2b60a09 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -327,6 +327,15 @@ file(GLOB SCAD_DXF_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/dxf/*.scad) file(GLOB EXAMPLE_FILES ${CMAKE_SOURCE_DIR}/../examples/*.scad) list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_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 +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/transform-tests.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/render-tests.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example005.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example006.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example020.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example021.scad) list(APPEND ECHO_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/echo.scad -- cgit v0.10.1 From f107519cabee2d524653959cbb8b7ef6fc852ba8 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 01:44:33 +0100 Subject: Bugfix: evaluate read dump in the cwd of the original file diff --git a/tests/dumptest.cc b/tests/dumptest.cc index 5f2f22f..4071669 100644 --- a/tests/dumptest.cc +++ b/tests/dumptest.cc @@ -144,7 +144,6 @@ int main(int argc, char **argv) fprintf(stderr, "Error: Unable to read back dumped file\n"); exit(1); } - fileInfo = QFileInfo(outfilename); QDir::setCurrent(fileInfo.absolutePath()); AbstractNode::resetIndexCounter(); @@ -155,10 +154,8 @@ int main(int argc, char **argv) string readbackstr = dumptree(tree, *root_node); if (dumpstdstr != readbackstr) { fprintf(stderr, "Error: Readback is different from original dump:\n"); - fprintf(stderr, "Original:\n"); - fprintf(stderr, dumpstdstr.c_str()); - fprintf(stderr, "Readback:\n"); - fprintf(stderr, readbackstr.c_str()); + fprintf(stderr, "Original:\n%s", dumpstdstr.c_str()); + fprintf(stderr, "Readback:\n%s", readbackstr.c_str()); exit(1); } -- cgit v0.10.1 From 8a51e15666d1a1be32508891959e053bcbaa938d Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 01:45:14 +0100 Subject: Custom stream operator for outputting relative filenames diff --git a/src/value.cc b/src/value.cc index 6685594..0b7cd9b 100644 --- a/src/value.cc +++ b/src/value.cc @@ -28,6 +28,7 @@ #include "mathc99.h" #include #include +#include Value::Value() { @@ -413,3 +414,9 @@ std::ostream &operator<<(std::ostream &stream, const Value &value) return stream; } +std::ostream &operator<<(std::ostream &stream, const Filename &filename) +{ + stream << QDir::current().relativeFilePath(QString::fromStdString(filename)).toStdString(); + return stream; +} + diff --git a/src/value.h b/src/value.h index f3a4fdf..f81d28e 100644 --- a/src/value.h +++ b/src/value.h @@ -77,5 +77,6 @@ private: }; std::ostream &operator<<(std::ostream &stream, const Value &value); +std::ostream &operator<<(std::ostream &stream, const Filename &filename); #endif -- cgit v0.10.1 From e38928aa9b17af5c84c6c46154b0f7abdce8b259 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 01:45:43 +0100 Subject: Updated test with new dumptest behavior for outputting relative filenames diff --git a/tests/regression/dumptest/example007-expected.txt b/tests/regression/dumptest/example007-expected.txt index 9f6c9a9..9bb11f7 100644 --- a/tests/regression/dumptest/example007-expected.txt +++ b/tests/regression/dumptest/example007-expected.txt @@ -1,20 +1,20 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -10], [0, 0, 0, 1]]) { group() { difference() { - rotate_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example007.dxf", cache = "4d38d4de.3739", layer = "dorn", origin = [0, 0], scale = 1, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "dorn", origin = [0, 0], scale = 1, convexity = 3, $fn = 0, $fa = 12, $fs = 1); group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { intersection() { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example007.dxf", cache = "4d38d4de.3739", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } } multmatrix([[6.12323e-17, -1, 0, 0], [1, 6.12323e-17, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example007.dxf", cache = "4d38d4de.3739", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); } } } @@ -26,13 +26,13 @@ intersection() { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example007.dxf", cache = "4d38d4de.3739", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } } multmatrix([[6.12323e-17, -1, 0, 0], [1, 6.12323e-17, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example007.dxf", cache = "4d38d4de.3739", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/example008-expected.txt b/tests/regression/dumptest/example008-expected.txt index 8620536..7ab00ff 100644 --- a/tests/regression/dumptest/example008-expected.txt +++ b/tests/regression/dumptest/example008-expected.txt @@ -1,26 +1,26 @@ difference() { intersection() { multmatrix([[1, 0, 0, -25], [0, 1, 0, -25], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example008.dxf", cache = "4d38d4de.462c", layer = "G", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "G", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -25], [0, 1, 0, -125], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example008.dxf", cache = "4d38d4de.462c", layer = "E", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "E", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } } multmatrix([[6.12323e-17, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -125], [0, 1, 0, -125], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example008.dxf", cache = "4d38d4de.462c", layer = "B", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "B", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } } } intersection() { multmatrix([[1, 0, 0, -125], [0, 1, 0, -25], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example008.dxf", cache = "4d38d4de.462c", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[6.12323e-17, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -125], [0, 1, 0, -25], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example008.dxf", cache = "4d38d4de.462c", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/example009-expected.txt b/tests/regression/dumptest/example009-expected.txt index 01d9ebe..48afadf 100644 --- a/tests/regression/dumptest/example009-expected.txt +++ b/tests/regression/dumptest/example009-expected.txt @@ -1,14 +1,14 @@ - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example009.dxf", cache = "4d38d4de.59bc", layer = "body", origin = [0, 0], scale = 1, height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "body", origin = [0, 0], scale = 1, height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example009.dxf", cache = "4d38d4de.59bc", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -12], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example009.dxf", cache = "4d38d4de.59bc", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); } } intersection() { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example009.dxf", cache = "4d38d4de.59bc", layer = "fan_top", origin = [0, 0], scale = 1, height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example009.dxf", cache = "4d38d4de.59bc", layer = "fan_side", origin = [0, -40], scale = 1, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "fan_top", origin = [0, 0], scale = 1, height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "fan_side", origin = [0, -40], scale = 1, convexity = 10, $fn = 0, $fa = 12, $fs = 1); } diff --git a/tests/regression/dumptest/example010-expected.txt b/tests/regression/dumptest/example010-expected.txt index 19c84bf..55d2481 100644 --- a/tests/regression/dumptest/example010-expected.txt +++ b/tests/regression/dumptest/example010-expected.txt @@ -1,7 +1,7 @@ intersection() { - surface(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example010.dat", center = true); + surface(file = "example010.dat", center = true); multmatrix([[0.707107, -0.707107, 0, 0], [0.707107, 0.707107, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - surface(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example010.dat", center = true); + surface(file = "example010.dat", center = true); } } diff --git a/tests/regression/dumptest/example012-expected.txt b/tests/regression/dumptest/example012-expected.txt index 698ad99..0afa0a2 100644 --- a/tests/regression/dumptest/example012-expected.txt +++ b/tests/regression/dumptest/example012-expected.txt @@ -2,7 +2,7 @@ sphere($fn = 0, $fa = 12, $fs = 1, r = 20); multmatrix([[1, 0, 0, -2.92], [0, 1, 0, 0.5], [0, 0, 1, 20], [0, 0, 0, 1]]) { multmatrix([[-1, 1.22465e-16, 1.49976e-32, 0], [1.22465e-16, 1, 1.22465e-16, 0], [0, 1.22465e-16, -1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example012.stl", cache = "4d38d4de.456f", layer = "", origin = [0, 0], scale = 1, convexity = 5, $fn = 0, $fa = 12, $fs = 1); + import(file = "example012.stl", cache = "4d38d4de.456f", layer = "", origin = [0, 0], scale = 1, convexity = 5, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/example013-expected.txt b/tests/regression/dumptest/example013-expected.txt index 53d2e83..66ef60b 100644 --- a/tests/regression/dumptest/example013-expected.txt +++ b/tests/regression/dumptest/example013-expected.txt @@ -1,10 +1,10 @@ intersection() { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[1, 0, 0, 0], [0, 2.22045e-16, -1, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } } diff --git a/tests/regression/dumptest/example015-expected.txt b/tests/regression/dumptest/example015-expected.txt index 24a3bbd..76b2c7e 100644 --- a/tests/regression/dumptest/example015-expected.txt +++ b/tests/regression/dumptest/example015-expected.txt @@ -24,6 +24,6 @@ } } } - import(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example009.dxf", cache = "4d38d4de.59bc", layer = "body", origin = [0, 0], scale = 2, convexity = 6, $fn = 0, $fa = 12, $fs = 1); + import(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "body", origin = [0, 0], scale = 2, convexity = 6, $fn = 0, $fa = 12, $fs = 1); } diff --git a/tests/regression/dumptest/example016-expected.txt b/tests/regression/dumptest/example016-expected.txt index d393fb6..5f809ed 100644 --- a/tests/regression/dumptest/example016-expected.txt +++ b/tests/regression/dumptest/example016-expected.txt @@ -16,7 +16,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } @@ -35,7 +35,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } @@ -54,7 +54,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } @@ -73,7 +73,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/examples/example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/import_stl-tests-expected.txt b/tests/regression/dumptest/import_stl-tests-expected.txt index 8c3a540..54ef327 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 = "/Users/kintel/code/OpenSCAD/openscad/testdata/scad/features/import.stl", cache = "4e823ddd.2506", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "import.stl", cache = "4e823ddd.2506", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); diff --git a/tests/regression/dumptest/null-polygons-expected.txt b/tests/regression/dumptest/null-polygons-expected.txt index f98d284..07f9825 100644 --- a/tests/regression/dumptest/null-polygons-expected.txt +++ b/tests/regression/dumptest/null-polygons-expected.txt @@ -1,5 +1,5 @@ linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/scad/features/null-polygons.dxf", cache = "4e823ddd.3124", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "null-polygons.dxf", cache = "4e823ddd.3124", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } - linear_extrude(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/scad/features/null-polygons.dxf", cache = "4e823ddd.3124", layer = "", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "null-polygons.dxf", cache = "4e823ddd.3124", layer = "", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); diff --git a/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt b/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt index 77ba467..a28a490 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 = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/open-polyline.dxf", cache = "4ead4109.2d8a", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(file = "../../dxf/open-polyline.dxf", cache = "4ead4109.2d8a", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); diff --git a/tests/regression/dumptest/surface-tests-expected.txt b/tests/regression/dumptest/surface-tests-expected.txt index 9405aa4..e3b59c5 100644 --- a/tests/regression/dumptest/surface-tests-expected.txt +++ b/tests/regression/dumptest/surface-tests-expected.txt @@ -1,3 +1,3 @@ surface(file = "", center = false); - surface(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/scad/features/surface.dat", center = true); + surface(file = "surface.dat", center = true); -- cgit v0.10.1 From 4213d89fa5ba7523bf47a5147f45c6b876a563e7 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 02:06:50 +0100 Subject: indentation diff --git a/scripts/release-common.sh b/scripts/release-common.sh index e12cd9d..9f03ee5 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -59,8 +59,8 @@ case $OS in LINXWIN) unset CONFIG TARGET=release - ZIP="zip" - ZIPARGS="-r" + ZIP="zip" + ZIPARGS="-r" ;; esac @@ -143,9 +143,9 @@ case $OS in cp $TARGET/openscad.exe openscad-$VERSION rm -f OpenSCAD-$VERSION.zip "$ZIP" $ZIPARGS OpenSCAD-$VERSION.zip openscad-$VERSION - cp scripts/installer.nsi openscad-$VERSION/ - cd openscad-$VERSION && makensis installer.nsi && cd .. - cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe + cp scripts/installer.nsi openscad-$VERSION/ + cd openscad-$VERSION && makensis installer.nsi && cd .. + cp openscad-$VERSION/openscad_setup.exe OpenSCAD-$VERSION-Installer.exe rm -rf openscad-$VERSION echo "Binary created: OpenSCAD-$VERSION.zip" echo "Installer created: OpenSCAD-$VERSION-Installer.exe" -- cgit v0.10.1 From aa94d42d2c6647341b1d374d3f1a7216aede0d1c Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 02:37:44 +0100 Subject: Don't dump timestamp of included files, this wasn't really used anywhere diff --git a/src/import.cc b/src/import.cc index 880823d..230cab2 100644 --- a/src/import.cc +++ b/src/import.cc @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -228,13 +227,8 @@ std::string ImportNode::toString() const { std::stringstream stream; - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(this->filename.c_str(), &st); - stream << this->name(); stream << "(file = \"" << this->filename << "\", " - "cache = \"" << std::hex << (int)st.st_mtime << "." << (int)st.st_size << "\", " "layer = \"" << this->layername << "\", " "origin = [" << std::dec << this->origin_x << ", " << this->origin_y << "], " "scale = " << this->scale << ", " diff --git a/src/linearextrude.cc b/src/linearextrude.cc index d1d2841..3d91ac4 100644 --- a/src/linearextrude.cc +++ b/src/linearextrude.cc @@ -138,7 +138,6 @@ std::string LinearExtrudeNode::toString() const if (!this->filename.empty()) { // Ignore deprecated parameters if empty stream << "file = \"" << this->filename << "\", " - "cache = \"" << QFileInfo(QString::fromStdString(this->filename)) << "\", " "layer = \"" << this->layername << "\", " "origin = [" << this->origin_x << ", " << this->origin_y << "], " "scale = " << this->scale << ", "; diff --git a/src/printutils.cc b/src/printutils.cc index ec41765..0749587 100644 --- a/src/printutils.cc +++ b/src/printutils.cc @@ -50,8 +50,3 @@ void PRINT_NOCACHE(const std::string &msg) outputhandler(msg, outputhandler_data); } } - -std::ostream &operator<<(std::ostream &os, const QFileInfo &fi) { - os << std::hex << (fi.exists()?fi.lastModified().toTime_t():0) << "." << fi.size(); - return os; -} diff --git a/src/rotateextrude.cc b/src/rotateextrude.cc index ae8793d..e64f6f1 100644 --- a/src/rotateextrude.cc +++ b/src/rotateextrude.cc @@ -116,7 +116,6 @@ std::string RotateExtrudeNode::toString() const if (!this->filename.empty()) { // Ignore deprecated parameters if empty stream << "file = \"" << this->filename << "\", " - "cache = \"" << QFileInfo(QString::fromStdString(this->filename)) << "\", " "layer = \"" << this->layername << "\", " "origin = [" << std::dec << this->origin_x << ", " << this->origin_y << "], " "scale = " << this->scale << ", "; diff --git a/tests/regression/dumptest/allmodules-expected.txt b/tests/regression/dumptest/allmodules-expected.txt index fee83a0..fba3961 100644 --- a/tests/regression/dumptest/allmodules-expected.txt +++ b/tests/regression/dumptest/allmodules-expected.txt @@ -14,10 +14,10 @@ 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 = "", cache = "0.0", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", cache = "0.0", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", cache = "0.0", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); - import(file = "", cache = "0.0", 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); + import(file = "", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); group(); cube(size = [1, 1, 1], center = false); sphere($fn = 0, $fa = 12, $fs = 1, r = 1); diff --git a/tests/regression/dumptest/example007-expected.txt b/tests/regression/dumptest/example007-expected.txt index 9bb11f7..4e130bd 100644 --- a/tests/regression/dumptest/example007-expected.txt +++ b/tests/regression/dumptest/example007-expected.txt @@ -1,20 +1,20 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -10], [0, 0, 0, 1]]) { group() { difference() { - rotate_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "dorn", origin = [0, 0], scale = 1, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + rotate_extrude(file = "example007.dxf", layer = "dorn", origin = [0, 0], scale = 1, convexity = 3, $fn = 0, $fa = 12, $fs = 1); group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { group() { intersection() { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } } multmatrix([[6.12323e-17, -1, 0, 0], [1, 6.12323e-17, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); } } } @@ -26,13 +26,13 @@ intersection() { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", layer = "cutout1", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } } multmatrix([[6.12323e-17, -1, 0, 0], [1, 6.12323e-17, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -50], [0, 0, 0, 1]]) { - linear_extrude(file = "example007.dxf", cache = "4d38d4de.3739", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example007.dxf", layer = "cutout2", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 2, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/example008-expected.txt b/tests/regression/dumptest/example008-expected.txt index 7ab00ff..f6d4a4c 100644 --- a/tests/regression/dumptest/example008-expected.txt +++ b/tests/regression/dumptest/example008-expected.txt @@ -1,26 +1,26 @@ difference() { intersection() { multmatrix([[1, 0, 0, -25], [0, 1, 0, -25], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "G", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", layer = "G", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[1, 0, 0, 0], [0, 6.12323e-17, -1, 0], [0, 1, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -25], [0, 1, 0, -125], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "E", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", layer = "E", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } } multmatrix([[6.12323e-17, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -125], [0, 1, 0, -125], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "B", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", layer = "B", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } } } intersection() { multmatrix([[1, 0, 0, -125], [0, 1, 0, -25], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[6.12323e-17, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 6.12323e-17, 0], [0, 0, 0, 1]]) { multmatrix([[1, 0, 0, -125], [0, 1, 0, -25], [0, 0, 1, -25], [0, 0, 0, 1]]) { - linear_extrude(file = "example008.dxf", cache = "4d38d4de.462c", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example008.dxf", layer = "X", origin = [0, 0], scale = 1, height = 50, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/example009-expected.txt b/tests/regression/dumptest/example009-expected.txt index 48afadf..30c8bc3 100644 --- a/tests/regression/dumptest/example009-expected.txt +++ b/tests/regression/dumptest/example009-expected.txt @@ -1,14 +1,14 @@ - linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "body", origin = [0, 0], scale = 1, height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 1, height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) { - linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -12], [0, 0, 0, 1]]) { - linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); } } intersection() { - linear_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "fan_top", origin = [0, 0], scale = 1, height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 1); - rotate_extrude(file = "example009.dxf", cache = "4d38d4de.59bc", layer = "fan_side", origin = [0, -40], scale = 1, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example009.dxf", layer = "fan_top", origin = [0, 0], scale = 1, height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $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 = 1); } diff --git a/tests/regression/dumptest/example012-expected.txt b/tests/regression/dumptest/example012-expected.txt index 0afa0a2..808ed51 100644 --- a/tests/regression/dumptest/example012-expected.txt +++ b/tests/regression/dumptest/example012-expected.txt @@ -2,7 +2,7 @@ sphere($fn = 0, $fa = 12, $fs = 1, r = 20); multmatrix([[1, 0, 0, -2.92], [0, 1, 0, 0.5], [0, 0, 1, 20], [0, 0, 0, 1]]) { multmatrix([[-1, 1.22465e-16, 1.49976e-32, 0], [1.22465e-16, 1, 1.22465e-16, 0], [0, 1.22465e-16, -1, 0], [0, 0, 0, 1]]) { - import(file = "example012.stl", cache = "4d38d4de.456f", layer = "", origin = [0, 0], scale = 1, convexity = 5, $fn = 0, $fa = 12, $fs = 1); + import(file = "example012.stl", layer = "", origin = [0, 0], scale = 1, convexity = 5, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/example013-expected.txt b/tests/regression/dumptest/example013-expected.txt index 66ef60b..b1dcccb 100644 --- a/tests/regression/dumptest/example013-expected.txt +++ b/tests/regression/dumptest/example013-expected.txt @@ -1,10 +1,10 @@ intersection() { - linear_extrude(file = "example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(file = "example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } multmatrix([[1, 0, 0, 0], [0, 2.22045e-16, -1, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(file = "example013.dxf", cache = "4d38d4de.34bc", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); } } diff --git a/tests/regression/dumptest/example015-expected.txt b/tests/regression/dumptest/example015-expected.txt index 76b2c7e..c6d870a 100644 --- a/tests/regression/dumptest/example015-expected.txt +++ b/tests/regression/dumptest/example015-expected.txt @@ -24,6 +24,6 @@ } } } - import(file = "example009.dxf", cache = "4d38d4de.59bc", 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 = 1); } diff --git a/tests/regression/dumptest/example016-expected.txt b/tests/regression/dumptest/example016-expected.txt index 5f809ed..401a9f9 100644 --- a/tests/regression/dumptest/example016-expected.txt +++ b/tests/regression/dumptest/example016-expected.txt @@ -16,7 +16,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } @@ -35,7 +35,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } @@ -54,7 +54,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } @@ -73,7 +73,7 @@ } group() { multmatrix([[1, 0, 0, -14], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "example016.stl", cache = "4d38d4de.1954", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); + import(file = "example016.stl", layer = "", origin = [0, 0], scale = 1, convexity = 12, $fn = 0, $fa = 12, $fs = 1); } } } diff --git a/tests/regression/dumptest/import-expected.txt b/tests/regression/dumptest/import-expected.txt index 6482303..2c66bf4 100644 --- a/tests/regression/dumptest/import-expected.txt +++ b/tests/regression/dumptest/import-expected.txt @@ -1,2 +1,2 @@ - import(file = "", cache = "0.0", 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); diff --git a/tests/regression/dumptest/import_dxf-expected.txt b/tests/regression/dumptest/import_dxf-expected.txt index 6482303..2c66bf4 100644 --- a/tests/regression/dumptest/import_dxf-expected.txt +++ b/tests/regression/dumptest/import_dxf-expected.txt @@ -1,2 +1,2 @@ - import(file = "", cache = "0.0", 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); diff --git a/tests/regression/dumptest/import_dxf-tests-expected.txt b/tests/regression/dumptest/import_dxf-tests-expected.txt index f17daf2..33977d1 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 = "", cache = "0.0", 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); multmatrix([[1, 0, 0, -210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/polygons.dxf", cache = "4d38d4de.308a", 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 = 1); } multmatrix([[1, 0, 0, -210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/polygons.dxf", cache = "4d38d4de.308a", 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 = 1); } multmatrix([[1, 0, 0, -210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/polygons.dxf", cache = "4d38d4de.308a", 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 = 1); } - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/multiple-layers.dxf", cache = "4e823dda.3570", 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 = 1); multmatrix([[1, 0, 0, -200], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/multiple-layers.dxf", cache = "4e823dda.3570", 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 = 1); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/multiple-layers.dxf", cache = "4e823dda.3570", 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 = 1); } multmatrix([[1, 0, 0, 200], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/multiple-layers.dxf", cache = "4e823dda.3570", 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 = 1); } multmatrix([[1, 0, 0, 0], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { - import(file = "/Users/kintel/code/OpenSCAD/openscad/testdata/dxf/multiple-layers.dxf", cache = "4e823dda.3570", 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 = 1); } diff --git a/tests/regression/dumptest/import_off-expected.txt b/tests/regression/dumptest/import_off-expected.txt index 6482303..2c66bf4 100644 --- a/tests/regression/dumptest/import_off-expected.txt +++ b/tests/regression/dumptest/import_off-expected.txt @@ -1,2 +1,2 @@ - import(file = "", cache = "0.0", 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); diff --git a/tests/regression/dumptest/import_stl-expected.txt b/tests/regression/dumptest/import_stl-expected.txt index 6482303..2c66bf4 100644 --- a/tests/regression/dumptest/import_stl-expected.txt +++ b/tests/regression/dumptest/import_stl-expected.txt @@ -1,2 +1,2 @@ - import(file = "", cache = "0.0", 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); diff --git a/tests/regression/dumptest/import_stl-tests-expected.txt b/tests/regression/dumptest/import_stl-tests-expected.txt index 54ef327..8d7bbc4 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", cache = "4e823ddd.2506", 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 = 1); diff --git a/tests/regression/dumptest/null-polygons-expected.txt b/tests/regression/dumptest/null-polygons-expected.txt index 07f9825..d30c909 100644 --- a/tests/regression/dumptest/null-polygons-expected.txt +++ b/tests/regression/dumptest/null-polygons-expected.txt @@ -1,5 +1,5 @@ linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1) { - import(file = "null-polygons.dxf", cache = "4e823ddd.3124", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + import(file = "null-polygons.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); } - linear_extrude(file = "null-polygons.dxf", cache = "4e823ddd.3124", layer = "", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(file = "null-polygons.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1); -- cgit v0.10.1 From 6b21134f15ef7c6cfbd8301ee56511a73bd49def Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 02:41:19 +0100 Subject: Don't dump timestamp of included files, this wasn't really used anywhere diff --git a/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt b/tests/regression/dumptest/rotate_extrude_dxf-tests-expected.txt index a28a490..3abef40 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", cache = "4ead4109.2d8a", 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 = 1); -- cgit v0.10.1 From a6e4b95f1a8f1597625aa34010e84dc90dc644da Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 7 Nov 2011 02:47:34 +0100 Subject: Disabled more tests triggering the float precision compare issue diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2b60a09..9537f5b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -334,6 +334,10 @@ list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/re list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example005.scad) list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example006.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example007.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example008.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example012.scad) +list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example016.scad) list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example020.scad) list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example021.scad) -- cgit v0.10.1