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.68k stars 882 forks source link

[CURA-11424] Fix fractional support-layers applied to often. #2047

Closed rburema closed 6 months ago

rburema commented 6 months ago

Get fractional support from model-overhang instead of layer above.

The detection of where fractional support layers (where the z-distance between model and support was a fractional value compared to support-layer-height) where supposed to be was handled by looking at the internal structure of the support layers itself, rather than where it's actually needed. This fix replaces the previous method, which looked at if the layer above this one had support, and if not, assumed that the gap with the model must be directly above it (this was originally done both for performance reasons, and making it less dependent on the model and thus more encapsulated) -- but this has proven to be a mistake, given how many problems it introduces.`

The new method instead queries the meshes directly for the overhang. Otherwise, any gap between two layers of support would introduce new 'fractional support layers', which aren't supposed to be in those places.