Skip to content

Sparse infill fragmented path #9635

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
3 tasks done
kisslorand opened this issue May 15, 2025 · 12 comments · May be fixed by #9707
Open
3 tasks done

Sparse infill fragmented path #9635

kisslorand opened this issue May 15, 2025 · 12 comments · May be fixed by #9707
Labels
bug Something isn't working

Comments

@kisslorand
Copy link
Contributor

Is there an existing issue for this problem?

  • I have searched the existing issues

OrcaSlicer Version

2.3.1-dev

Operating System (OS)

Windows

OS Version

Windows 11

Additional system information

No response

Printer

doesn't matter

How to reproduce

  1. Insert a cube
  2. Modify it to be brick-shaped (ex.: 60x100x30)
  3. Slice with any non-intersecting sparse infill
  4. Observe sparse infill path fragmentation

Actual results

OrcaSlicer v2.3.1-dev
Image

Expected results

OrcaSlicer v2.3.0
Image

Project file & Debug log uploads

debug_Thu_May_15_15_31_08_10792.log.zip

Cube.zip

Checklist of files to include

  • Log file
  • Project file

Anything else?

This behaviour leads to unnecessary tool travel, retraction and Z hop, prolonging print time.

@kisslorand kisslorand added the bug Something isn't working label May 15, 2025
@kisslorand
Copy link
Contributor Author

For an easier check it is enough to slice the YOLO flow calibration and watch how erratic is the sparse infill.

@kisslorand
Copy link
Contributor Author

I think I found the culprit. By reversing PR #9407 the issue goes away.
@elektrohenk can you please take a look? Thank you.

@elektrohenk
Copy link
Contributor

elektrohenk commented May 21, 2025

Hi @kisslorand, This commit results in the described behavior. OrcaSlicer is not very smart in ordering the infill paths efficiently. For (aligned) rectilinear there is a special implementation that results in a more efficient infill path ordering. During implementation of #9407 this behavior was observed and enforced for solid infill. The special implementation however does not respect the infill anchor parameters. It will connect the lines if the parameter "Maximum length of the infill anchor" is higher than 0.05 mm and none at all if lower. You will see the same "fragmented" infill line order if the lines are not connected. Although the behavior/result is different, it obeys the print settings. In order to keep the print time low, would it be acceptable if the special implementation is enforced when "Maximum length of the infill anchor" is equal or higher than the infill line distance?

@kisslorand
Copy link
Contributor Author

kisslorand commented May 21, 2025

@elektrohenk

This commit results in the described behavior.

That commit is responsible for the rectilinear infill type only but the issue is persistent through all the infill type that user straight lines (ex. gyroid is OK).

For (aligned) rectilinear there is a special implementation that results in a more efficient infill path ordering.

Aligned rectilinear infill is borked also.

In order to keep the print time low, would it be acceptable if the special implementation is enforced when "Maximum length of the infill anchor" is equal or higher than the infill line distance?

The print time increase is the result of the issue, not the issue itself. I think everybody would agree that a non-erratic infill path is expected regardless of the settings for the infill anchor (as it was prior to PR #9407).

One pattern I observed though is that at the breakage of the infill path the infill anchor goes the other way, towards the already laid down infill lines, instead of its natural course to continue the infill path. Maybe this helps fixing the problem.

@elektrohenk
Copy link
Contributor

elektrohenk commented May 21, 2025

@kisslorand

That commit is responsible for the rectilinear infill type only but the issue is persistent through all the infill type that user straight lines (ex. gyroid is OK).

Aligned rectilinear infill is borked also.

The print time increase is the result of the issue, not the issue itself. I think everybody would agree that a non-erratic infill path is expected regardless of the settings for the infill anchor (as it was prior to PR #9407).

Show me an example where the infill path became erratic due to #9407 except for rectilinear and aligned rectilinear.

@kisslorand
Copy link
Contributor Author

kisslorand commented May 21, 2025

Image

Image

Image

Image

etc, etc

Later edit: I just checked the above examples and sadly they are broken in previous Orca versions also. So it seems PR #9407 didn't affected others than "Rectilinear" and "Aligned Rectilinear".

@elektrohenk
Copy link
Contributor

Have you done the same with 2.3.0? I'm not able to find different sparse infill path / printing times for sparse infill patterns other than rectilinear and aligned rectilinear between nightly and 2.3.0 using your Cube project.

Image

@kisslorand
Copy link
Contributor Author

I just literally finished editing my previous message while you posted the above.

Later edit: I just checked the above examples and sadly they are broken in previous Orca versions also. So it seems PR #9407 didn't affected others than "Rectilinear" and "Aligned Rectilinear".

@elektrohenk
Copy link
Contributor

Ok, good to agree on that. Now back to possible solutions.

The best solution would be to improve the path optimization. It seems that Fill::connect_infill() is inferior to ShortestPath::chain_polylines(). Suspicious: //FIXME improve the Traveling Salesman problem with 2-opt and 3-opt local optimization. I will quickly look into optimizing the infill path using ShortestPath::chain_polylines() before calling Fill::connect_infill().

Enforcing the "old" method for "Rectilinear" and "Aligned Rectilinear" when "Maximum length of the infill anchor" is long enough seems to be a need quick fix to me, already successfully tested this solution locally.

@kisslorand
Copy link
Contributor Author

kisslorand commented May 21, 2025

While you're at it, it would be just great if you could make all the infill patterns to be optimal (shortest path, shortest time).

@elektrohenk
Copy link
Contributor

elektrohenk commented May 21, 2025

@elektrohenk
Copy link
Contributor

Optimizing the path generation in Fill::connect_infill() will take a while. Therefore I will first improve the path generation for "Rectilinear" and "Aligned Rectilinear" when "Maximum length of the infill anchor" is long enough.

@elektrohenk elektrohenk linked a pull request May 23, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants