From 8f4a6b3b7c90f618d99e294e3567156263cf9936 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Fri, 10 Sep 2021 09:06:09 +0200 Subject: [PATCH] Fixed color of objects in preview for SLA printers --- src/slic3r/GUI/GLCanvas3D.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 37493e754c..d790e937c7 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2118,12 +2118,14 @@ void GLCanvas3D::refresh_gcode_preview_render_paths() void GLCanvas3D::load_sla_preview() { - const SLAPrint* print = this->sla_print(); + const SLAPrint* print = sla_print(); if (m_canvas != nullptr && print != nullptr) { _set_current(); // Release OpenGL data before generating new data. reset_volumes(); _load_sla_shells(); + const BoundingBoxf3& bed_bb = wxGetApp().plater()->get_bed().get_bounding_box(false); + m_volumes.set_print_box(float(bed_bb.min.x()) - BedEpsilon, float(bed_bb.min.y()) - BedEpsilon, 0.0f, float(bed_bb.max.x()) + BedEpsilon, float(bed_bb.max.y()) + BedEpsilon, (float)m_config->opt_float("max_print_height")); _update_sla_shells_outside_state(); _set_warning_notification_if_needed(EWarning::SlaSupportsOutside); }