Now it produces this result on top layer when extra perimeters are enabled:
(2 perimeters + extra)
May be somehow related to #2610
Don't trigger extra perimeters when less than 30% of the upper loops …
…would benefit from it. #2664. Also fixes #2610
Thank you, fixed! I hope is much more robust now.
Seems fixed for this model, thanks, but "30%" logic will most probably fail on some other tricky case.
Let's see… the threshold itself might change (40%? 50%?) but I think the logic is robust… I couldn't find any other geometric definition of extra perimeters. They're very very tricky to define
IMO, the term itself is a bit ambiguous.
This feature, as I understand it, appeared as an attempt to cover the unsightly infill overlap/overextrusion so that it won't be visible from above.
If I were the one implementing the logic, I would have done it like that:
0) Assume there's a layer below the current one which has P perimeters.
Of course, in case vertical extrusions are present, the problem would be exactly the same as in this issue. In this case, the more proper solution seems to be:
Tuning your N or the area delta threshold is the same as my 30% :-)
The algorithmic problem is that your upper layer might be much smaller or it might have a very different shape from the lower one, but in case a part of its contour would benefit from an extra lower perimeter we need to check whether it's worth or not. Adding one or more extra perimeters just for hiding a very small quantity of infill endpoints is not worth. This is why the current logic only does that if the two layers share at least 30% of their shape… Maybe this 30% should even become 50%, but I'll wait for test cases...
Anyway, in case this actually backfires, there can be a workaround: use a maximum extra perimeters threshold (instead of the magic X%).
once again - You did introduce very nice variable, but You are somehow reluctant to put it into EXPERT options :) it would fit VERY nicely on right side of the 'extra perimeters if needed' as simply 'threshold' with some nice hint :)
I think the setting will greatly depend on layer height users try to print with and how badly they need their model being watertight from the top (in case of models which are subjected to weathering outside - rain, snow, etc - this is actually usefull) or how much plastic they want to save .
also for very big, complex, or 'production' models this variable could be used like many other from modifier options , allowing to set different thresholds for different parts of model...
note that triggering extra perimeters is performed per layer and not per loop logic, which further complicates things - small loop with big overhang may trigger extra perimeter for large loop without one - or big loop might prevent small loop from getting extra perimeter. both cases might be undesirable . while providing variable will not prevent such border cases to fail, it at least provides user with some way to work-around the problem.