Skip to content
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

Infill strategy for solid layers performs unnecessary travel moves #3492

Open
DrLex0 opened this issue Sep 3, 2016 · 8 comments
Open

Infill strategy for solid layers performs unnecessary travel moves #3492

DrLex0 opened this issue Sep 3, 2016 · 8 comments

Comments

@DrLex0
Copy link

DrLex0 commented Sep 3, 2016

Version

1.2.9

Operating system type + version

Mac OS X 10.11.6

Behavior

The rectilinear infill of solid (top and bottom) layers is often needlessly executed in two or more phases, causing the nozzle to travel across the layer and marring the top infill.
One would expect that for a simple ellipse, the infill would begin nearest to a tangent line, and go to the other end in one continous stretch. However, the following diagram shows what Slic3r does for the top layer of the attached ‘top hat’ model:
tophat_slice
hat

After doing the perimeters, it begins the infill at the fourth line from the left. When it has reached the right edge, it zaps across the layer and extrudes the three remaining lines. The travel move is visible in the photo. Of course I could enable Z lift during retraction, but that would only be a workaround.

Here is another example with a simple elliptical cylinder:
cylinder_slice
Although the infill is now done from left to right, it still is interrupted by a travel move that causes two lines to be extruded in the same direction.

STL/Config (.ZIP) where problem occurs

Tophat.zip

@JeffreyRodriguez
Copy link

JeffreyRodriguez commented Nov 25, 2016

I was digging into related unnecessary moves before the CPP port, and it doesn't seem to have changed much during the port.

The relevant code is in the for-loop at libslic3r/Fill/FillRectilinear.cpp:101

From my reading:

  1. A pattern of disconnected infill lines is laid over the model's bounding box. (think stripes)
  2. The current-layer slice of the model is intersected with those lines, cutting many of them, creating lots of shorter lines.
  3. The resulting list of lines is joined, end-to-end, into long chains, if they satisfy certain proximity requirements. (can_connect)
  4. Certain joins will send the printhead off far away, or can paint shorter chains into corners. Many of these 'islands' of infill chains could be joined together with some clever splicing.

Thinking over the problem, I was attracted to a post-processing step. Look for islands and see if they can be linked back into a continuous chain. This could greatly reduce unnecessary travel for a whole lot of prints out there.

Edit: Thinking about it some more, that's exactly the right metaphor - this algorithm regularly paints itself into corners.

@bubnikv
Copy link
Contributor

bubnikv commented Nov 26, 2016 via email

@bubnikv
Copy link
Contributor

bubnikv commented Jan 27, 2017

Thinking about it once again, the infill continuity could be improved in the new rectilinear2 infill by extending the infill line at both sides. Currently my code extends the infill line at a single end only.

@JeffreyRodriguez
Copy link

For large complex parts, connecting infill lines would go a long way - In the old version I noticed a lot of <retract, lift, move, restart> operations that could have been contiguous.

If rectilinear2 has improved half of that, it might go a long way to finish the other half. I still need to get round to running a dev build of Slic3r personally - Still on 1.2.9 release.

@lordofhyphens
Copy link
Member

@JeffreyRodriguez On Windows, there's currently the bintray builds, which replaced rectilinear with rectilinear2.

@JeffreyRodriguez
Copy link

@lordofhyphens - Alas - Linux :)

I'm also running into a problem that segfaults unless I disable the plater - but that's literally another issue.

@lordofhyphens
Copy link
Member

@JeffreyRodriguez Really? Weird. I do my dev work on linux. Feel free to open up a new issue, but my gut feeling is "disable background processing and see what happens".

@lordofhyphens
Copy link
Member

lordofhyphens commented Jan 27, 2017

@JeffreyRodriguez https://bintray.com/lordofhyphens/Slic3r/download_file?file_path=slic3r.zip if you want to give it a try (I just did a one-off package from my dev system, no guarantees if it doesn't work ^^;)

Was built on a Debian Linux system with perl 5.20.2, 64-bit.

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

No branches or pull requests

4 participants