mirror of https://github.com/vitalif/openscad
Merge branch 'master' into issue116
commit
b5922d7551
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]"
|
||||
|
|
Loading…
Reference in New Issue