Skip to content

Feature/fix fragmented sparse infill paths #9707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

elektrohenk
Copy link
Contributor

@elektrohenk elektrohenk commented May 23, 2025

fix #9635

Description

The infill path generation of sparse infill patterns "Rectilinear" and "Aligned Rectilinear" will be improved when "Maximum length of the infill anchor" is likely to be long enough to connect the infill lines. FillRectilinear::fill_surface_by_lines() performs better in connecting non intersecting parallel infill lines compared to FillRectilinear::fill_surface_by_multilines() that makes use of Fill::connect_infill(). FillRectilinear::fill_surface_by_lines() (using FillRectilinear::connect_segment_intersections_by_contours()) connects infill lines when "Maximum length of the infill anchor" is 0.05 mm or higher, not being able to create infill anchors and therefore not respecting "Sparse infill anchor length" and "Maximum length of the infill anchor" to its values. The infill lines will be fully connected when "Maximum length of the infill anchor" is more than twice as long as the infill line pitch, guaranteeing correct infill anchor behavior for infill line boundary angles from 30 to 150 degrees.

Tests

Tested with local build.
The example shared in #9635 has a infill line pitch of slightly more than 2.647 mm ((110% * 0.40 mm - 0.20 mm * (1 - pi/4)) / 15%) and will have improved infill path generation when "Maximum length of the infill anchor" is set to 5.295 mm or higher.

@ianalexis
Copy link
Contributor

Still dosnt work for me
imagen

@elektrohenk
Copy link
Contributor Author

elektrohenk commented May 31, 2025

Still dosnt work for me

That is because the "Maximum length of the infill anchor" is set to 0 so the infill lines can not be connected together. The behavior is the same for 2.3.0. Please read the description for calculating the "Maximum length of the infill anchor" threshold or put the default 20 mm there.

@ianalexis
Copy link
Contributor

but the main goal from the issue is not that this sould "correctly" order the print lines without the need of connecting lines?

@elektrohenk
Copy link
Contributor Author

This pull solves the part of issue #9635 that was caused by pull #9407, that is the case of (aligned) rectilinear with long infill anchors so all lines are connected at the perimeter.

but the main goal from the issue is not that this sould "correctly" order the print lines without the need of connecting lines?

I guess you meant optimizing the printing order of unconnected lines? For that I don't have a fix now. If you want to give that a try, I have knowledge how to apply 2-opt and 3-opt optimization (and other methods but those methods are computationally relatively cheap) for the case of 3D printing line ordering (open TSP with bi-directional paths), but lack OrcaSlicer/libslic3r knowledge to apply it to Fill::connect_infill, happy to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sparse infill fragmented path
2 participants