mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:29:00 +08:00
Merge branch 'main' into CURA-11622_conan_v2
This commit is contained in:
commit
8755e2ae2e
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
<div align = center>
|
<div align = center>
|
||||||
|
|
||||||
|
# ⚠️ ⚠️ On 03-12-2024, we will start merging branches on all the Cura-related repositories, that contain a migration of our Conan recipes to use Conan 2, and also a huge rework on many GitHub workflows. Unfortunately, we cannot test everything until it is merged, so it is very likely that some existing workflows will stop working. If you are a developer, you may also encounter troubles when updating your branches or updating your Conan dependencies. This message will be removed when the situation is stable enough. After that, please open new issues if you are still in trouble with the new recipes/workflows. Sorry for the inconvenience. ⚠️ ⚠️
|
||||||
|
|
||||||
[![Badge Issues]][Issues]
|
[![Badge Issues]][Issues]
|
||||||
[![Badge PullRequests]][PullRequests]
|
[![Badge PullRequests]][PullRequests]
|
||||||
[![Badge Closed]][Closed]
|
[![Badge Closed]][Closed]
|
||||||
|
@ -222,12 +222,11 @@ class SimulationView(CuraView):
|
|||||||
|
|
||||||
self.setPath(i + fractional_value)
|
self.setPath(i + fractional_value)
|
||||||
|
|
||||||
def advanceTime(self, time_increase: float) -> bool:
|
def advanceTime(self, time_increase: float) -> None:
|
||||||
"""
|
"""
|
||||||
Advance the time by the given amount.
|
Advance the time by the given amount.
|
||||||
|
|
||||||
:param time_increase: The amount of time to advance (in seconds).
|
:param time_increase: The amount of time to advance (in seconds).
|
||||||
:return: True if the time was advanced, False if the end of the simulation was reached.
|
|
||||||
"""
|
"""
|
||||||
total_duration = 0.0
|
total_duration = 0.0
|
||||||
if len(self.cumulativeLineDuration()) > 0:
|
if len(self.cumulativeLineDuration()) > 0:
|
||||||
@ -237,15 +236,13 @@ class SimulationView(CuraView):
|
|||||||
# If we have reached the end of the simulation, go to the next layer.
|
# If we have reached the end of the simulation, go to the next layer.
|
||||||
if self.getCurrentLayer() == self.getMaxLayers():
|
if self.getCurrentLayer() == self.getMaxLayers():
|
||||||
# If we are already at the last layer, go to the first layer.
|
# If we are already at the last layer, go to the first layer.
|
||||||
self.setTime(total_duration)
|
self.setLayer(0)
|
||||||
return False
|
else:
|
||||||
|
|
||||||
# advance to the next layer, and reset the time
|
# advance to the next layer, and reset the time
|
||||||
self.setLayer(self.getCurrentLayer() + 1)
|
self.setLayer(self.getCurrentLayer() + 1)
|
||||||
self.setTime(0.0)
|
self.setTime(0.0)
|
||||||
else:
|
else:
|
||||||
self.setTime(self._current_time + time_increase)
|
self.setTime(self._current_time + time_increase)
|
||||||
return True
|
|
||||||
|
|
||||||
def cumulativeLineDuration(self) -> List[float]:
|
def cumulativeLineDuration(self) -> List[float]:
|
||||||
# Make sure _cumulative_line_duration is initialized properly
|
# Make sure _cumulative_line_duration is initialized properly
|
||||||
|
@ -144,9 +144,7 @@ Item
|
|||||||
{
|
{
|
||||||
// divide by 1000 to account for ms to s conversion
|
// divide by 1000 to account for ms to s conversion
|
||||||
const advance_time = simulationTimer.interval / 1000.0;
|
const advance_time = simulationTimer.interval / 1000.0;
|
||||||
if (!UM.SimulationView.advanceTime(advance_time)) {
|
UM.SimulationView.advanceTime(advance_time);
|
||||||
playButton.pauseSimulation();
|
|
||||||
}
|
|
||||||
// The status must be set here instead of in the resumeSimulation function otherwise it won't work
|
// The status must be set here instead of in the resumeSimulation function otherwise it won't work
|
||||||
// correctly, because part of the logic is in this trigger function.
|
// correctly, because part of the logic is in this trigger function.
|
||||||
isSimulationPlaying = true;
|
isSimulationPlaying = true;
|
||||||
|
@ -54,9 +54,9 @@ class SimulationViewProxy(QObject):
|
|||||||
def currentPath(self):
|
def currentPath(self):
|
||||||
return self._simulation_view.getCurrentPath()
|
return self._simulation_view.getCurrentPath()
|
||||||
|
|
||||||
@pyqtSlot(float, result=bool)
|
@pyqtSlot(float)
|
||||||
def advanceTime(self, duration: float) -> bool:
|
def advanceTime(self, duration: float) -> None:
|
||||||
return self._simulation_view.advanceTime(duration)
|
self._simulation_view.advanceTime(duration)
|
||||||
|
|
||||||
@pyqtProperty(int, notify=currentPathChanged)
|
@pyqtProperty(int, notify=currentPathChanged)
|
||||||
def minimumPath(self):
|
def minimumPath(self):
|
||||||
|
@ -109,6 +109,9 @@ UM.PreferencesPage
|
|||||||
UM.Preferences.resetPreference("general/restore_window_geometry")
|
UM.Preferences.resetPreference("general/restore_window_geometry")
|
||||||
restoreWindowPositionCheckbox.checked = boolCheck(UM.Preferences.getValue("general/restore_window_geometry"))
|
restoreWindowPositionCheckbox.checked = boolCheck(UM.Preferences.getValue("general/restore_window_geometry"))
|
||||||
|
|
||||||
|
UM.Preferences.resetPreference("tool/flip_y_axis_tool_handle")
|
||||||
|
flipToolhandleYCheckbox.checked = boolcheck(UM.Preferences.getValue("tool/flip_y_axis_tool_handle"))
|
||||||
|
|
||||||
UM.Preferences.resetPreference("general/camera_perspective_mode")
|
UM.Preferences.resetPreference("general/camera_perspective_mode")
|
||||||
//var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode")
|
//var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode")
|
||||||
// /setDefaultCameraMode(defaultCameraMode)
|
// /setDefaultCameraMode(defaultCameraMode)
|
||||||
@ -662,6 +665,21 @@ UM.PreferencesPage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
UM.TooltipArea
|
||||||
|
{
|
||||||
|
width: childrenRect.width
|
||||||
|
height: childrenRect.height
|
||||||
|
text: catalog.i18nc("@info:tooltip", "Should the Y axis of the translate toolhandle be flipped?")
|
||||||
|
|
||||||
|
UM.CheckBox
|
||||||
|
{
|
||||||
|
id: flipToolhandleYCheckbox
|
||||||
|
text: catalog.i18nc("@option:check", "Flip toolhandle Y axis")
|
||||||
|
checked: boolCheck(UM.Preferences.getValue("tool/flip_y_axis_tool_handle"))
|
||||||
|
onCheckedChanged: UM.Preferences.setValue("tool/flip_y_axis_tool_handle", checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
@ -424,4 +424,3 @@ class TestGetEdgeDisallowedSize:
|
|||||||
with patch("cura.Settings.ExtruderManager.ExtruderManager.getInstance"):
|
with patch("cura.Settings.ExtruderManager.ExtruderManager.getInstance"):
|
||||||
with patch.dict(self.setting_property_dict, {"print_sequence": {"value": "one_at_a_time"}}):
|
with patch.dict(self.setting_property_dict, {"print_sequence": {"value": "one_at_a_time"}}):
|
||||||
assert build_volume.getEdgeDisallowedSize() == 0.1
|
assert build_volume.getEdgeDisallowedSize() == 0.1
|
||||||
|
|
||||||
|
@ -76,4 +76,3 @@ def test_updateMaxBuildPlate(objects_model, multi_build_plate_model):
|
|||||||
controller._calcMaxBuildPlate = MagicMock(return_value=2)
|
controller._calcMaxBuildPlate = MagicMock(return_value=2)
|
||||||
controller.updateMaxBuildPlate(SceneNode())
|
controller.updateMaxBuildPlate(SceneNode())
|
||||||
assert controller._active_build_plate == 0 # We don't have any items anywhere, so default to 0
|
assert controller._active_build_plate == 0 # We don't have any items anywhere, so default to 0
|
||||||
|
|
||||||
|
@ -53,5 +53,3 @@ class TestCollidesWithAreas:
|
|||||||
def test_outsideBuildArea(cura_scene_node):
|
def test_outsideBuildArea(cura_scene_node):
|
||||||
cura_scene_node.setOutsideBuildArea(True)
|
cura_scene_node.setOutsideBuildArea(True)
|
||||||
assert cura_scene_node.isOutsideBuildArea
|
assert cura_scene_node.isOutsideBuildArea
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,4 +226,3 @@ class Test_Update:
|
|||||||
"per_object_settings_count": 0,
|
"per_object_settings_count": 0,
|
||||||
"mesh_type": ""
|
"mesh_type": ""
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
# Copyright (c) 2018 Ultimaker B.V.
|
# Copyright (c) 2018 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 configparser #To read the profiles.
|
import configparser # To read the profiles.
|
||||||
import os #To join paths.
|
import os # To join paths.
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
## Makes sure that the variants for the Ultimaker 3 Extended are exactly the
|
## Makes sure that the variants for the Ultimaker 3 Extended are exactly the
|
||||||
@ -13,7 +13,7 @@ import pytest
|
|||||||
# needed, but until then we should keep them the same. It's happened all too
|
# needed, but until then we should keep them the same. It's happened all too
|
||||||
# often that we updated the variants for the UM3 but forgot about the UM3E.
|
# often that we updated the variants for the UM3 but forgot about the UM3E.
|
||||||
@pytest.mark.parametrize("um3_file, um3e_file", [
|
@pytest.mark.parametrize("um3_file, um3e_file", [
|
||||||
#List the corresponding files below.
|
# List the corresponding files below.
|
||||||
("ultimaker3_aa0.25.inst.cfg", "ultimaker3_extended_aa0.25.inst.cfg"),
|
("ultimaker3_aa0.25.inst.cfg", "ultimaker3_extended_aa0.25.inst.cfg"),
|
||||||
("ultimaker3_aa0.8.inst.cfg", "ultimaker3_extended_aa0.8.inst.cfg"),
|
("ultimaker3_aa0.8.inst.cfg", "ultimaker3_extended_aa0.8.inst.cfg"),
|
||||||
("ultimaker3_aa04.inst.cfg", "ultimaker3_extended_aa04.inst.cfg"),
|
("ultimaker3_aa04.inst.cfg", "ultimaker3_extended_aa04.inst.cfg"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user