Improve algorithm to remove close nodes
Improve algorithm to remove close nodes

We now delete nodes on the INSIDE of the tree instead of leaves. These are much more numerous and safer to delete since they are surrounded by other nodes that would generate a circle there anyway.

Contributes to issue CURA-4523.

Ultimaker/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,alephobjects/CuraEngine,Ultimaker/CuraEngine,ROBO3D/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine