mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 21:28:59 +08:00
Fix ignoring of changed sla printer params
This commit is contained in:
parent
7f153a55b3
commit
00764ceade
@ -244,11 +244,11 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model, DynamicPrintConfig con
|
|||||||
// Handle changes to object config defaults
|
// Handle changes to object config defaults
|
||||||
m_default_object_config.apply_only(config, object_diff, true);
|
m_default_object_config.apply_only(config, object_diff, true);
|
||||||
|
|
||||||
if (!m_printer || std::find(printer_diff.begin(), printer_diff.end(), "sla_archive_format") != printer_diff.end()) {
|
if (!m_archiver || !printer_diff.empty()) {
|
||||||
if (m_printer_config.sla_archive_format.value == "SL1")
|
if (m_printer_config.sla_archive_format.value == "SL1")
|
||||||
m_printer = std::make_unique<SL1Archive>(m_printer_config);
|
m_archiver = std::make_unique<SL1Archive>(m_printer_config);
|
||||||
else if (m_printer_config.sla_archive_format.value == "SL2")
|
else if (m_printer_config.sla_archive_format.value == "SL2")
|
||||||
m_printer = std::make_unique<SL1_SVGArchive>(m_printer_config);
|
m_archiver = std::make_unique<SL1_SVGArchive>(m_printer_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ModelObjectStatus {
|
struct ModelObjectStatus {
|
||||||
|
@ -536,7 +536,7 @@ public:
|
|||||||
|
|
||||||
void export_print(Zipper &zipper, const std::string &projectname = "")
|
void export_print(Zipper &zipper, const std::string &projectname = "")
|
||||||
{
|
{
|
||||||
m_printer->export_print(zipper, *this, projectname);
|
m_archiver->export_print(zipper, *this, projectname);
|
||||||
}
|
}
|
||||||
|
|
||||||
void export_print(const std::string &fname, const std::string &projectname = "")
|
void export_print(const std::string &fname, const std::string &projectname = "")
|
||||||
@ -565,7 +565,7 @@ private:
|
|||||||
std::vector<PrintLayer> m_printer_input;
|
std::vector<PrintLayer> m_printer_input;
|
||||||
|
|
||||||
// The archive object which collects the raster images after slicing
|
// The archive object which collects the raster images after slicing
|
||||||
std::unique_ptr<SLAArchive> m_printer;
|
std::unique_ptr<SLAArchive> m_archiver;
|
||||||
|
|
||||||
// Estimated print time, material consumed.
|
// Estimated print time, material consumed.
|
||||||
SLAPrintStatistics m_print_statistics;
|
SLAPrintStatistics m_print_statistics;
|
||||||
|
@ -1044,7 +1044,7 @@ void SLAPrint::Steps::merge_slices_and_eval_stats() {
|
|||||||
// Rasterizing the model objects, and their supports
|
// Rasterizing the model objects, and their supports
|
||||||
void SLAPrint::Steps::rasterize()
|
void SLAPrint::Steps::rasterize()
|
||||||
{
|
{
|
||||||
if(canceled() || !m_print->m_printer) return;
|
if(canceled() || !m_print->m_archiver) return;
|
||||||
|
|
||||||
// coefficient to map the rasterization state (0-99) to the allocated
|
// coefficient to map the rasterization state (0-99) to the allocated
|
||||||
// portion (slot) of the process state
|
// portion (slot) of the process state
|
||||||
@ -1089,7 +1089,7 @@ void SLAPrint::Steps::rasterize()
|
|||||||
if(canceled()) return;
|
if(canceled()) return;
|
||||||
|
|
||||||
// Print all the layers in parallel
|
// Print all the layers in parallel
|
||||||
m_print->m_printer->draw_layers(m_print->m_printer_input.size(), lvlfn,
|
m_print->m_archiver->draw_layers(m_print->m_printer_input.size(), lvlfn,
|
||||||
[this]() { return canceled(); }, ex_tbb);
|
[this]() { return canceled(); }, ex_tbb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user