Whatever was intended here, it didn't work. Because when a method is called it is called on the class of the object. Methods are not attributes of instances but attributes of the class. The attribute of the class was never changed, so this had no effect.
Contributes to issue CURA-5330.
several instances need to be created.
- In the ThreeMFWorkspaceReader we need to create some temporal
instances of Preferences that makes it not singleton anymore.
- The current preferences are kept in the Application class and so all
the calls to the preferences are changed to get the preferences from
Application.
- The method getInstance in Preferences is kept as deprecated since some
external plugins.
Rather than trying to retrieve from the g-code what the position was that it was originally sliced. It was trying to find whether it was sliced for a printer with center_is_zero by seeing if there are any negative coordinates in the g-code, which was faulty. Now we don't even try to do that any more. We just find where the print would end up if it were printed with the currently selected printer.
Contributes to issue CURA-5068 and fixes#3634.
The gcode reader assumed that each layer starts with a move to the initial position but
for spiralized code that isn't true because the previous layer always ends up in the right
location. So we now start each layer with a fake move to the end position of the previous layer.
This won't actually cause a real move to occur but it ensures that the first line segment
in the new layer has the correct initial point.
CURA-4741
With the multi build plate feature, scene.gcode_list is now a dict which
stores a list of gcode for a build plate, so it makes more sense to have
it renamed to "gcode_dict" because it's not a list.