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>2017-05-23 18:09:43 +0300
committerbubnikv <bubnikv@gmail.com>2017-05-23 18:09:43 +0300
commit2713aa1772db9662a2d11828d1281b4fac919395 (patch)
tree3636fa325b5f338b1fb1a5c2f8c6f24a2db34668 /xs/src/libslic3r/GCode.hpp
parentca590cb559fd7f5d1f7dc4fe2db053ac9a131d6c (diff)
When generating a g-code for a layer, collect layers of multiple objects
with not exactly the same print_z, but support a slight deviation.
Diffstat (limited to 'xs/src/libslic3r/GCode.hpp')
-rw-r--r--xs/src/libslic3r/GCode.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/xs/src/libslic3r/GCode.hpp b/xs/src/libslic3r/GCode.hpp
index 91762237c..1fca849e2 100644
--- a/xs/src/libslic3r/GCode.hpp
+++ b/xs/src/libslic3r/GCode.hpp
@@ -140,8 +140,10 @@ protected:
const SupportLayer *support_layer;
const Layer* layer() const { return (object_layer != nullptr) ? object_layer : support_layer; }
const PrintObject* object() const { return (this->layer() != nullptr) ? this->layer()->object() : nullptr; }
- coordf_t print_z() const { return this->layer()->print_z; }
+ coordf_t print_z() const { return (object_layer != nullptr && support_layer != nullptr) ? 0.5 * (object_layer->print_z + support_layer->print_z) : this->layer()->print_z; }
};
+ static std::vector<GCode::LayerToPrint> collect_layers_to_print(const PrintObject &object);
+ static std::vector<std::pair<coordf_t, std::vector<LayerToPrint>>> collect_layers_to_print(const Print &print);
void process_layer(
// Write into the output file.
FILE *file,