prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.68k stars 1.93k forks source link

Thin wall torture test #1723

Open wavexx opened 5 years ago

wavexx commented 5 years ago

Version

282ef552f9111583dc9bcfba641ecd41c74353ff

Behavior

There are several issues when generating perimeters on "thin" walls. I experienced a few and commented on #1389 as well. I was able to generate a torture test model. These show up when doing mechanical parts that have the nozzle size in mind. As will be evident, "detect thin walls" is not a panacea.

The test case is designed for a 0.2 layer height, 0.4 nozzle.

The model includes 5 rows that have a common minimum width, with 5 columns containing 5 test cases. The rows have the following minimum widths: 0.4, 0.8, 0.86, 1.2, 1.26mm. 0.86 and 1.26 are the values suggested by slic3r for this nozzle/layer height, which I honestly never use ;)

The first 2 columns are wedges with a 1.2 and 0.4 vertical wall. The minimum width of the vertical wall is calculated as above. The third column is simply going through a minimum width. The fourth column is just a plain vertical wall. The fifth is a 0.5 rho conic going from vertical to horizontal intended to stress all orientations.

Let's go through the problems. Current slic3r on master with 0.4 nozzle, 0.2 layer height, thin walls detection off:

2019-01-27t213838

Same configuration with "thin walls" detection on:

2019-01-27t214915

Now things get even more interesting:

2019-01-27t215752

The first and third wedge with the 0.4 walls are missing, although the vertical wall and the conic are both correctly generated.

The wedges show a problem which is common to all cases where small features share a "thin" wall. Slic3r favors the perimeters of the small areas and fill the remaining thin walls independently (if at all).

I consider this to be bad behavior, as it causes more retractions and travels where a single perimeter (starting and ending at the stricture) would have done and resulted in a stronger structural part in all 3 cases.

I know @supermerill has done some work in #1028 and can maybe test this model.

STL/Config (.ZIP) where problem occurs

walltorture.zip

supermerill commented 5 years ago

you forgot to link your settings

here with my version: tor

wavexx commented 5 years ago

The settings are the stock "0.2 FAST" for the MK3 in this case. Your results are way better than the current master.

Since we're here, can I point out some possible improvements?

51808889-ac262600-229a-11e9-9da2-3d7659627157 png

Would it be possible to connect the perimeters of the wedges in the order as shown above? The order/direction doesn't matter much, however as I wrote before, it would be very helpful to fill the line connecting 2-3 in a single pass. When there are multiple small features connected by a shared wall, the shared wall should be preferred. I don't know how internally the perimeter generation works, but maybe favoring segments that result in longer walls would work?

If that little line gap is filled alone, it often results in a part which is not as strong and with visible artifacts on the exterior.

I also notice there's an extra cusp (outlined with the circle) in all the corner of the wedges. Is this intentional?

supermerill commented 5 years ago

Would it be possible to connect the perimeters of the wedges in the order as shown above? The order/direction doesn't matter much, however as I wrote before, it would be very helpful to fill the line connecting 2-3 in a single pass.

Not possible, thin walls are printed after all perimeter to ensure there are something to anchor them. Changing the logic for this very corner case isn't worth the hassle for my free time. Internally, there are the perimeters in an array, stored as loop and there are an other array of thin walls.

If that little line gap is filled alone, it often results in a part which is not as strong and with visible artifacts on the exterior.

I anchored them more deeply, hoping it resolve the issue.

I also notice there's an extra cusp (outlined with the circle) in all the corner of the wedges. Is this intentional?

yes, there are a tiny pointy bit that could be extruded as thin wall. The tip is larger than the reality because we are limited by the extruder nozzle size. In my proposal, i added recently a new parameter that let us say "what is the min width to takes into account". If this is smaller than the nozzle (default to 33% of the nozzle size), the very thin areas will be over-extruded a bit.

Here, the algorithm say "hey, the perimeter have let a big enough area to be filled by a thin wall!" and he succeed to create something big enough to pass the filters.

mdealer commented 5 years ago

I also think it's a bug. Nearly every model I print contains some area where Slic3r (sorry for exaggerations, but I'm done hoping for the best) craps out and does 20+ retractions and unnecessary moves to fill some uninteresting gaps. This causes multiple tiny extrusions with huge retractions inbetween, needless to say this causes weird behavior on some configurations with low extruder steps per mm.

This part needs some major refactoring. Something like dynamic extrusion width to produce sharper corners etc instead of filling tiny gaps with 50 travel moves afterwards.

wavexx commented 5 years ago

On Sat, Mar 30 2019, Edgars Batna wrote:

This part needs some major refactoring. Something like dynamic extrusion width to produce sharper corners etc instead of filling tiny gaps afterwards.

Overall this is an area where Cura fares a bit better. The outer perimeter becomes a single contour in this torture test. Cura is also more keen to use variable extrusion width. But Cura is not a panacea either: I have a long list of issues with it as well (notably, infill is always weak).

For instance, I would personally consider filling the cusps I outlined before a bug: they always result in sharp and uneven fills. If you're printing a screw-like structure, or a slanted corner, for example, they will make the edge totally unusable. This is one of the reasons you often need to toggle "detect thin walls".

rennne commented 5 years ago

Gap fill behaves inconsistent with the same structures at different angles

The picture shows a part of a inverse tooth wheel, all teeth are the same some are filled and others are not. The only difference between them is the angle.

image