Fix precise wall for Arachne wall generator (#2966)

Update WIKI for it
This commit is contained in:
SoftFever 2023-12-03 09:20:29 +08:00
parent 8f660f5b6a
commit d22a7254c4
6 changed files with 25 additions and 11 deletions

View file

@ -7,7 +7,7 @@ You can download Orca Slicer here: [github releases page](https://github.com/Sof
# Main features # Main features
- Auto calibrations for all printers - Auto calibrations for all printers
- Sandwich(inner-outer-inner) mode - an improved version of the `External perimeters first` mode - 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) - Polyholes conversion support [SuperSlicer Wiki: Polyholes](https://github.com/supermerill/SuperSlicer/wiki/Polyholes)
- Klipper support - Klipper support
- More granular controls - More granular controls

13
doc/Precise-wall.md Normal file
View file

@ -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.

View file

@ -4,4 +4,5 @@ Print settings:
* [Axiliary fan](auxiliary-fan) * [Axiliary fan](auxiliary-fan)
* [Chamber temperature](chamber-temperature) * [Chamber temperature](chamber-temperature)
* [Air filtration/Exhaust fan](air-filtration) * [Air filtration/Exhaust fan](air-filtration)
* [Single Extruder Multimaterial](semm) * [Single Extruder Multimaterial](semm)
* [Precise wall](Precise-wall)

View file

@ -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 << "."; 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<WideningBeadingStrategy>(std::move(ret), min_feature_size, min_bead_width); ret = std::make_unique<WideningBeadingStrategy>(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 << "."; BOOST_LOG_TRIVIAL(debug) << "Applying the OuterWallOffset meta-strategy with offset = " << outer_wall_offset << ".";
ret = std::make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, std::move(ret)); ret = std::make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, std::move(ret));
} }

View file

@ -1935,24 +1935,22 @@ void PerimeterGenerator::process_arachne()
// extra perimeters for each one // extra perimeters for each one
for (const Surface& surface : this->slices->surfaces) { for (const Surface& surface : this->slices->surfaces) {
coord_t bead_width_0 = ext_perimeter_spacing; 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 // detect how many perimeters must be generated for this island
int loop_number = this->config->wall_loops + surface.extra_perimeters - 1; // 0-indexed loops 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) if (this->layer_id == 0 && this->config->only_one_wall_first_layer)
loop_number = 0; 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) if (loop_number > 0 && config->only_one_wall_top && this->upper_slices == nullptr)
loop_number = 0; 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), 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.)); : -float(ext_perimeter_width / 2. - ext_perimeter_spacing / 2.));
Arachne::WallToolPathsParams input_params = Arachne::make_paths_params(this->layer_id, *object_config, *print_config); Arachne::WallToolPathsParams input_params = Arachne::make_paths_params(this->layer_id, *object_config, *print_config);
coord_t wall_0_inset = 0; coord_t wall_0_inset = 0;
//if (config->precise_outer_wall) if (config->precise_outer_wall)
// wall_0_inset = 0.5 * (ext_perimeter_width + this->perimeter_flow.scaled_width() - ext_perimeter_spacing - wall_0_inset = -coord_t(ext_perimeter_width / 2 - ext_perimeter_spacing / 2);
// perimeter_spacing);
std::vector<Arachne::VariableWidthLines> out_shell; std::vector<Arachne::VariableWidthLines> out_shell;
ExPolygons top_fills; ExPolygons top_fills;

View file

@ -1921,7 +1921,7 @@ void TabPrint::build()
optgroup->append_single_option_line("xy_contour_compensation", "xy-hole-contour-compensation"); optgroup->append_single_option_line("xy_contour_compensation", "xy-hole-contour-compensation");
optgroup->append_single_option_line("elefant_foot_compensation"); optgroup->append_single_option_line("elefant_foot_compensation");
optgroup->append_single_option_line("elefant_foot_compensation_layers"); 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");
optgroup->append_single_option_line("hole_to_polyhole_threshold"); optgroup->append_single_option_line("hole_to_polyhole_threshold");
optgroup->append_single_option_line("hole_to_polyhole_twisted"); optgroup->append_single_option_line("hole_to_polyhole_twisted");