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:
authorbubnikv <bubnikv@gmail.com>2016-11-24 15:44:51 +0300
committerbubnikv <bubnikv@gmail.com>2016-11-24 15:44:51 +0300
commit0d20a81354ee8ae6a73643519d718beeaeda72f4 (patch)
tree9b64ffb60287be176031b3ec32850f63a024a981 /xs/src/libslic3r/SupportMaterial.cpp
parente67e37c77269681d24a622aca4b4ef18f0103206 (diff)
Log support through boost::log
Diffstat (limited to 'xs/src/libslic3r/SupportMaterial.cpp')
-rw-r--r--xs/src/libslic3r/SupportMaterial.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp
index 02b2610e0..d9fe8084c 100644
--- a/xs/src/libslic3r/SupportMaterial.cpp
+++ b/xs/src/libslic3r/SupportMaterial.cpp
@@ -9,6 +9,7 @@
#include <cmath>
#include <cassert>
#include <memory>
+#include <boost/log/trivial.hpp>
// #define SLIC3R_DEBUG
@@ -197,6 +198,8 @@ struct MyLayersPtrCompare
void PrintObjectSupportMaterial::generate(PrintObject &object)
{
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Start";
+
coordf_t max_object_layer_height = 0.;
for (size_t i = 0; i < object.layer_count(); ++ i)
max_object_layer_height = std::max(max_object_layer_height, object.get_layer(i)->height);
@@ -210,6 +213,8 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
// The layers will be referenced by various LayersPtr (of type std::vector<Layer*>)
MyLayerStorage layer_storage;
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating top contacts";
+
// Determine the top contact surfaces of the support, defined as:
// contact = overhangs - clearance + margin
// This method is responsible for identifying what contact surfaces
@@ -232,6 +237,8 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
}
#endif /* SLIC3R_DEBUG */
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating bottom contacts";
+
// Determine the bottom contact surfaces of the supports over the top surfaces of the object.
// Depending on whether the support is soluble or not, the contact layer thickness is decided.
MyLayersPtr bottom_contacts = this->bottom_contact_layers(object, top_contacts, layer_storage);
@@ -245,11 +252,15 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
}
#endif /* SLIC3R_DEBUG */
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Trimming top contacts by bottom contacts";
+
// Because the top and bottom contacts are thick slabs, they may overlap causing over extrusion
// and unwanted strong bonds to the object.
// Rather trim the top contacts by their overlapping bottom contacts to leave a gap instead of over extruding.
this->trim_top_contacts_by_bottom_contacts(object, bottom_contacts, top_contacts);
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating intermediate layers - indices";
+
// Generate empty intermediate layers between the top / bottom support contact layers,
// The layers may or may not be synchronized with the object layers, depending on the configuration.
// For example, a single nozzle multi material printing will need to generate a waste tower, which in turn
@@ -257,6 +268,8 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
MyLayersPtr intermediate_layers = this->raft_and_intermediate_support_layers(
object, bottom_contacts, top_contacts, layer_storage, max_object_layer_height);
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating base layers";
+
// Fill in intermediate layers between the top / bottom support contact layers, trimmed by the object.
this->generate_base_layers(object, bottom_contacts, top_contacts, intermediate_layers);
@@ -269,6 +282,8 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
}
#endif /* SLIC3R_DEBUG */
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating raft";
+
// If raft is to be generated, the 1st top_contact layer will contain the 1st object layer silhouette without holes.
// Add the bottom contacts to the raft, inflate the support bases.
// There is a contact layer below the 1st object layer in the bottom contacts.
@@ -284,6 +299,8 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
shape = this->generate_pillars_shape(contact, support_z);
*/
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating interfaces";
+
// Propagate top / bottom contact layers to generate interface layers.
MyLayersPtr interface_layers = this->generate_interface_layers(
object, bottom_contacts, top_contacts, intermediate_layers, layer_storage);
@@ -305,6 +322,8 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
}
*/
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Creating layers";
+
// Install support layers into the object.
MyLayersPtr layers_sorted;
layers_sorted.reserve(bottom_contacts.size() + top_contacts.size() + intermediate_layers.size() + interface_layers.size());
@@ -332,8 +351,12 @@ void PrintObjectSupportMaterial::generate(PrintObject &object)
++ layer_id;
}
+ BOOST_LOG_TRIVIAL(info) << "Support generator - Generating tool paths";
+
// Generate the actual toolpaths and save them into each layer.
this->generate_toolpaths(object, raft, bottom_contacts, top_contacts, intermediate_layers, interface_layers);
+
+ BOOST_LOG_TRIVIAL(info) << "Support generator - End";
}
void collect_region_slices_by_type(const Layer &layer, SurfaceType surface_type, Polygons &out)