From db282b7515a7324ecb6a801b0806c76cdce377cd Mon Sep 17 00:00:00 2001 From: "qing.zhang" Date: Thu, 20 Apr 2023 16:16:29 +0800 Subject: [PATCH] FIX: STUDIO-2383 slicing error while using compensation set resolution value to 0 could avoid shape error 1. elephant compensation 2. xy-hole-compensation 3. xy-contour-compensation Signed-off-by: qing.zhang Change-Id: I238b6dd3342e09d33f4d10f7928f5fb48371d2b3 --- src/libslic3r/Print.cpp | 3 ++- src/libslic3r/PrintObjectSlice.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 12ab10212..cb540c987 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -172,6 +172,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n } else if ( opt_key == "initial_layer_print_height" || opt_key == "nozzle_diameter" + || opt_key == "resolution" // Spiral Vase forces different kind of slicing than the normal model: // In Spiral Vase mode, holes are closed and only the largest area contour is kept at each layer. // Therefore toggling the Spiral Vase on / off requires complete reslicing. @@ -220,7 +221,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n opt_key == "initial_layer_line_width" || opt_key == "min_layer_height" || opt_key == "max_layer_height" - || opt_key == "resolution" + //|| opt_key == "resolution" //BBS: when enable arc fitting, we must re-generate perimeter || opt_key == "enable_arc_fitting" || opt_key == "wall_infill_order") { diff --git a/src/libslic3r/PrintObjectSlice.cpp b/src/libslic3r/PrintObjectSlice.cpp index 382296e16..d92fb2398 100644 --- a/src/libslic3r/PrintObjectSlice.cpp +++ b/src/libslic3r/PrintObjectSlice.cpp @@ -140,7 +140,7 @@ static std::vector slice_volumes_inner( params_base.trafo = object_trafo; //BBS: 0.0025mm is safe enough to simplify the data to speed slicing up for high-resolution model. //Also has on influence on arc fitting which has default resolution 0.0125mm. - params_base.resolution = 0.0025; + params_base.resolution = print_config.resolution <= 0.001 ? 0.0f : 0.0025; switch (print_object_config.slicing_mode.value) { case SlicingMode::Regular: params_base.mode = MeshSlicingParams::SlicingMode::Regular; break; case SlicingMode::EvenOdd: params_base.mode = MeshSlicingParams::SlicingMode::EvenOdd; break;