1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-19 09:24:27 +00:00

Extended Print::validate() to check, whether the objects

are inside the print volume.
This commit is contained in:
bubnikv
2018-03-14 16:11:57 +01:00
parent 523b297738
commit b43a21d1be
4 changed files with 73 additions and 71 deletions
+7
View File
@@ -508,6 +508,13 @@ bool Print::has_skirt() const
std::string Print::validate() const
{
BoundingBox bed_box_2D = get_extents(Polygon::new_scale(config.bed_shape.values));
BoundingBoxf3 print_volume(Pointf3(unscale(bed_box_2D.min.x), unscale(bed_box_2D.min.y), 0.0), Pointf3(unscale(bed_box_2D.max.x), unscale(bed_box_2D.max.y), config.max_print_height));
for (PrintObject *po : this->objects) {
if (! print_volume.contains(po->model_object()->tight_bounding_box(false)))
return "Some objects are outside of the print volume.";
}
if (this->config.complete_objects) {
// Check horizontal clearance.
{