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:
authorEnrico Turri <enricoturri@seznam.cz>2018-07-18 10:37:25 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-07-18 10:37:25 +0300
commitd672a69554097aa445c710e5bfe84f4dbfa4a246 (patch)
tree90e792ef1f866b04d919dc9ea6e3852867cda17d /xs/src/libslic3r/Model.hpp
parenteb95e29be6dac00c8ed371fffeb80c5105e9db0e (diff)
Slice only objects contained into the print volume
Diffstat (limited to 'xs/src/libslic3r/Model.hpp')
-rw-r--r--xs/src/libslic3r/Model.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp
index 5003f8330..08ba8487d 100644
--- a/xs/src/libslic3r/Model.hpp
+++ b/xs/src/libslic3r/Model.hpp
@@ -131,6 +131,7 @@ public:
bool needed_repair() const;
void cut(coordf_t z, Model* model) const;
void split(ModelObjectPtrs* new_objects);
+ void check_instances_printability(const BoundingBoxf3& print_volume);
// Print object statistics to console.
void print_info() const;
@@ -203,6 +204,9 @@ public:
double scaling_factor;
Pointf offset; // in unscaled coordinates
+ // whether or not this instance is contained in the print volume (set by Print::validate() using ModelObject::check_instances_printability())
+ bool is_printable;
+
ModelObject* get_object() const { return this->object; }
// To be called on an external mesh
@@ -218,9 +222,9 @@ private:
// Parent object, owning this instance.
ModelObject* object;
- ModelInstance(ModelObject *object) : rotation(0), scaling_factor(1), object(object) {}
+ ModelInstance(ModelObject *object) : rotation(0), scaling_factor(1), object(object), is_printable(false) {}
ModelInstance(ModelObject *object, const ModelInstance &other) :
- rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object) {}
+ rotation(other.rotation), scaling_factor(other.scaling_factor), offset(other.offset), object(object), is_printable(false) {}
};