mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-07 20:29:01 +08:00
parent
1c23549e6d
commit
b55c4d8e46
@ -27,7 +27,7 @@ class ProcessSlicedObjectListJob(Job):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
|
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
|
||||||
self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0)
|
self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, -1)
|
||||||
self._progress.show()
|
self._progress.show()
|
||||||
|
|
||||||
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
|
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
|
||||||
@ -52,9 +52,6 @@ class ProcessSlicedObjectListJob(Job):
|
|||||||
else:
|
else:
|
||||||
center = numpy.array([0.0, 0.0, 0.0])
|
center = numpy.array([0.0, 0.0, 0.0])
|
||||||
|
|
||||||
if self._progress:
|
|
||||||
self._progress.setProgress(2)
|
|
||||||
|
|
||||||
mesh = MeshData()
|
mesh = MeshData()
|
||||||
layer_data = LayerData.LayerData()
|
layer_data = LayerData.LayerData()
|
||||||
for object in self._message.objects:
|
for object in self._message.objects:
|
||||||
@ -80,14 +77,10 @@ class ProcessSlicedObjectListJob(Job):
|
|||||||
|
|
||||||
layer_data.addPolygon(layer.id, polygon.type, points, polygon.line_width)
|
layer_data.addPolygon(layer.id, polygon.type, points, polygon.line_width)
|
||||||
|
|
||||||
if self._progress:
|
|
||||||
self._progress.setProgress(50)
|
|
||||||
|
|
||||||
# We are done processing all the layers we got from the engine, now create a mesh out of the data
|
# We are done processing all the layers we got from the engine, now create a mesh out of the data
|
||||||
layer_data.build()
|
layer_data.build()
|
||||||
|
|
||||||
if self._progress:
|
|
||||||
self._progress.setProgress(100)
|
|
||||||
|
|
||||||
#Add layerdata decorator to scene node to indicate that the node has layerdata
|
#Add layerdata decorator to scene node to indicate that the node has layerdata
|
||||||
decorator = LayerDataDecorator.LayerDataDecorator()
|
decorator = LayerDataDecorator.LayerDataDecorator()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user