diff options
author | bubnikv <bubnikv@gmail.com> | 2018-03-14 18:15:26 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2018-03-14 18:15:26 +0300 |
commit | ab654f6319d28cd878d42f3e7a86bc140acc0642 (patch) | |
tree | a8c86675163fe0aa5f4664fc5c7664aa31b38d34 /xs/src/libslic3r/Model.hpp | |
parent | de2d08f626fd3d722c0f66250f912793d20e37e8 (diff) | |
parent | b43a21d1be20963c5afb8c6df8f4618c62c8d0e4 (diff) |
Merge branch 'scene_manipulators'
Diffstat (limited to 'xs/src/libslic3r/Model.hpp')
-rw-r--r-- | xs/src/libslic3r/Model.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index d3faf38ef..bf7f60e36 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -102,8 +102,12 @@ public: // Returns the bounding box of the transformed instances. // This bounding box is approximate and not snug. - BoundingBoxf3 bounding_box(); + // This bounding box is being cached. + const BoundingBoxf3& bounding_box(); void invalidate_bounding_box() { m_bounding_box_valid = false; } + // Returns a snug bounding box of the transformed instances. + // This bounding box is not being cached. + BoundingBoxf3 tight_bounding_box(bool include_modifiers) const; // A mesh containing all transformed instances of this object. TriangleMesh mesh() const; @@ -260,7 +264,10 @@ public: void delete_material(t_model_material_id material_id); void clear_materials(); bool add_default_instances(); - BoundingBoxf3 bounding_box(); + // Returns approximate axis aligned bounding box of this model + BoundingBoxf3 bounding_box() const; + // Returns tight axis aligned bounding box of this model + BoundingBoxf3 transformed_bounding_box() const; void center_instances_around_point(const Pointf &point); void translate(coordf_t x, coordf_t y, coordf_t z) { for (ModelObject *o : this->objects) o->translate(x, y, z); } TriangleMesh mesh() const; @@ -276,6 +283,10 @@ public: // Ensures that the min z of the model is not negative void adjust_min_z(); + // Returs true if this model is contained into the print volume defined inside the given config + bool fits_print_volume(const DynamicPrintConfig* config) const; + bool fits_print_volume(const FullPrintConfig &config) const; + void print_info() const { for (const ModelObject *o : this->objects) o->print_info(); } }; |