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

Wall Collapse #1187

Closed
wants to merge 2 commits into from
Closed

Wall Collapse #1187

wants to merge 2 commits into from

Conversation

BagelOrb
Copy link
Contributor

When a 3D model has thin/narrow parts the walls might not fit exactly. When the model is just wider than an even number of walls there is a space left: underfill; when the model is narrower than an even number of walls there is overfill.

What Cura currently does is to fill the underfill areas using some dense lines pattern, which is then combined into a single extrusion line with adaptive width. (Note that this combining algorithm fails quite often, currently!)
What Cura currently does to deal with the overfill is to compensate the overlap and extrude less on the second pass.

However, the compensation approach is limited. If the overlap gets above 75% of the line width, the second pass is reduces to less than 25% flow, which makes the extrusion unreliable.

Instead we can simply avoid such overfill, by performing a mathematical closure operation on the walls. If walls are too close to each other they collapse and are removed. The resulting gap is then handled as overfill and is filled using the Gaps Between Walls settings.

This PR makes the above possible. I would recommend setting the default value to something like half the line width, were it not for the buggy perimeter gap combine algorithm, which currently produces quite horrible output. See images below.

If you set the collapse distance to the line width, ideally the (currently buggy) combining code should produce an extrusion line up to twice the normal width, which is quite wide. Therefore setting it to 50% would be better, since it would only require lines of 150% the normal size.

Because the current perimeter gap combining code is so buggy I left the default at 0, which means the default Cura behavior remains unchanged: The inter-perimeter gaps are filled using lines up to 100% the wall line width.

set to zero: (normal)
image

Set to half line width:
image

set to line width:
image

@Ghostkeeper
Copy link
Collaborator

We currently have a setting called Minimum Wall Flow for this problem. Do you think this approach is better than Minimum Wall Flow?

@BagelOrb
Copy link
Contributor Author

Yes. Imagine a model which is 0.401 mm thick. It would be better to lay down a single line than to go over it twice and enforce the second time to not extrude. The minimum wall flow introduces unneeded travels.

@Ghostkeeper
Copy link
Collaborator

Instead, with this feature it would not print the wall at all though.

@BagelOrb
Copy link
Contributor Author

That's because print thin walls is not enabled.

@Ghostkeeper
Copy link
Collaborator

We're going to reject this pull request. I'm sorry. Minimum Wall Flow indeed introduces unneeded travels, but so does Print Thin Walls and Fill Gaps Between Walls to then print the part of the wall that got missing. Maybe Print Thin Walls will be more efficient with the travel moves since it can optimize the thin parts all together, but maybe not because it does a second pass over everything then.

But the real reason is that the use case of this feature would get quickly superseded by Arachne, a result of us being so slow to process these... relative to the effort put into the Arachne algorithms.

@Ghostkeeper Ghostkeeper deleted the avoid_wall_overlap branch August 14, 2020 15:59
@BagelOrb
Copy link
Contributor Author

Yeah exactly. It's superseded by Arachne.

Still has quite a way to go, though.

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.

2 participants