diff options
author | Brody <brody@ieee.org> | 2013-12-11 05:46:04 (GMT) |
---|---|---|
committer | Brody <brody@ieee.org> | 2013-12-11 05:46:04 (GMT) |
commit | ef92a395a8498230921fe3d5edb694c2388fdbb9 (patch) | |
tree | 1d51892f9cf9b61fdf01eac2f8e95a6e32c54a1d /src | |
parent | d7d5bea7363703c76b9787598304bfc838e893ee (diff) | |
parent | 50fb5bb135f62ed56230d8b8afd691284616b4f6 (diff) |
Merge pull request #1 from openscad/brodykenrick-master
Brodykenrick master
Diffstat (limited to 'src')
-rw-r--r-- | src/CocoaUtils.mm | 4 | ||||
-rw-r--r-- | src/PolySetCGALEvaluator.cc | 9 | ||||
-rw-r--r-- | src/modcontext.cc | 2 | ||||
-rw-r--r-- | src/openscad.cc | 7 | ||||
-rw-r--r-- | src/stl-utils.cc | 2 |
5 files changed, 19 insertions, 5 deletions
diff --git a/src/CocoaUtils.mm b/src/CocoaUtils.mm index 92640fd..9856b3d 100644 --- a/src/CocoaUtils.mm +++ b/src/CocoaUtils.mm @@ -8,7 +8,7 @@ void CocoaUtils::endApplication() object:nil]; } -void CocoaUtils::nslog(const std::string &str, void *userdata) +void CocoaUtils::nslog(const std::string &str, void * /* userdata */) { - NSLog([NSString stringWithUTF8String: str.c_str()]); + NSLog(@"%s", str.c_str()); } diff --git a/src/PolySetCGALEvaluator.cc b/src/PolySetCGALEvaluator.cc index bc9206f..599fd7f 100644 --- a/src/PolySetCGALEvaluator.cc +++ b/src/PolySetCGALEvaluator.cc @@ -457,7 +457,14 @@ PolySet *PolySetCGALEvaluator::rotateDxfData(const RotateExtrudeNode &node, DxfD { double max_x = 0; for (size_t j = 0; j < dxf.paths[i].indices.size(); j++) { - max_x = fmax(max_x, dxf.points[dxf.paths[i].indices[j]][0]); + double point_x = dxf.points[dxf.paths[i].indices[j]][0]; + if (point_x < 0) { + PRINT("ERROR: all points for rotate_extrude() must have non-negative X coordinates"); + PRINTB("[Point %d on path %d has X coordinate %f]", j % i % point_x); + delete ps; + return NULL; + } + max_x = fmax(max_x, point_x); } int fragments = get_fragments_from_r(max_x, node.fn, node.fs, node.fa); diff --git a/src/modcontext.cc b/src/modcontext.cc index 5b48009..7941cf5 100644 --- a/src/modcontext.cc +++ b/src/modcontext.cc @@ -162,7 +162,7 @@ void ModuleContext::dump(const AbstractModule *mod, const ModuleInstantiation *i #endif FileContext::FileContext(const class FileModule &module, const Context *parent) - : usedlibs(module.usedlibs), ModuleContext(parent) + : ModuleContext(parent), usedlibs(module.usedlibs) { if (!module.modulePath().empty()) this->document_path = module.modulePath(); } diff --git a/src/openscad.cc b/src/openscad.cc index ece6818..ab84235 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -474,6 +474,13 @@ bool QtUseGUI() int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, char ** argv) { +#ifdef Q_OS_MACX + if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_8) { + // fix Mac OS X 10.9 (mavericks) font issue + // https://bugreports.qt-project.org/browse/QTBUG-32789 + QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande"); + } +#endif QApplication app(argc, argv, true); //useGUI); #ifdef Q_WS_MAC app.installEventFilter(new EventFilter(&app)); diff --git a/src/stl-utils.cc b/src/stl-utils.cc index 790fd17..027339c 100644 --- a/src/stl-utils.cc +++ b/src/stl-utils.cc @@ -1,4 +1,4 @@ -#if defined(__APPLE__) && defined(__GNUC__) +#if defined(__APPLE__) && defined(__GNUC__) && !defined(__clang__) #include <iostream> |