mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 13:49:39 +08:00
Revert "Avoid zero thickness to be shown in layer view."
I saw that with these changes, Cura crashes when loading a GCode. This reverts commit 8dd21892d33277bec88895393f992b612b7af526.
This commit is contained in:
parent
8dd21892d3
commit
cc89ddf5f7
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018 Ultimaker B.V.
|
# Copyright (c) 2017 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -344,7 +344,7 @@ class SimulationView(View):
|
|||||||
self._max_feedrate = max(float(p.lineFeedrates.max()), self._max_feedrate)
|
self._max_feedrate = max(float(p.lineFeedrates.max()), self._max_feedrate)
|
||||||
self._min_feedrate = min(float(p.lineFeedrates.min()), self._min_feedrate)
|
self._min_feedrate = min(float(p.lineFeedrates.min()), self._min_feedrate)
|
||||||
self._max_thickness = max(float(p.lineThicknesses.max()), self._max_thickness)
|
self._max_thickness = max(float(p.lineThicknesses.max()), self._max_thickness)
|
||||||
self._min_thickness = min(float(p.lineThicknesses[numpy.nonzero(p.lineThicknesses)].min()), self._min_thickness)
|
self._min_thickness = min(float(p.lineThicknesses.min()), self._min_thickness)
|
||||||
if max_layer_number < layer_id:
|
if max_layer_number < layer_id:
|
||||||
max_layer_number = layer_id
|
max_layer_number = layer_id
|
||||||
if min_layer_number > layer_id:
|
if min_layer_number > layer_id:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018 Ultimaker B.V.
|
# Copyright (c) 2017 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty
|
from PyQt5.QtCore import QObject, pyqtSignal, pyqtProperty
|
||||||
@ -117,7 +117,7 @@ class SimulationViewProxy(QObject):
|
|||||||
def setSimulationViewType(self, layer_view_type):
|
def setSimulationViewType(self, layer_view_type):
|
||||||
active_view = self._controller.getActiveView()
|
active_view = self._controller.getActiveView()
|
||||||
if isinstance(active_view, SimulationView.SimulationView.SimulationView):
|
if isinstance(active_view, SimulationView.SimulationView.SimulationView):
|
||||||
active_view.setSimulationViewType(layer_view_type)
|
active_view.setSimulationViewisinstance(layer_view_type)
|
||||||
|
|
||||||
@pyqtSlot(result=int)
|
@pyqtSlot(result=int)
|
||||||
def getSimulationViewType(self):
|
def getSimulationViewType(self):
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2018 Ultimaker B.V.
|
# Copyright (c) 2017 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from PyQt5.QtQml import qmlRegisterSingletonType
|
from PyQt5.QtQml import qmlRegisterSingletonType
|
||||||
@ -18,7 +18,7 @@ def getMetaData():
|
|||||||
}
|
}
|
||||||
|
|
||||||
def createSimulationViewProxy(engine, script_engine):
|
def createSimulationViewProxy(engine, script_engine):
|
||||||
return SimulationViewProxy.SimulationViewProxy()
|
return SimulationViewProxy.SimulatorViewProxy()
|
||||||
|
|
||||||
def register(app):
|
def register(app):
|
||||||
simulation_view = SimulationView.SimulationView()
|
simulation_view = SimulationView.SimulationView()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user