Skip to content

Commit

Permalink
Fix precise wall for Arachne wall generator (#2966)
Browse files Browse the repository at this point in the history
Update WIKI for it
  • Loading branch information
SoftFever committed Dec 3, 2023
1 parent 8f660f5 commit d22a725
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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
Expand Down
13 changes: 13 additions & 0 deletions doc/Precise-wall.md
Original file line number Diff line number Diff line change
@@ -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.

3 changes: 2 additions & 1 deletion doc/Print-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Print settings:
* [Axiliary fan](auxiliary-fan)
* [Chamber temperature](chamber-temperature)
* [Air filtration/Exhaust fan](air-filtration)
* [Single Extruder Multimaterial](semm)
* [Single Extruder Multimaterial](semm)
* [Precise wall](Precise-wall)
Original file line number Diff line number Diff line change
Expand Up @@ -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<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 << ".";
ret = std::make_unique<OuterWallInsetBeadingStrategy>(outer_wall_offset, std::move(ret));
}
Expand Down
12 changes: 5 additions & 7 deletions src/libslic3r/PerimeterGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1935,24 +1935,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<Arachne::VariableWidthLines> out_shell;
ExPolygons top_fills;
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ void TabPrint::build()
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_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");
Expand Down

0 comments on commit d22a725

Please sign in to comment.