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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2018-05-25 17:11:55 +0300
committerLukas Matena <lukasmatena@seznam.cz>2018-05-25 17:11:55 +0300
commitbfe4350a89bea904c39e640b8779542a0a9642d1 (patch)
tree4e9f1375e0883e9e0bf5bc778d01a53ef8307dbd /xs/src/libslic3r/GCode.cpp
parent132a67edb21ca0bb5deb77e32de4af0cf92da3a0 (diff)
Calculation of wipe tower reduction corrected, new config option (wipe into infill)
Diffstat (limited to 'xs/src/libslic3r/GCode.cpp')
-rw-r--r--xs/src/libslic3r/GCode.cpp41
1 files changed, 23 insertions, 18 deletions
diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp
index 3536c0c9c..0ccc4384e 100644
--- a/xs/src/libslic3r/GCode.cpp
+++ b/xs/src/libslic3r/GCode.cpp
@@ -1338,26 +1338,31 @@ void GCode::process_layer(
m_avoid_crossing_perimeters.disable_once = true;
}
- for (const auto& layer_to_print : layers) { // iterate through all objects
- if (layer_to_print.object_layer == nullptr)
- continue;
- std::vector<ObjectByExtruder::Island::Region> overridden;
- for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) {
- ObjectByExtruder::Island::Region new_region;
- overridden.push_back(new_region);
- for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) {
- auto *fill = dynamic_cast<ExtrusionEntityCollection*>(ee);
- if (fill->get_extruder_override() == extruder_id) {
- overridden.back().infills.append(*fill);
- fill->set_extruder_override(-1);
- }
- }
- m_config.apply((layer_to_print.object_layer)->object()->config, true);
- Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front();
- this->set_origin(unscale(copy.x), unscale(copy.y));
- gcode += this->extrude_infill(print, overridden);
+ gcode += "; INFILL WIPING STARTS\n";
+
+ if (extruder_id != layer_tools.extruders.front()) { // if this is the first extruder on this layer, there was no toolchange
+ for (const auto& layer_to_print : layers) { // iterate through all objects
+ if (layer_to_print.object_layer == nullptr)
+ continue;
+ std::vector<ObjectByExtruder::Island::Region> overridden;
+ for (size_t region_id = 0; region_id < print.regions.size(); ++ region_id) {
+ ObjectByExtruder::Island::Region new_region;
+ overridden.push_back(new_region);
+ for (ExtrusionEntity *ee : (*layer_to_print.object_layer).regions[region_id]->fills.entities) {
+ auto *fill = dynamic_cast<ExtrusionEntityCollection*>(ee);
+ if (fill->get_extruder_override() == extruder_id) {
+ overridden.back().infills.append(*fill);
+ fill->set_extruder_override(-1);
+ }
+ }
+ m_config.apply((layer_to_print.object_layer)->object()->config, true);
+ Point copy = (layer_to_print.object_layer)->object()->_shifted_copies.front();
+ this->set_origin(unscale(copy.x), unscale(copy.y));
+ gcode += this->extrude_infill(print, overridden);
+ }
}
}
+ gcode += "; WIPING FINISHED\n";
auto objects_by_extruder_it = by_extruder.find(extruder_id);