From f1e0f420732308322d1e6222adce55abf6448819 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:40:03 +0000 Subject: [PATCH 01/10] Update PerimeterGenerator.cpp --- src/libslic3r/PerimeterGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 488f836cfc0..c461f71c1e9 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -1412,7 +1412,8 @@ static void reorient_perimeters(ExtrusionEntityCollection &entities, bool steep_ ExtrusionLoop *eloop = static_cast(entity); // Only reverse when needed bool need_reverse = ((eloop->loop_role() & elrHole) == elrHole) ? steep_overhang_hole : steep_overhang_contour; - if (need_reverse) { + + if (need_reverse && eloop[0].role()!=erExternalPerimeter) { eloop->make_clockwise(); } } From af80adb6f306b66b0f46e16e84d6f1230dd4ae68 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Sun, 12 Nov 2023 17:00:41 +0000 Subject: [PATCH 02/10] Reverse on odd - internal only --- src/libslic3r/PerimeterGenerator.cpp | 18 ++++++++++++++---- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 8 ++++++++ src/libslic3r/PrintConfig.hpp | 1 + src/libslic3r/PrintObject.cpp | 1 + src/slic3r/GUI/ConfigManipulation.cpp | 1 + src/slic3r/GUI/Tab.cpp | 1 + 7 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index c461f71c1e9..bbb23369943 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -1404,7 +1404,7 @@ void PerimeterGenerator::apply_extra_perimeters(ExPolygons &infill_area) } // Reorient loop direction -static void reorient_perimeters(ExtrusionEntityCollection &entities, bool steep_overhang_contour, bool steep_overhang_hole) +static void reorient_perimeters(ExtrusionEntityCollection &entities, bool steep_overhang_contour, bool steep_overhang_hole, bool reverse_internal_only) { if (steep_overhang_hole || steep_overhang_contour) { for (auto entity : entities) { @@ -1413,7 +1413,17 @@ static void reorient_perimeters(ExtrusionEntityCollection &entities, bool steep_ // Only reverse when needed bool need_reverse = ((eloop->loop_role() & elrHole) == elrHole) ? steep_overhang_hole : steep_overhang_contour; - if (need_reverse && eloop[0].role()!=erExternalPerimeter) { + bool isExternal = false; + if(reverse_internal_only){ + for(auto path : eloop->paths){ + if(path.role() == erExternalPerimeter){ + isExternal = true; + break; + } + } + } + + if (need_reverse && !isExternal) { eloop->make_clockwise(); } } @@ -1711,7 +1721,7 @@ void PerimeterGenerator::process_classic() bool steep_overhang_contour = false; bool steep_overhang_hole = false; ExtrusionEntityCollection entities = traverse_loops(*this, contours.front(), thin_walls, steep_overhang_contour, steep_overhang_hole); - reorient_perimeters(entities, steep_overhang_contour, steep_overhang_hole); + reorient_perimeters(entities, steep_overhang_contour, steep_overhang_hole, this->config->overhang_reverse_internal_only); // if brim will be printed, reverse the order of perimeters so that // we continue inwards after having finished the brim @@ -2233,7 +2243,7 @@ void PerimeterGenerator::process_arachne() bool steep_overhang_contour = false; bool steep_overhang_hole = false; if (ExtrusionEntityCollection extrusion_coll = traverse_extrusions(*this, ordered_extrusions, steep_overhang_contour, steep_overhang_hole); !extrusion_coll.empty()) { - reorient_perimeters(extrusion_coll, steep_overhang_contour, steep_overhang_hole); + reorient_perimeters(extrusion_coll, steep_overhang_contour, steep_overhang_hole, this->config->overhang_reverse_internal_only); this->loops->append(extrusion_coll); } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index c8c158f9308..c9777b3c381 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -726,7 +726,7 @@ bool Preset::has_cali_lines(PresetBundle* preset_bundle) static std::vector s_Preset_print_options { "layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode", "slicing_mode", "top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness", - "extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold", + "extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only", "seam_position", "staggered_inner_seams", "wall_infill_order", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern", "infill_direction", "minimum_sparse_infill_area", "reduce_infill_retraction","internal_solid_infill_pattern", diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 94cb997fbcc..9903d5b0bc9 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -843,6 +843,14 @@ void PrintConfigDef::init_fff_params() def->tooltip = L("Extrude perimeters that have a part over an overhang in the reverse direction on odd layers. This alternating pattern can drastically improve steep overhang."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); + + def = this->add("overhang_reverse_internal_only", coBool); + def->label = L("Reverse only internal perimeters"); + def->full_label = L("Reverse only internal perimeters"); + def->category = L("Quality"); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. This reduces the effectiveness of the setting somewhat; however it prevents artefacts on the external walls caused by inaccuracies in the motion system.\nIt may also help to reduce part warping due to lower part stresses."); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionBool(false)); def = this->add("overhang_reverse_threshold", coFloatOrPercent); def->label = L("Reverse threshold"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 6404b367ae1..40cc7a6d628 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -877,6 +877,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloatOrPercent, hole_to_polyhole_threshold)) ((ConfigOptionBool, hole_to_polyhole_twisted)) ((ConfigOptionBool, overhang_reverse)) + ((ConfigOptionBool, overhang_reverse_internal_only)) ((ConfigOptionFloatOrPercent, overhang_reverse_threshold)) ) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 8d6175cc0a9..48da72f5f3f 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -1097,6 +1097,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "fuzzy_skin_point_distance" || opt_key == "detect_overhang_wall" || opt_key == "overhang_reverse" + || opt_key == "overhang_reverse_internal_only" || opt_key == "overhang_reverse_threshold" //BBS || opt_key == "enable_overhang_speed" diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 934ddb10191..1541d6fad57 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -736,6 +736,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co bool allow_overhang_reverse = has_detect_overhang_wall && !has_spiral_vase; toggle_field("overhang_reverse", allow_overhang_reverse); toggle_line("overhang_reverse_threshold", allow_overhang_reverse && has_overhang_reverse); + toggle_line("overhang_reverse_internal_only", allow_overhang_reverse && has_overhang_reverse); toggle_line("timelapse_type", is_BBL_Printer); } diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 9a38c7409a7..2b2b8b913ee 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1911,6 +1911,7 @@ void TabPrint::build() optgroup->append_single_option_line("max_travel_detour_distance"); optgroup->append_single_option_line("extra_perimeters_on_overhangs"); optgroup->append_single_option_line("overhang_reverse"); + optgroup->append_single_option_line("overhang_reverse_internal_only"); optgroup->append_single_option_line("overhang_reverse_threshold"); page = add_options_page(L("Strength"), "empty"); From 6f3a6ef6c5c1226ee875abb920b8cd940847e96c Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Sun, 12 Nov 2023 17:11:01 +0000 Subject: [PATCH 03/10] REVERT ME: Enable CICD build on branch --- .github/workflows/build_orca.yml | 53 ++------------------------------ 1 file changed, 3 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 0fd5724f9ee..f477b55b0e2 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -1,25 +1,7 @@ name: Build OrcaSlicer on: - push: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - 'localization/**' - - 'resources/**' - - ".github/workflows/build_orca.yml" - - pull_request: - branches: - - main - paths: - - 'src/**' - - '**/CMakeLists.txt' - - 'version.inc' - - ".github/workflows/build_orca.yml" + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -31,10 +13,6 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-20.04 - - os: windows-latest - - os: macos-12 - arch: x86_64 - os: macos-12 arch: arm64 runs-on: ${{ matrix.os }} @@ -107,34 +85,9 @@ jobs: ./build_release_macos.sh -s -n -a ${{matrix.arch}} # Thanks to RaySajuuk, it's working now - - name: Sign app and notary - if: github.ref == 'refs/heads/main' && matrix.os == 'macos-12' - working-directory: ${{ github.workspace }} - env: - BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} - P12_PASSWORD: ${{ secrets.P12_PASSWORD }} - KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} - CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} - run: | - CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 - KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db - echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH - security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security set-keychain-settings -lut 21600 $KEYCHAIN_PATH - security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH - security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH - security list-keychain -d user -s $KEYCHAIN_PATH - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH - codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/OrcaSlicer.app - ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications - hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg - codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg - xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" - xcrun notarytool submit "OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait - xcrun stapler staple OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg - name: Create DMG without notary - if: github.ref != 'refs/heads/main' && matrix.os == 'macos-12' + if: matrix.os == 'macos-12' working-directory: ${{ github.workspace }} run: | ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications @@ -285,4 +238,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: OrcaSlicer_Linux_V${{ env.ver }} - path: './build/OrcaSlicer_ubu64.AppImage' + path: './build/OrcaSlicer_ubu64.AppImage' \ No newline at end of file From 41d75e9b31540e6d78f3b8b50c8cbbf6f369bd45 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Mon, 13 Nov 2023 10:31:29 +0000 Subject: [PATCH 04/10] Updated tool tips --- src/libslic3r/PrintConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 9903d5b0bc9..21ddf62cd5a 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -848,7 +848,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse only internal perimeters"); def->full_label = L("Reverse only internal perimeters"); def->category = L("Quality"); - def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. This reduces the effectiveness of the setting somewhat; however it prevents artefacts on the external walls caused by inaccuracies in the motion system.\nIt may also help to reduce part warping due to lower part stresses."); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. This greatly reduces the effectiveness of the setting, however it reduces artefacts on the external walls caused by inaccuracies in the printer motion system.\nIt also greatly reduces part stresses, which should reduce warping. \nTo reduce part warping, it is recomended to set the Reverse Threshold to 0, so that all internal walls print direction alternates on odd layers irrespective of the overhang degree.\nTo minimize external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); From 755d64002137e3cabd42ee6382c43a94d9889a65 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Mon, 13 Nov 2023 11:34:30 +0000 Subject: [PATCH 05/10] Updated tool tips --- src/libslic3r/PrintConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 21ddf62cd5a..2db291bf2e8 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -848,7 +848,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse only internal perimeters"); def->full_label = L("Reverse only internal perimeters"); def->category = L("Quality"); - def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. This greatly reduces the effectiveness of the setting, however it reduces artefacts on the external walls caused by inaccuracies in the printer motion system.\nIt also greatly reduces part stresses, which should reduce warping. \nTo reduce part warping, it is recomended to set the Reverse Threshold to 0, so that all internal walls print direction alternates on odd layers irrespective of the overhang degree.\nTo minimize external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. This greatly reduces the effectiveness of the setting, however it reduces artefacts on the external walls caused by inaccuracies in the printer motion system.\n\nThis setting also greatly reduces part stresses, which should reduce warping, while maintaining external wall quality. \n\nTo use this setting to reduce part warping, it is recomended to set the Reverse Threshold to 0, so that all internal walls print direction alternates on odd layers irrespective of the overhang degree.\n\nTo minimize external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); From 342e332d205045dc6d83bd73b70ad4506177ddce Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:53:27 +0000 Subject: [PATCH 06/10] Revert "REVERT ME: Enable CICD build on branch" This reverts commit 6f3a6ef6c5c1226ee875abb920b8cd940847e96c. --- .github/workflows/build_orca.yml | 53 ++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index f477b55b0e2..0fd5724f9ee 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -1,7 +1,25 @@ name: Build OrcaSlicer on: - workflow_dispatch: + push: + branches: + - main + paths: + - 'src/**' + - '**/CMakeLists.txt' + - 'version.inc' + - 'localization/**' + - 'resources/**' + - ".github/workflows/build_orca.yml" + + pull_request: + branches: + - main + paths: + - 'src/**' + - '**/CMakeLists.txt' + - 'version.inc' + - ".github/workflows/build_orca.yml" concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -13,6 +31,10 @@ jobs: fail-fast: false matrix: include: + - os: ubuntu-20.04 + - os: windows-latest + - os: macos-12 + arch: x86_64 - os: macos-12 arch: arm64 runs-on: ${{ matrix.os }} @@ -85,9 +107,34 @@ jobs: ./build_release_macos.sh -s -n -a ${{matrix.arch}} # Thanks to RaySajuuk, it's working now + - name: Sign app and notary + if: github.ref == 'refs/heads/main' && matrix.os == 'macos-12' + working-directory: ${{ github.workspace }} + env: + BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} + P12_PASSWORD: ${{ secrets.P12_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} + run: | + CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 + KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db + echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH + security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH + security set-keychain-settings -lut 21600 $KEYCHAIN_PATH + security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH + security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH + security list-keychain -d user -s $KEYCHAIN_PATH + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH + codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/OrcaSlicer.app + ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications + hdiutil create -volname "OrcaSlicer" -srcfolder ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer -ov -format UDZO OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg + codesign --deep --force --verbose --options runtime --timestamp --entitlements ${{ github.workspace }}/scripts/disable_validation.entitlements --sign "$CERTIFICATE_ID" OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg + xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.APPLE_DEV_ACCOUNT }}" --team-id "${{ secrets.TEAM_ID }}" --password "${{ secrets.APP_PWD }}" + xcrun notarytool submit "OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg" --keychain-profile "notarytool-profile" --wait + xcrun stapler staple OrcaSlicer_Mac_${{matrix.arch}}_V${{ env.ver }}.dmg - name: Create DMG without notary - if: matrix.os == 'macos-12' + if: github.ref != 'refs/heads/main' && matrix.os == 'macos-12' working-directory: ${{ github.workspace }} run: | ln -s /Applications ${{ github.workspace }}/build_${{matrix.arch}}/OrcaSlicer/Applications @@ -238,4 +285,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: OrcaSlicer_Linux_V${{ env.ver }} - path: './build/OrcaSlicer_ubu64.AppImage' \ No newline at end of file + path: './build/OrcaSlicer_ubu64.AppImage' From f8973aa959c5422aa9bb73565a986019534403e7 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:45:30 +0000 Subject: [PATCH 07/10] Updated tooltip and config manipulation --- src/libslic3r/PrintConfig.cpp | 4 +- src/slic3r/GUI/ConfigManipulation.cpp | 136 ++++++++++++++------------ 2 files changed, 73 insertions(+), 67 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 5e4154bb647..49a0140c5f4 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -840,7 +840,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse on odd"); def->full_label = L("Overhang reversal"); def->category = L("Quality"); - def->tooltip = L("Extrude perimeters that have a part over an overhang in the reverse direction on odd layers. This alternating pattern can drastically improve steep overhang."); + def->tooltip = L("Extrude perimeters that have a part over an overhang in the reverse direction on odd layers. This alternating pattern can drastically improve steep overhangs.\n\nThis setting can also help reduce part warping due to the reduction of stresses in the part walls."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); @@ -848,7 +848,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse only internal perimeters"); def->full_label = L("Reverse only internal perimeters"); def->category = L("Quality"); - def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. This greatly reduces the effectiveness of the setting, however it reduces artefacts on the external walls caused by inaccuracies in the printer motion system.\n\nThis setting also greatly reduces part stresses, which should reduce warping, while maintaining external wall quality. \n\nTo use this setting to reduce part warping, it is recomended to set the Reverse Threshold to 0, so that all internal walls print direction alternates on odd layers irrespective of the overhang degree.\n\nTo minimize external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduce part stresses as they are now distributed in alternating directions, which should reduce warping, while maintaining external wall quality. This can be very useful for warp prone material, like ABS/ASA and also for elastic filaments like TPU and Silk PLA. \n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0, so that all internal walls print direction alternates on odd layers irrespective of the overhang degree.\n\nTo minimize potential external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 1541d6fad57..b26e3e8ca6e 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -511,7 +511,7 @@ void ConfigManipulation::apply_null_fff_config(DynamicPrintConfig *config, std:: void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, const bool is_global_config) { PresetBundle *preset_bundle = wxGetApp().preset_bundle; - + auto gcflavor = preset_bundle->printers.get_edited_preset().config.option>("gcode_flavor")->value; bool have_volumetric_extrusion_rate_slope = config->option("max_volumetric_extrusion_rate_slope")->value > 0; @@ -520,27 +520,27 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_line("max_volumetric_extrusion_rate_slope_segment_length", have_volumetric_extrusion_rate_slope); if(have_volumetric_extrusion_rate_slope) config->set_key_value("enable_arc_fitting", new ConfigOptionBool(false)); if(have_volumetric_extrusion_rate_slope_segment_length==0) { - DynamicPrintConfig new_conf = *config; + DynamicPrintConfig new_conf = *config; new_conf.set_key_value("max_volumetric_extrusion_rate_slope_segment_length", new ConfigOptionInt(1)); - apply(config, &new_conf); + apply(config, &new_conf); } bool have_perimeters = config->opt_int("wall_loops") > 0; for (auto el : { "extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "detect_thin_wall", "detect_overhang_wall", - "seam_position", "staggered_inner_seams", "wall_infill_order", "outer_wall_line_width", - "inner_wall_speed", "outer_wall_speed", "small_perimeter_speed", "small_perimeter_threshold" }) + "seam_position", "staggered_inner_seams", "wall_infill_order", "outer_wall_line_width", + "inner_wall_speed", "outer_wall_speed", "small_perimeter_speed", "small_perimeter_threshold" }) toggle_field(el, have_perimeters); - + bool have_infill = config->option("sparse_infill_density")->value > 0; // sparse_infill_filament uses the same logic as in Print::extruders() for (auto el : { "sparse_infill_pattern", "infill_combination", - "minimum_sparse_infill_area", "sparse_infill_filament", "infill_anchor_max"}) + "minimum_sparse_infill_area", "sparse_infill_filament", "infill_anchor_max"}) toggle_line(el, have_infill); // Only allow configuration of open anchors if the anchoring is enabled. bool has_infill_anchors = have_infill && config->option("infill_anchor_max")->value > 0; toggle_field("infill_anchor", has_infill_anchors); - + bool has_spiral_vase = config->opt_bool("spiral_mode"); bool has_top_solid_infill = config->opt_int("top_shell_layers") > 0; bool has_bottom_solid_infill = config->opt_int("bottom_shell_layers") > 0; @@ -548,43 +548,43 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co // solid_infill_filament uses the same logic as in Print::extruders() for (auto el : { "top_surface_pattern", "bottom_surface_pattern", "internal_solid_infill_pattern", "solid_infill_filament"}) toggle_field(el, has_solid_infill); - + for (auto el : { "infill_direction", "sparse_infill_line_width", - "sparse_infill_speed", "bridge_speed", "internal_bridge_speed", "bridge_angle" }) + "sparse_infill_speed", "bridge_speed", "internal_bridge_speed", "bridge_angle" }) toggle_field(el, have_infill || has_solid_infill); - + toggle_field("top_shell_thickness", ! has_spiral_vase && has_top_solid_infill); toggle_field("bottom_shell_thickness", ! has_spiral_vase && has_bottom_solid_infill); - + // Gap fill is newly allowed in between perimeter lines even for empty infill (see GH #1476). toggle_field("gap_infill_speed", have_perimeters); - + for (auto el : { "top_surface_line_width", "top_surface_speed" }) toggle_field(el, has_top_solid_infill || (has_spiral_vase && has_bottom_solid_infill)); - + bool have_default_acceleration = config->opt_float("default_acceleration") > 0; - + for (auto el : {"outer_wall_acceleration", "inner_wall_acceleration", "initial_layer_acceleration", - "top_surface_acceleration", "travel_acceleration", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"}) + "top_surface_acceleration", "travel_acceleration", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"}) toggle_field(el, have_default_acceleration); - + bool have_default_jerk = config->opt_float("default_jerk") > 0; - + for (auto el : { "outer_wall_jerk", "inner_wall_jerk", "initial_layer_jerk", "top_surface_jerk","travel_jerk", "infill_jerk"}) toggle_field(el, have_default_jerk); - + bool have_skirt = config->opt_int("skirt_loops") > 0; toggle_field("skirt_height", have_skirt && config->opt_enum("draft_shield") != dsEnabled); for (auto el : { "skirt_distance", "draft_shield"}) toggle_field(el, have_skirt); - + bool have_brim = (config->opt_enum("brim_type") != btNoBrim); toggle_field("brim_object_gap", have_brim); bool have_brim_width = (config->opt_enum("brim_type") != btNoBrim) && config->opt_enum("brim_type") != btAutoBrim; toggle_field("brim_width", have_brim_width); // wall_filament uses the same logic as in Print::extruders() toggle_field("wall_filament", have_perimeters || have_brim); - + bool have_brim_ear = (config->opt_enum("brim_type") == btEar); const auto brim_width = config->opt_float("brim_width"); // disable brim_ears_max_angle and brim_ears_detection_length if brim_width is 0 @@ -593,32 +593,32 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co // hide brim_ears_max_angle and brim_ears_detection_length if brim_ear is not selected toggle_line("brim_ears_max_angle", have_brim_ear); toggle_line("brim_ears_detection_length", have_brim_ear); - + // Hide Elephant foot compensation layers if elefant_foot_compensation is not enabled toggle_line("elefant_foot_compensation_layers", config->opt_float("elefant_foot_compensation") > 0); - + bool have_raft = config->opt_int("raft_layers") > 0; bool have_support_material = config->opt_bool("enable_support") || have_raft; - + SupportType support_type = config->opt_enum("support_type"); bool have_support_interface = config->opt_int("support_interface_top_layers") > 0 || config->opt_int("support_interface_bottom_layers") > 0; bool have_support_soluble = have_support_material && config->opt_float("support_top_z_distance") == 0; auto support_style = config->opt_enum("support_style"); for (auto el : { "support_style", "support_base_pattern", - "support_base_pattern_spacing", "support_expansion", "support_angle", - "support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers", - "bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance", - //BBS: add more support params to dependent of enable_support - "support_type", "support_on_build_plate_only", "support_critical_regions_only", - "support_object_xy_distance"/*, "independent_support_layer_height"*/}) + "support_base_pattern_spacing", "support_expansion", "support_angle", + "support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers", + "bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance", + //BBS: add more support params to dependent of enable_support + "support_type", "support_on_build_plate_only", "support_critical_regions_only", + "support_object_xy_distance"/*, "independent_support_layer_height"*/}) toggle_field(el, have_support_material); toggle_field("support_threshold_angle", have_support_material && is_auto(support_type)); //toggle_field("support_closing_radius", have_support_material && support_style == smsSnug); - + bool support_is_tree = config->opt_bool("enable_support") && is_tree(support_type); bool support_is_normal_tree = support_is_tree && support_style != smsOrganic && - // Orca: use organic as default - support_style != smsDefault; + // Orca: use organic as default + support_style != smsDefault; bool support_is_organic = support_is_tree && !support_is_normal_tree; // settings shared by normal and organic trees for (auto el : {"tree_support_branch_angle", "tree_support_branch_distance", "tree_support_branch_diameter" }) @@ -629,85 +629,85 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co // settings specific to organic trees for (auto el : {"tree_support_branch_angle_organic", "tree_support_branch_distance_organic", "tree_support_branch_diameter_organic","tree_support_angle_slow","tree_support_tip_diameter", "tree_support_top_rate", "tree_support_branch_diameter_angle", "tree_support_branch_diameter_double_wall"}) toggle_line(el, support_is_organic); - + toggle_field("tree_support_brim_width", support_is_tree && !config->opt_bool("tree_support_auto_brim")); // non-organic tree support use max_bridge_length instead of bridge_no_support toggle_line("max_bridge_length", support_is_normal_tree); toggle_line("bridge_no_support", !support_is_normal_tree); - + // This is only supported for auto normal tree toggle_line("support_critical_regions_only", is_auto(support_type) && support_is_normal_tree); - + for (auto el : { "support_interface_spacing", "support_interface_filament", - "support_interface_loop_pattern", "support_bottom_interface_spacing" }) + "support_interface_loop_pattern", "support_bottom_interface_spacing" }) toggle_field(el, have_support_material && have_support_interface); - + bool have_skirt_height = have_skirt && - (config->opt_int("skirt_height") > 1 || config->opt_enum("draft_shield") != dsEnabled); + (config->opt_int("skirt_height") > 1 || config->opt_enum("draft_shield") != dsEnabled); toggle_line("support_speed", have_support_material || have_skirt_height); toggle_line("support_interface_speed", have_support_material && have_support_interface); - + // BBS //toggle_field("support_material_synchronize_layers", have_support_soluble); - + toggle_field("inner_wall_line_width", have_perimeters || have_skirt || have_brim); toggle_field("support_filament", have_support_material || have_skirt); - + toggle_line("raft_contact_distance", have_raft && !have_support_soluble); - + // Orca: Raft, grid, snug and organic supports use these two parameters to control the size & density of the "brim"/flange for (auto el : { "raft_first_layer_expansion", "raft_first_layer_density"}) toggle_field(el, have_support_material && !(support_is_normal_tree && !have_raft)); - + bool has_ironing = (config->opt_enum("ironing_type") != IroningType::NoIroning); for (auto el : { "ironing_pattern", "ironing_flow", "ironing_spacing", "ironing_speed", "ironing_angle" }) toggle_line(el, has_ironing); - + // bool have_sequential_printing = (config->opt_enum("print_sequence") == PrintSequence::ByObject); // for (auto el : { "extruder_clearance_radius", "extruder_clearance_height_to_rod", "extruder_clearance_height_to_lid" }) // toggle_field(el, have_sequential_printing); - + bool have_ooze_prevention = config->opt_bool("ooze_prevention"); toggle_field("standby_temperature_delta", have_ooze_prevention); - + bool have_prime_tower = config->opt_bool("enable_prime_tower"); for (auto el : { "prime_tower_width", "prime_tower_brim_width"}) toggle_line(el, have_prime_tower); - + bool purge_in_primetower = preset_bundle->printers.get_edited_preset().config.opt_bool("purge_in_prime_tower"); - + for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_bridging", "wipe_tower_no_sparse_layers"}) toggle_line(el, have_prime_tower && purge_in_primetower); - + toggle_line("prime_volume",have_prime_tower && !purge_in_primetower); - + for (auto el : {"flush_into_infill", "flush_into_support", "flush_into_objects"}) toggle_field(el, have_prime_tower); - - // BBS: MusangKing - Hide "Independent support layer height" option + + // BBS: MusangKing - Hide "Independent support layer height" option toggle_line("independent_support_layer_height", have_support_material && !have_prime_tower); - + bool have_avoid_crossing_perimeters = config->opt_bool("reduce_crossing_wall"); toggle_line("max_travel_detour_distance", have_avoid_crossing_perimeters); - + bool has_overhang_speed = config->opt_bool("enable_overhang_speed"); for (auto el : {"overhang_speed_classic", "overhang_1_4_speed", - "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed"}) + "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed"}) toggle_line(el, has_overhang_speed); bool has_overhang_speed_classic = config->opt_bool("overhang_speed_classic"); toggle_line("slowdown_for_curled_perimeters",!has_overhang_speed_classic && has_overhang_speed); - + toggle_line("flush_into_objects", !is_global_config); - + bool has_fuzzy_skin = (config->opt_enum("fuzzy_skin") != FuzzySkinType::None); for (auto el : { "fuzzy_skin_thickness", "fuzzy_skin_point_distance"}) toggle_line(el, has_fuzzy_skin); - + bool have_arachne = config->opt_enum("wall_generator") == PerimeterGeneratorType::Arachne; for (auto el : { "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", - "min_feature_size", "min_bead_width", "wall_distribution_count", "initial_layer_min_bead_width"}) + "min_feature_size", "min_bead_width", "wall_distribution_count", "initial_layer_min_bead_width"}) toggle_line(el, have_arachne); toggle_field("detect_thin_wall", !have_arachne); @@ -719,24 +719,30 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co toggle_line(el, gcflavor == gcfKlipper); if(gcflavor == gcfKlipper) toggle_field("accel_to_decel_factor", config->opt_bool("accel_to_decel_enable")); - + bool have_make_overhang_printable = config->opt_bool("make_overhang_printable"); toggle_line("make_overhang_printable_angle", have_make_overhang_printable); toggle_line("make_overhang_printable_hole_size", have_make_overhang_printable); - + toggle_line("exclude_object", gcflavor == gcfKlipper); - + toggle_line("min_width_top_surface",config->opt_bool("only_one_wall_top")); - + for (auto el : { "hole_to_polyhole_threshold", "hole_to_polyhole_twisted" }) toggle_line(el, config->opt_bool("hole_to_polyhole")); - + bool has_detect_overhang_wall = config->opt_bool("detect_overhang_wall"); bool has_overhang_reverse = config->opt_bool("overhang_reverse"); bool allow_overhang_reverse = has_detect_overhang_wall && !has_spiral_vase; toggle_field("overhang_reverse", allow_overhang_reverse); toggle_line("overhang_reverse_threshold", allow_overhang_reverse && has_overhang_reverse); toggle_line("overhang_reverse_internal_only", allow_overhang_reverse && has_overhang_reverse); + bool has_overhang_reverse_internal_only = config->opt_bool("overhang_reverse_internal_only"); + if (has_overhang_reverse_internal_only){ + DynamicPrintConfig new_conf = *config; + new_conf.set_key_value("overhang_reverse_threshold", new ConfigOptionFloatOrPercent(0,true)); + apply(config, &new_conf); + } toggle_line("timelapse_type", is_BBL_Printer); } From bbcfb8417fc496b87252358b593b318d90dabb4a Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:25:41 +0000 Subject: [PATCH 08/10] Update PrintConfig.cpp --- src/libslic3r/PrintConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 49a0140c5f4..fb4ce0b2e84 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -848,7 +848,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse only internal perimeters"); def->full_label = L("Reverse only internal perimeters"); def->category = L("Quality"); - def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduce part stresses as they are now distributed in alternating directions, which should reduce warping, while maintaining external wall quality. This can be very useful for warp prone material, like ABS/ASA and also for elastic filaments like TPU and Silk PLA. \n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0, so that all internal walls print direction alternates on odd layers irrespective of the overhang degree.\n\nTo minimize potential external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduces part stresses as they are now distributed in alternating directions. This should reduce part warping, while also maintaining external wall quality. This can be very useful for warp prone material, like ABS/ASA and also for elastic filaments like TPU and Silk PLA. \n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0 so that all internal walls print in alternating directions on odd layers irrespective of their overhang degree.\n\nTo minimize potential external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); From b5ee98cc8843866dfd2559c89020dd2f3ff90ee9 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:26:54 +0000 Subject: [PATCH 09/10] Update PrintConfig.cpp --- src/libslic3r/PrintConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index fb4ce0b2e84..7fd90ca7be7 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -848,7 +848,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse only internal perimeters"); def->full_label = L("Reverse only internal perimeters"); def->category = L("Quality"); - def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduces part stresses as they are now distributed in alternating directions. This should reduce part warping, while also maintaining external wall quality. This can be very useful for warp prone material, like ABS/ASA and also for elastic filaments like TPU and Silk PLA. \n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0 so that all internal walls print in alternating directions on odd layers irrespective of their overhang degree.\n\nTo minimize potential external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduces part stresses as they are now distributed in alternating directions. This should reduce part warping while also maintaining external wall quality. This feature can be very useful for warp prone material, like ABS/ASA, and also for elastic filaments, like TPU and Silk PLA. \n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0 so that all internal walls print in alternating directions on odd layers irrespective of their overhang degree.\n\nTo minimize potential external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); From 9d0e616afa5c4028b4d162736b8bf256270eb894 Mon Sep 17 00:00:00 2001 From: igiannakas <59056762+igiannakas@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:41:37 +0000 Subject: [PATCH 10/10] Updated tool tips following Discord test feedback --- src/libslic3r/PrintConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 10b5ab79191..cefc09347c9 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -848,7 +848,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Reverse only internal perimeters"); def->full_label = L("Reverse only internal perimeters"); def->category = L("Quality"); - def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduces part stresses as they are now distributed in alternating directions. This should reduce part warping while also maintaining external wall quality. This feature can be very useful for warp prone material, like ABS/ASA, and also for elastic filaments, like TPU and Silk PLA. \n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0 so that all internal walls print in alternating directions on odd layers irrespective of their overhang degree.\n\nTo minimize potential external wall artefacts it is recomended to print with inner-outer-inner/infill mode or with outer/inner/infill mode."); + def->tooltip = L("Apply the reverse perimeters logic only on internal perimeters. \n\nThis setting greatly reduces part stresses as they are now distributed in alternating directions. This should reduce part warping while also maintaining external wall quality. This feature can be very useful for warp prone material, like ABS/ASA, and also for elastic filaments, like TPU and Silk PLA. It can also help reduce warping on floating regions over supports.\n\nFor this setting to be the most effective, it is recomended to set the Reverse Threshold to 0 so that all internal walls print in alternating directions on odd layers irrespective of their overhang degree."); def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false));