diff --git a/src/slic3r/GUI/3DBed.cpp b/src/slic3r/GUI/3DBed.cpp index a8d7dbdf25..bd5ca9f521 100644 --- a/src/slic3r/GUI/3DBed.cpp +++ b/src/slic3r/GUI/3DBed.cpp @@ -174,7 +174,7 @@ bool Bed3D::set_shape(const Pointfs& bed_shape, const double max_print_height, c } - if (m_build_volume.bed_shape() == bed_shape && m_type == type && m_texture_filename == texture_filename && m_model_filename == model_filename) + if (m_build_volume.bed_shape() == bed_shape && m_build_volume.max_print_height() == max_print_height && m_type == type && m_texture_filename == texture_filename && m_model_filename == model_filename) // No change, no need to update the UI. return false; diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 1c7fc4a61e..24dd159a37 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3751,7 +3751,8 @@ Linef3 GLCanvas3D::mouse_ray(const Point& mouse_pos) double GLCanvas3D::get_size_proportional_to_max_bed_size(double factor) const { - return factor * m_bed.build_volume().bounding_volume().max_size(); + const BoundingBoxf& bbox = m_bed.build_volume().bounding_volume2d(); + return factor * std::max(bbox.size()[0], bbox.size()[1]); } void GLCanvas3D::set_cursor(ECursorType type) @@ -5119,10 +5120,12 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type) break; } default: + case BuildVolume::Type::Convex: case BuildVolume::Type::Custom: { m_volumes.set_print_volume({ static_cast(type), - { 0.0f, 0.0f, 0.0f, 0.0f }, - { 0.0f, 0.0f } }); + { -FLT_MAX, -FLT_MAX, FLT_MAX, FLT_MAX }, + { -FLT_MAX, FLT_MAX } } + ); } } if (m_requires_check_outside_state) { diff --git a/src/slic3r/GUI/Mouse3DController.cpp b/src/slic3r/GUI/Mouse3DController.cpp index 3ff0fdea32..e5ad5d64f4 100644 --- a/src/slic3r/GUI/Mouse3DController.cpp +++ b/src/slic3r/GUI/Mouse3DController.cpp @@ -468,9 +468,9 @@ void Mouse3DController::render_settings_dialog(GLCanvas3D& canvas) const ImGui::Separator(); imgui.text_colored(color, _L("Speed:")); - float translation_scale = (float)params_copy.translation.scale / Params::DefaultTranslationScale; - if (imgui.slider_float(_L("Translation"), &translation_scale, Params::MinTranslationScale, Params::MaxTranslationScale, "%.1f")) { - params_copy.translation.scale = Params::DefaultTranslationScale * (double)translation_scale; + float translation_scale = float(params_copy.translation.scale) / float(Params::DefaultTranslationScale); + if (imgui.slider_float(_L("Translation"), &translation_scale, float(Params::MinTranslationScale), float(Params::MaxTranslationScale), "%.1f")) { + params_copy.translation.scale = Params::DefaultTranslationScale * double(translation_scale); params_changed = true; } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 6075cdc04c..4e60f09e2b 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -6299,8 +6299,10 @@ void Plater::on_config_change(const DynamicPrintConfig &config) update_scheduled = true; p->sidebar->obj_list()->update_extruder_colors(); } - else if(opt_key == "max_print_height") + else if (opt_key == "max_print_height") { + bed_shape_changed = true; update_scheduled = true; + } else if (opt_key == "printer_model") { p->reset_gcode_toolpaths(); // update to force bed selection(for texturing)