Fix possible segfault due to accessing deleted TopSurface
CURA-4702
Some SliceLayers can be deleted during removeEmptyFirstLayers() which
will delete the TopSurfaces in those SliceLayers too. This is done in
a vector.erase() call, and it will move the undeleted SliceLayers back
to the front. Because TopSurface is a pointer in SliceLayers, in the
reconstructed SliceLayer vector, although they keep the same TopSurface
pointers as before, the actual TopSurface memory blocks were deallocated.
This can cause segfauls when ironing gets processed.
dbd0d61...
by
Diego Prado Gesto <email address hidden>
- Rename the variable to "minimum_zag_line_length"
- Added a constant for the default value "5" for minimum_zag_line_length
- Added more documentation
- Simplified a few things
Originally the choice of walls was to make the extra wall print slower. However that didn't work because the skin lines themselves don't attach well to the extra line. Now let's try this.