mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +08:00
Ignore some active machine changes since we need to port code
This commit is contained in:
parent
5637c9ad94
commit
4d4192d6d6
@ -461,26 +461,28 @@ class CuraApplication(QtApplication):
|
||||
def _onActiveMachineChanged(self):
|
||||
machine = self.getMachineManager().getActiveMachineInstance()
|
||||
if machine:
|
||||
pass
|
||||
#Preferences.getInstance().setValue("cura/active_machine", machine.getName())
|
||||
|
||||
self._volume.setWidth(machine.getSettingValueByKey("machine_width"))
|
||||
self._volume.setHeight(machine.getSettingValueByKey("machine_height"))
|
||||
self._volume.setDepth(machine.getSettingValueByKey("machine_depth"))
|
||||
#self._volume.setWidth(machine.getSettingValueByKey("machine_width"))
|
||||
#self._volume.setHeight(machine.getSettingValueByKey("machine_height"))
|
||||
#self._volume.setDepth(machine.getSettingValueByKey("machine_depth"))
|
||||
|
||||
disallowed_areas = machine.getSettingValueByKey("machine_disallowed_areas")
|
||||
areas = []
|
||||
if disallowed_areas:
|
||||
for area in disallowed_areas:
|
||||
areas.append(Polygon(numpy.array(area, numpy.float32)))
|
||||
#disallowed_areas = machine.getSettingValueByKey("machine_disallowed_areas")
|
||||
#areas = []
|
||||
#if disallowed_areas:
|
||||
#for area in disallowed_areas:
|
||||
#areas.append(Polygon(numpy.array(area, numpy.float32)))
|
||||
|
||||
self._volume.setDisallowedAreas(areas)
|
||||
#self._volume.setDisallowedAreas(areas)
|
||||
|
||||
self._volume.rebuild()
|
||||
#self._volume.rebuild()
|
||||
|
||||
offset = machine.getSettingValueByKey("machine_platform_offset")
|
||||
if offset:
|
||||
self._platform.setPosition(Vector(offset[0], offset[1], offset[2]))
|
||||
else:
|
||||
self._platform.setPosition(Vector(0.0, 0.0, 0.0))
|
||||
#offset = machine.getSettingValueByKey("machine_platform_offset")
|
||||
#if offset:
|
||||
#self._platform.setPosition(Vector(offset[0], offset[1], offset[2]))
|
||||
#else:
|
||||
#self._platform.setPosition(Vector(0.0, 0.0, 0.0))
|
||||
|
||||
def _onFileLoaded(self, job):
|
||||
node = job.getResult()
|
||||
|
@ -176,6 +176,7 @@ class PrintInformation(QObject):
|
||||
self._slice_reason = None
|
||||
|
||||
def _onActiveMachineChanged(self):
|
||||
return
|
||||
if self._current_settings:
|
||||
self._current_settings.settingChanged.disconnect(self._onSettingChanged)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user