Ultimaker / CuraEngine

Powerful, fast and robust engine for converting 3D models into g-code instructions for 3D printers. It is part of the larger open source project Cura.
https://ultimaker.com/en/products/cura-software
GNU Affero General Public License v3.0
1.69k stars 887 forks source link

Improve handling of small areas #2089

Closed ThomasRahm closed 5 months ago

ThomasRahm commented 5 months ago

Description

I looked into the issue https://github.com/Ultimaker/Cura/issues/18397 and would be interested in feedback regarding the following opinions:

  1. WallToolPaths::removeSmallLines should not remove outer walls. By my understanding it was added to prevent very small lines filling holes. An outer wall will never fill a hole.
  2. In SkeletalTrapezoidation there is no functional difference between a single local maxima or multiple very close to each other. If the resulting outer wall path is so short that it not even reaches its own width, maybe it would be better to combine all these local maxima into a single one and handle it accordingly.

I am not convinced that this is the correct way to fix it, as I think arachne should not even generate such to small paths, even if the graph consists of multiple local maxima close to each other. I just want to highlight one possible solution to avoid completely missing areas.

Type of change

How Has This Been Tested?

Checklist:

rburema commented 5 months ago

Hi @ThomasRahm ! --

What a coincidence, we where just about to address this issue ourselves (given the excellent writeup @casperlamboo made, it seemed at least doable...)

In any case, thanks for another contribution :-)

I am not convinced that this is the correct way to fix it, as I think arachne should not even generate such to small paths, even if the graph consists of multiple local maxima close to each other.

That's debatable. In any case, fixing that would take a lot of time and/or introduce a lot more uncertainty -- not something we can handle with the currently (hopefully temporarily) reduced Cura-'core'-team (or at least not without pausing a lot of other things for a long time).

Even if this can be considered a hack, it's built on top of an existing one that's already in the code. As such, I think it does a lot more good than harm, given the results I'm seeing.

I've just made a few very small cosmetic changes, and I think I can just send this off as the current bugfix for this particular issue. (One of the very few things still bothering me slightly, is that the circle doesn't adhere to the original shape, but the solution in place before didn't do that either...)