From 4b312ae170eb8cf14dfb6674958a7a5558311a54 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Wed, 21 Jul 2021 12:28:03 +0200 Subject: [PATCH] ENABLE_ALLOW_NEGATIVE_Z -> Fixed build when the tech is disabled --- src/slic3r/GUI/GalleryDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp index 50c828b0f..539bcddbf 100644 --- a/src/slic3r/GUI/GalleryDialog.cpp +++ b/src/slic3r/GUI/GalleryDialog.cpp @@ -255,7 +255,11 @@ static void generate_thumbnail_from_stl(const std::string& filename) assert(model.objects[0]->instances.size() == 1); model.objects[0]->center_around_origin(false); +#if ENABLE_ALLOW_NEGATIVE_Z model.objects[0]->ensure_on_bed(false); +#else + model.objects[0]->ensure_on_bed(); +#endif // ENABLE_ALLOW_NEGATIVE_Z const Vec3d bed_center_3d = wxGetApp().plater()->get_bed().get_bounding_box(false).center(); const Vec2d bed_center_2d = { bed_center_3d.x(), bed_center_3d.y()};