mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Merge some BS1.7 changes:
Boolean operation feature
This commit is contained in:
parent
9e73dfeb5d
commit
da05ae02da
73 changed files with 2496 additions and 481 deletions
|
@ -46,9 +46,10 @@ bool SlicingProcessCompletedEvent::critical_error() const
|
|||
} catch (const Slic3r::SlicingError &) {
|
||||
// Exception derived from SlicingError is non-critical.
|
||||
return false;
|
||||
} catch (...) {
|
||||
}
|
||||
return true;
|
||||
} catch (const Slic3r::SlicingErrors &) {
|
||||
return false;
|
||||
} catch (...) {}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SlicingProcessCompletedEvent::invalidate_plater() const
|
||||
|
@ -69,7 +70,7 @@ bool SlicingProcessCompletedEvent::invalidate_plater() const
|
|||
return false;
|
||||
}
|
||||
|
||||
std::pair<std::string, size_t> SlicingProcessCompletedEvent::format_error_message() const
|
||||
std::pair<std::string, std::vector<size_t>> SlicingProcessCompletedEvent::format_error_message() const
|
||||
{
|
||||
std::string error;
|
||||
size_t monospace = 0;
|
||||
|
@ -88,12 +89,20 @@ std::pair<std::string, size_t> SlicingProcessCompletedEvent::format_error_messag
|
|||
} catch (SlicingError &ex) {
|
||||
error = ex.what();
|
||||
monospace = ex.objectId();
|
||||
} catch (SlicingErrors &exs) {
|
||||
std::vector<size_t> ids;
|
||||
for (auto &ex : exs.errors_) {
|
||||
error = ex.what();
|
||||
monospace = ex.objectId();
|
||||
ids.push_back(monospace);
|
||||
}
|
||||
return std::make_pair(std::move(error), ids);
|
||||
} catch (std::exception &ex) {
|
||||
error = ex.what();
|
||||
} catch (...) {
|
||||
error = "Unknown C++ exception.";
|
||||
}
|
||||
return std::make_pair(std::move(error), monospace);
|
||||
error = ex.what();
|
||||
} catch (...) {
|
||||
error = "Unknown C++ exception.";
|
||||
}
|
||||
return std::make_pair(std::move(error), std::vector<size_t>{monospace});
|
||||
}
|
||||
|
||||
BackgroundSlicingProcess::BackgroundSlicingProcess()
|
||||
|
@ -308,6 +317,8 @@ void BackgroundSlicingProcess::thread_proc()
|
|||
break;
|
||||
// Process the background slicing task.
|
||||
m_state = STATE_RUNNING;
|
||||
//BBS: internal cancel
|
||||
m_internal_cancelled = false;
|
||||
lck.unlock();
|
||||
std::exception_ptr exception;
|
||||
#ifdef _WIN32
|
||||
|
@ -328,6 +339,10 @@ void BackgroundSlicingProcess::thread_proc()
|
|||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": send SlicingProcessCompletedEvent to main, status %1%")%evt.status();
|
||||
wxQueueEvent(GUI::wxGetApp().mainframe->m_plater, evt.Clone());
|
||||
}
|
||||
else {
|
||||
//BBS: internal cancel
|
||||
m_internal_cancelled = true;
|
||||
}
|
||||
m_print->restart();
|
||||
lck.unlock();
|
||||
// Let the UI thread wake up if it is waiting for the background task to finish.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue