From be1bd083a3285d7e39a22bc5aa652495e6d749c1 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Sun, 3 Dec 2023 09:20:29 +0800 Subject: [PATCH] Fix precise wall for Arachne wall generator (#2966) Update WIKI for it --- README.md | 2 +- doc/Precise-wall.md | 13 +++++++++++++ doc/Print-settings.md | 3 ++- .../BeadingStrategy/BeadingStrategyFactory.cpp | 4 +++- src/libslic3r/PerimeterGenerator.cpp | 12 +++++------- src/slic3r/GUI/Tab.cpp | 2 +- 6 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 doc/Precise-wall.md diff --git a/README.md b/README.md index ab920784564..823823f0962 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ You can download Orca Slicer here: [github releases page](https://github.com/Sof # Main features - Auto calibrations for all printers - Sandwich(inner-outer-inner) mode - an improved version of the `External perimeters first` mode -- Precise wall +- [Precise wall](https://github.com/SoftFever/OrcaSlicer/wiki/Precise-wall) - Polyholes conversion support [SuperSlicer Wiki: Polyholes](https://github.com/supermerill/SuperSlicer/wiki/Polyholes) - Klipper support - More granular controls diff --git a/doc/Precise-wall.md b/doc/Precise-wall.md new file mode 100644 index 00000000000..4c938be2202 --- /dev/null +++ b/doc/Precise-wall.md @@ -0,0 +1,13 @@ +The 'Precise Wall' is a distinctive feature introduced by OrcaSlicer, aimed at improving the dimensional accuracy of prints and minimizing layer inconsistencies by slightly increasing the spacing between the outer wall and the inner wall. + +Below is a technical explanation of how this feature works. +First, it's important to understand some basic concepts like flow, extrusion width, and space. Slic3r has an excellent document that covers these topics in detail. You can refer to this article: [link to article](https://manual.slic3r.org/advanced/flow-math). + +Now, let's dive into the specifics. Slic3r and its forks, such as PrusaSlicer, SuperSlicer, and OrcaSlicer, assume that the extrusion path has an oval shape, which accounts for the overlaps. For example, if we set the wall width to 0.4mm and the layer height to 0.2mm, the combined thickness of two walls laid side by side is 0.714mm instead of 0.8mm due to the overlapping. +![image](https://github.com/SoftFever/OrcaSlicer/assets/103989404/924d8df8-992c-4d55-b97d-fb85455fab5b) +This approach enhances the strength of 3D-printed parts. However, it does have some side effects. For instance, when the inner-outer wall order is used, the outer wall can be pushed outside, leading to potential size inaccuracy and more layer inconsistency. + +It's important to keep in mind that this approach to handling flow is specific to Slic3r and it's forks. Other slicing software, such as Cura, assumes that the extrusion path is rectangular and, therefore, does not include overlapping. Two 0.4 mm walls will result in a 0.8 mm shell thickness in Cura + +OrcaSlicer adheres to Slic3r's approach to handling flow. To address the downsides mentioned earlier, OrcaSlicer introduced the 'Precise Wall' feature. When this feature is enabled in OrcaSlicer, the overlap between the outer wall and its adjacent inner wall is set to zero. This ensures that the overall strength of the printed part is unaffected, while the size accuracy and layer consistency are improved. + diff --git a/doc/Print-settings.md b/doc/Print-settings.md index 128c990aca6..5c31ca4eb93 100644 --- a/doc/Print-settings.md +++ b/doc/Print-settings.md @@ -4,4 +4,5 @@ Print settings: * [Axiliary fan](auxiliary-fan) * [Chamber temperature](chamber-temperature) * [Air filtration/Exhaust fan](air-filtration) -* [Single Extruder Multimaterial](semm) \ No newline at end of file +* [Single Extruder Multimaterial](semm) +* [Precise wall](Precise-wall) \ No newline at end of file diff --git a/src/libslic3r/Arachne/BeadingStrategy/BeadingStrategyFactory.cpp b/src/libslic3r/Arachne/BeadingStrategy/BeadingStrategyFactory.cpp index 4044c901388..97acd271ac3 100644 --- a/src/libslic3r/Arachne/BeadingStrategy/BeadingStrategyFactory.cpp +++ b/src/libslic3r/Arachne/BeadingStrategy/BeadingStrategyFactory.cpp @@ -39,7 +39,9 @@ BeadingStrategyPtr BeadingStrategyFactory::makeStrategy( BOOST_LOG_TRIVIAL(debug) << "Applying the Widening Beading meta-strategy with minimum input width " << min_feature_size << " and minimum output width " << min_bead_width << "."; ret = std::make_unique(std::move(ret), min_feature_size, min_bead_width); } - if (outer_wall_offset > 0) { + // Orca: we allow negative outer_wall_offset here + if (outer_wall_offset != 0) + { BOOST_LOG_TRIVIAL(debug) << "Applying the OuterWallOffset meta-strategy with offset = " << outer_wall_offset << "."; ret = std::make_unique(outer_wall_offset, std::move(ret)); } diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 1ad0c92f8a1..348fe5fe330 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -1890,24 +1890,22 @@ void PerimeterGenerator::process_arachne() // extra perimeters for each one for (const Surface& surface : this->slices->surfaces) { coord_t bead_width_0 = ext_perimeter_spacing; - if (config->precise_outer_wall) - bead_width_0 = ext_perimeter_width + this->perimeter_flow.scaled_width() - perimeter_spacing; // detect how many perimeters must be generated for this island int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops if (this->layer_id == 0 && this->config->only_one_wall_first_layer) loop_number = 0; - // BBS: set the topmost layer to be one wall + // Orca: set the topmost layer to be one wall according to the config if (loop_number > 0 && config->only_one_wall_top && this->upper_slices == nullptr) loop_number = 0; + // Orca: properly adjust offset for the outer wall if precise_outer_wall is enabled. ExPolygons last = offset_ex(surface.expolygon.simplify_p(surface_simplify_resolution), - config->precise_outer_wall ? -float(ext_perimeter_width / 2. - bead_width_0 / 2.) + config->precise_outer_wall ? -float(ext_perimeter_width - ext_perimeter_spacing ) : -float(ext_perimeter_width / 2. - ext_perimeter_spacing / 2.)); Arachne::WallToolPathsParams input_params = Arachne::make_paths_params(this->layer_id, *object_config, *print_config); coord_t wall_0_inset = 0; - //if (config->precise_outer_wall) - // wall_0_inset = 0.5 * (ext_perimeter_width + this->perimeter_flow.scaled_width() - ext_perimeter_spacing - - // perimeter_spacing); + if (config->precise_outer_wall) + wall_0_inset = -coord_t(ext_perimeter_width / 2 - ext_perimeter_spacing / 2); std::vector out_shell; ExPolygons top_fills; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index a6137216fc0..e5dec5dd9cb 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1869,7 +1869,7 @@ void TabPrint::build() optgroup->append_single_option_line("xy_contour_compensation"); optgroup->append_single_option_line("elefant_foot_compensation"); optgroup->append_single_option_line("elefant_foot_compensation_layers"); - optgroup->append_single_option_line("precise_outer_wall"); + optgroup->append_single_option_line("precise_outer_wall", "Precise-wall"); optgroup->append_single_option_line("hole_to_polyhole"); optgroup->append_single_option_line("hole_to_polyhole_threshold"); optgroup->append_single_option_line("hole_to_polyhole_twisted");