From 461eaa13aa4668cefa67f0a00b312ee85b534047 Mon Sep 17 00:00:00 2001 From: "lane.wei" Date: Wed, 27 Jul 2022 19:45:05 +0800 Subject: [PATCH] FIX: fix some rendering issues 1. increase the logo's resolution 2. set the logo's height to 0.02 3. fix a clip issue when shell preview Change-Id: Ibd2491c2d4cc38ab10a2627f0024712d0a6a09b2 --- src/slic3r/GUI/GCodeViewer.cpp | 1 - src/slic3r/GUI/PartPlate.cpp | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 3a2ec4531..5b739dd3d 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -1070,7 +1070,6 @@ void GCodeViewer::reset() } m_paths_bounding_box = BoundingBoxf3(); m_max_bounding_box = BoundingBoxf3(); - m_shell_bounding_box = BoundingBoxf3(); m_max_print_height = 0.0f; m_tools.m_tool_colors = std::vector(); m_tools.m_tool_visibles = std::vector(); diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index f90b07ca4..9a63a5cfe 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -385,7 +385,8 @@ void PartPlate::render_logo(bool bottom) const // starts generating the main texture, compression will run asynchronously GLint max_tex_size = OpenGLManager::get_gl_info().get_max_tex_size(); - if (!m_partplate_list->m_logo_texture.load_from_svg_file(m_partplate_list->m_logo_texture_filename, true, true, true, max_tex_size/8)) { + GLint logo_tex_size = (max_tex_size < 2048)?max_tex_size: 2048; + if (!m_partplate_list->m_logo_texture.load_from_svg_file(m_partplate_list->m_logo_texture_filename, true, true, true, logo_tex_size)) { BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": load logo texture from %1% failed!")%m_partplate_list->m_logo_texture_filename; return; } @@ -1838,7 +1839,7 @@ bool PartPlate::set_shape(const Pointfs& shape, const Pointfs& exclude_areas, Ve ExPolygon logo_poly; generate_logo_polygon(logo_poly); - if (!m_logo_triangles.set_from_triangles(triangulate_expolygon_2f(logo_poly, NORMALS_UP), GROUND_Z+0.28f)) + if (!m_logo_triangles.set_from_triangles(triangulate_expolygon_2f(logo_poly, NORMALS_UP), GROUND_Z+0.02f)) BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ":Unable to create plate triangles\n"; ExPolygon poly;