Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/libslic3r/Print.cpp')
-rw-r--r--xs/src/libslic3r/Print.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp
index 651513c62..03034cfdc 100644
--- a/xs/src/libslic3r/Print.cpp
+++ b/xs/src/libslic3r/Print.cpp
@@ -1331,8 +1331,15 @@ std::string Print::output_filepath(const std::string &path) const
return path;
}
-void Print::print_to_png(const std::string &dirpath)
+void Print::export_png(const std::string &dirpath)
{
+ size_t idx = 0;
+ for (PrintObject *obj : m_objects) {
+ obj->slice();
+ this->set_status(int(floor(idx * 100. / m_objects.size() + 0.5)), "Slicing...");
+ ++ idx;
+ }
+ this->set_status(90, "Exporting zipped archive...");
print_to<FilePrinterFormat::PNG>(*this,
dirpath,
float(m_config.bed_size_x.value),
@@ -1341,6 +1348,7 @@ void Print::print_to_png(const std::string &dirpath)
int(m_config.pixel_height.value),
float(m_config.exp_time.value),
float(m_config.exp_time_first.value));
+ this->set_status(100, "Done.");
}
// Returns extruder this eec should be printed with, according to PrintRegion config