diff options
author | Marius Kintel <marius@kintel.net> | 2013-04-24 06:00:28 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-04-24 06:00:28 (GMT) |
commit | b5922d7551340d53551e48c01aa09af33e94c317 (patch) | |
tree | 862084764cff82870c3aac0b32e7106ec9518970 | |
parent | 6a87dd5cfa0a272f978e1b22ca59f1c8c55505a7 (diff) | |
parent | f0ee85e17d474ab9119f82ee6f802d4634743b12 (diff) |
Merge branch 'master' into issue116
-rw-r--r-- | README.md | 3 | ||||
-rwxr-xr-x | scripts/macosx-build-dependencies.sh | 35 | ||||
-rw-r--r-- | src/CGALEvaluator.cc | 10 | ||||
-rw-r--r-- | src/func.cc | 8 | ||||
-rw-r--r-- | tests/regression/echotest/search-tests-expected.txt | 12 |
5 files changed, 45 insertions, 23 deletions
@@ -108,8 +108,7 @@ This will download the latest sources into a directory named 'openscad'. To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following: cd openscad - git submodule init - git submodule update + git submodule update --init ### Building for Mac OS X diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh index fa8bb05..088d8b4 100755 --- a/scripts/macosx-build-dependencies.sh +++ b/scripts/macosx-build-dependencies.sh @@ -28,7 +28,7 @@ OPTION_32BIT=true OPTION_LLVM=false OPTION_CLANG=false OPTION_GCC=false -DETECTED_LION=false +OPTION_DEPLOY=false export QMAKESPEC=macx-g++ printUsage() @@ -370,12 +370,13 @@ do esac done -OSVERSION=`sw_vers -productVersion | cut -d. -f2` -if [[ $OSVERSION -ge 7 ]]; then - echo "Detected Lion or later" - DETECTED_LION=true +OSX_VERSION=`sw_vers -productVersion | cut -d. -f2` +if (( $OSX_VERSION >= 8 )); then + echo "Detected Mountain Lion (10.8) or later" +elif (( $OSX_VERSION >= 7 )); then + echo "Detected Lion (10.7) or later" else - echo "Detected Snow Leopard or earlier" + echo "Detected Snow Leopard (10.6) or earlier" fi USING_LLVM=false @@ -387,7 +388,7 @@ elif $OPTION_GCC; then USING_GCC=true elif $OPTION_CLANG; then USING_CLANG=true -elif $DETECTED_LION; then +elif (( $OSX_VERSION >= 7 )); then USING_GCC=true fi @@ -411,6 +412,26 @@ elif $USING_CLANG; then export QMAKESPEC=unsupported/macx-clang fi +if (( $OSX_VERSION >= 8 )); then + echo "Setting build target to 10.6 or later" + MAC_OSX_VERSION_MIN=10.6 +else + echo "Setting build target to 10.5 or later" + MAC_OSX_VERSION_MIN=10.5 +fi + +if $OPTION_DEPLOY; then + echo "Building deployment version of libraries" +else + OPTION_32BIT=false +fi + +if $OPTION_32BIT; then + echo "Building combined 32/64-bit binaries" +else + echo "Building 64-bit binaries" +fi + echo "Using basedir:" $BASEDIR mkdir -p $SRCDIR $DEPLOYDIR build_qt 4.8.4 diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 7c483cb..6ad9e4d 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -206,9 +206,11 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node) bb = bounding_box( *N.p3 ); } - Eigen::Matrix<NT,3,1> scale, bbox_size; - scale << 1,1,1; - bbox_size << bb.xmax()-bb.xmin(), bb.ymax()-bb.ymin(), bb.zmax()-bb.zmin(); + std::vector<NT> scale, bbox_size; + for (int i=0;i<3;i++) scale.push_back( NT(1) ); + bbox_size.push_back( bb.xmax()-bb.xmin() ); + bbox_size.push_back( bb.ymax()-bb.ymin() ); + bbox_size.push_back( bb.zmax()-bb.zmin() ); for (int i=0;i<3;i++) { if (node.newsize[i]) { if (bbox_size[i]==NT(0)) { @@ -220,7 +222,7 @@ CGAL_Nef_polyhedron CGALEvaluator::applyResize(const CgaladvNode &node) } } } - NT autoscale = scale.maxCoeff(); + NT autoscale = std::max( scale[0], std::max( scale[1], scale[2] )); for (int i=0;i<3;i++) { if (node.autosize[i]) scale[i] = autoscale; } diff --git a/src/func.cc b/src/func.cc index f2c9835..88bf3c8 100644 --- a/src/func.cc +++ b/src/func.cc @@ -449,7 +449,7 @@ Value builtin_search(const Context *, const EvalContext *evalctx) if (num_returns_per_match > 1 && matchCount >= num_returns_per_match) break; } } - if (matchCount == 0) PRINTB(" search term not found: \"%s\"", findThis.toString()[i]); + if (matchCount == 0) PRINTB(" WARNING: search term not found: \"%s\"", findThis.toString()[i]); if (num_returns_per_match == 0 || num_returns_per_match > 1) { returnvec.push_back(Value(resultvec)); } @@ -478,10 +478,10 @@ Value builtin_search(const Context *, const EvalContext *evalctx) } if (num_returns_per_match == 1 && matchCount == 0) { if (findThis.toVector()[i].type() == Value::NUMBER) { - PRINTB(" search term not found: %s",findThis.toVector()[i].toDouble()); + PRINTB(" WARNING: search term not found: %s",findThis.toVector()[i].toDouble()); } else if (findThis.toVector()[i].type() == Value::STRING) { - PRINTB(" search term not found: \"%s\"",findThis.toVector()[i].toString()); + PRINTB(" WARNING: search term not found: \"%s\"",findThis.toVector()[i].toString()); } returnvec.push_back(Value(resultvec)); } @@ -490,7 +490,7 @@ Value builtin_search(const Context *, const EvalContext *evalctx) } } } else { - PRINTB(" search: none performed on input %s", findThis); + PRINTB(" WARNING: search: none performed on input %s", findThis); return Value(); } return Value(returnvec); diff --git a/tests/regression/echotest/search-tests-expected.txt b/tests/regression/echotest/search-tests-expected.txt index 64df0b6..0269f43 100644 --- a/tests/regression/echotest/search-tests-expected.txt +++ b/tests/regression/echotest/search-tests-expected.txt @@ -1,9 +1,9 @@ - search term not found: "q" - search term not found: 1000 - search term not found: "zzz" - search term not found: "zzz" - search term not found: 500 - search term not found: "" + WARNING: search term not found: "q" + WARNING: search term not found: 1000 + WARNING: search term not found: "zzz" + WARNING: search term not found: "zzz" + WARNING: search term not found: 500 + WARNING: search term not found: "" ECHO: "Characters in string (\"a\"): [0]" ECHO: "Characters in string (\"adeq\"): [[0, 5], [3, 8], [4], []]" ECHO: "Default string search (\"abe\"): [0, 1, 8]" |