mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add deprecated tag to arranger
CURA-7440
This commit is contained in:
parent
a1f43e7bcf
commit
9312dc5c07
3 changed files with 7 additions and 7 deletions
|
@ -2,6 +2,7 @@
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from UM.Decorators import deprecated
|
||||||
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
||||||
from UM.Logger import Logger
|
from UM.Logger import Logger
|
||||||
from UM.Math.Polygon import Polygon
|
from UM.Math.Polygon import Polygon
|
||||||
|
@ -20,6 +21,7 @@ LocationSuggestion = namedtuple("LocationSuggestion", ["x", "y", "penalty_points
|
||||||
"""Return object for bestSpot"""
|
"""Return object for bestSpot"""
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated("Use the functions in Nest2dArrange instead", "4.8")
|
||||||
class Arrange:
|
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
|
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._last_priority = 0
|
||||||
self._is_empty = True
|
self._is_empty = True
|
||||||
|
|
||||||
|
@deprecated("Use the functions in Nest2dArrange instead", "4.8")
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, scene_root = None, fixed_nodes = None, scale = 0.5, x = 350, y = 250, min_offset = 8) -> "Arrange":
|
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
|
"""Helper to create an :py:class:`cura.Arranging.Arrange.Arrange` instance
|
||||||
|
@ -101,6 +104,7 @@ class Arrange:
|
||||||
|
|
||||||
self._last_priority = 0
|
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:
|
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)
|
"""Find placement for a node (using offset shape) and place it (using hull shape)
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,7 @@ from cura.API.Account import Account
|
||||||
from cura.Arranging.Arrange import Arrange
|
from cura.Arranging.Arrange import Arrange
|
||||||
from cura.Arranging.ArrangeObjectsAllBuildPlatesJob import ArrangeObjectsAllBuildPlatesJob
|
from cura.Arranging.ArrangeObjectsAllBuildPlatesJob import ArrangeObjectsAllBuildPlatesJob
|
||||||
from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob
|
from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob
|
||||||
from cura.Arranging.ShapeArray import ShapeArray
|
from cura.Arranging.Nest2DArrange import arrange
|
||||||
from cura.Arranging.Nest2DArrange import findNodePlacement, arrange
|
|
||||||
from cura.Machines.MachineErrorChecker import MachineErrorChecker
|
from cura.Machines.MachineErrorChecker import MachineErrorChecker
|
||||||
from cura.Machines.Models.BuildPlateModel import BuildPlateModel
|
from cura.Machines.Models.BuildPlateModel import BuildPlateModel
|
||||||
from cura.Machines.Models.CustomQualityProfilesDropDownMenuModel import CustomQualityProfilesDropDownMenuModel
|
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..."))
|
self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing build volume..."))
|
||||||
root = self.getController().getScene().getRoot()
|
root = self.getController().getScene().getRoot()
|
||||||
self._volume = BuildVolume.BuildVolume(self, root)
|
self._volume = BuildVolume.BuildVolume(self, root)
|
||||||
|
|
||||||
|
# Ensure that the old style arranger still works.
|
||||||
Arrange.build_volume = self._volume
|
Arrange.build_volume = self._volume
|
||||||
|
|
||||||
# initialize info objects
|
# initialize info objects
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
import copy
|
import copy
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from PyQt5.QtCore import QCoreApplication
|
|
||||||
|
|
||||||
from UM.Job import Job
|
from UM.Job import Job
|
||||||
from UM.Math.Matrix import Matrix
|
from UM.Math.Matrix import Matrix
|
||||||
from UM.Math.Quaternion import Quaternion
|
from UM.Math.Quaternion import Quaternion
|
||||||
|
@ -21,9 +19,6 @@ from cura.Arranging.Nest2DArrange import findNodePlacement
|
||||||
|
|
||||||
i18n_catalog = i18nCatalog("cura")
|
i18n_catalog = i18nCatalog("cura")
|
||||||
|
|
||||||
from cura.Arranging.Arrange import Arrange
|
|
||||||
from cura.Arranging.ShapeArray import ShapeArray
|
|
||||||
|
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
|
from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue