Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cura/Arranging/Arrange.py4
-rwxr-xr-xcura/CuraApplication.py5
-rw-r--r--cura/MultiplyObjectsJob.py5
3 files changed, 7 insertions, 7 deletions
diff --git a/cura/Arranging/Arrange.py b/cura/Arranging/Arrange.py
index c9d3498c7b..efc8b8dd5c 100644
--- a/cura/Arranging/Arrange.py
+++ b/cura/Arranging/Arrange.py
@@ -2,6 +2,7 @@
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
+from UM.Decorators import deprecated
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
from UM.Logger import Logger
from UM.Math.Polygon import Polygon
@@ -20,6 +21,7 @@ LocationSuggestion = namedtuple("LocationSuggestion", ["x", "y", "penalty_points
"""Return object for bestSpot"""
+@deprecated("Use the functions in Nest2dArrange instead", "4.8")
class Arrange:
"""
The Arrange classed is used together with :py:class:`cura.Arranging.ShapeArray.ShapeArray`. Use it to find good locations for objects that you try to put
@@ -44,6 +46,7 @@ class Arrange:
self._last_priority = 0
self._is_empty = True
+ @deprecated("Use the functions in Nest2dArrange instead", "4.8")
@classmethod
def create(cls, scene_root = None, fixed_nodes = None, scale = 0.5, x = 350, y = 250, min_offset = 8) -> "Arrange":
"""Helper to create an :py:class:`cura.Arranging.Arrange.Arrange` instance
@@ -101,6 +104,7 @@ class Arrange:
self._last_priority = 0
+ @deprecated("Use the functions in Nest2dArrange instead", "4.8")
def findNodePlacement(self, node: SceneNode, offset_shape_arr: ShapeArray, hull_shape_arr: ShapeArray, step = 1) -> bool:
"""Find placement for a node (using offset shape) and place it (using hull shape)
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py
index a6e37e6f09..a9555a6608 100755
--- a/cura/CuraApplication.py
+++ b/cura/CuraApplication.py
@@ -52,8 +52,7 @@ from cura.API.Account import Account
from cura.Arranging.Arrange import Arrange
from cura.Arranging.ArrangeObjectsAllBuildPlatesJob import ArrangeObjectsAllBuildPlatesJob
from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob
-from cura.Arranging.ShapeArray import ShapeArray
-from cura.Arranging.Nest2DArrange import findNodePlacement, arrange
+from cura.Arranging.Nest2DArrange import arrange
from cura.Machines.MachineErrorChecker import MachineErrorChecker
from cura.Machines.Models.BuildPlateModel import BuildPlateModel
from cura.Machines.Models.CustomQualityProfilesDropDownMenuModel import CustomQualityProfilesDropDownMenuModel
@@ -802,6 +801,8 @@ class CuraApplication(QtApplication):
self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing build volume..."))
root = self.getController().getScene().getRoot()
self._volume = BuildVolume.BuildVolume(self, root)
+
+ # Ensure that the old style arranger still works.
Arrange.build_volume = self._volume
# initialize info objects
diff --git a/cura/MultiplyObjectsJob.py b/cura/MultiplyObjectsJob.py
index 4ab0ab1e3f..f35d95c2cb 100644
--- a/cura/MultiplyObjectsJob.py
+++ b/cura/MultiplyObjectsJob.py
@@ -4,8 +4,6 @@
import copy
from typing import List
-from PyQt5.QtCore import QCoreApplication
-
from UM.Job import Job
from UM.Math.Matrix import Matrix
from UM.Math.Quaternion import Quaternion
@@ -21,9 +19,6 @@ from cura.Arranging.Nest2DArrange import findNodePlacement
i18n_catalog = i18nCatalog("cura")
-from cura.Arranging.Arrange import Arrange
-from cura.Arranging.ShapeArray import ShapeArray
-
from UM.Application import Application
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation