mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-21 20:19:32 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura into cura_connect_UI_rework
This commit is contained in:
commit
28dc918e03
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
from cura.Scene.CuraSceneNode import CuraSceneNode
|
from cura.Scene.CuraSceneNode import CuraSceneNode
|
||||||
from cura.Settings.ExtruderManager import ExtruderManager
|
from cura.Settings.ExtruderManager import ExtruderManager
|
||||||
|
from UM.Application import Application #To modify the maximum zoom level.
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
from UM.Scene.Platform import Platform
|
from UM.Scene.Platform import Platform
|
||||||
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
|
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
|
||||||
@ -170,6 +171,12 @@ class BuildVolume(SceneNode):
|
|||||||
if shape:
|
if shape:
|
||||||
self._shape = shape
|
self._shape = shape
|
||||||
|
|
||||||
|
## Get the length of the 3D diagonal through the build volume.
|
||||||
|
#
|
||||||
|
# This gives a sense of the scale of the build volume in general.
|
||||||
|
def getDiagonalSize(self) -> float:
|
||||||
|
return math.sqrt(self._width * self._width + self._height * self._height + self._depth * self._depth)
|
||||||
|
|
||||||
def getDisallowedAreas(self) -> List[Polygon]:
|
def getDisallowedAreas(self) -> List[Polygon]:
|
||||||
return self._disallowed_areas
|
return self._disallowed_areas
|
||||||
|
|
||||||
@ -552,6 +559,10 @@ class BuildVolume(SceneNode):
|
|||||||
if self._engine_ready:
|
if self._engine_ready:
|
||||||
self.rebuild()
|
self.rebuild()
|
||||||
|
|
||||||
|
camera = Application.getInstance().getController().getCameraTool()
|
||||||
|
if camera:
|
||||||
|
camera.setZoomRange(min = 1, max = self.getDiagonalSize() * 5) #You can zoom out up to 5 times the diagonal. This gives some space around the volume.
|
||||||
|
|
||||||
def _onEngineCreated(self):
|
def _onEngineCreated(self):
|
||||||
self._engine_ready = True
|
self._engine_ready = True
|
||||||
self.rebuild()
|
self.rebuild()
|
||||||
|
@ -50,7 +50,8 @@ class CuraActions(QObject):
|
|||||||
scene = cura.CuraApplication.CuraApplication.getInstance().getController().getScene()
|
scene = cura.CuraApplication.CuraApplication.getInstance().getController().getScene()
|
||||||
camera = scene.getActiveCamera()
|
camera = scene.getActiveCamera()
|
||||||
if camera:
|
if camera:
|
||||||
camera.setPosition(Vector(-80, 250, 700))
|
diagonal_size = cura.CuraApplication.CuraApplication.getInstance().getBuildVolume().getDiagonalSize()
|
||||||
|
camera.setPosition(Vector(-80, 250, 700) * diagonal_size / 375)
|
||||||
camera.setPerspective(True)
|
camera.setPerspective(True)
|
||||||
camera.lookAt(Vector(0, 0, 0))
|
camera.lookAt(Vector(0, 0, 0))
|
||||||
|
|
||||||
|
@ -782,7 +782,7 @@ class CuraApplication(QtApplication):
|
|||||||
# Initialize camera
|
# Initialize camera
|
||||||
root = controller.getScene().getRoot()
|
root = controller.getScene().getRoot()
|
||||||
camera = Camera("3d", root)
|
camera = Camera("3d", root)
|
||||||
camera.setPosition(Vector(-80, 250, 700))
|
camera.setPosition(Vector(-80, 250, 700) * self.getBuildVolume().getDiagonalSize() / 375)
|
||||||
camera.setPerspective(True)
|
camera.setPerspective(True)
|
||||||
camera.lookAt(Vector(0, 0, 0))
|
camera.lookAt(Vector(0, 0, 0))
|
||||||
controller.getScene().setActiveCamera("3d")
|
controller.getScene().setActiveCamera("3d")
|
||||||
|
@ -115,7 +115,7 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
|
|||||||
machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";")
|
machine_file_formats = global_stack.getMetaDataEntry("file_formats").split(";")
|
||||||
machine_file_formats = [file_type.strip() for file_type in machine_file_formats]
|
machine_file_formats = [file_type.strip() for file_type in machine_file_formats]
|
||||||
#Exception for UM3 firmware version >=4.4: UFP is now supported and should be the preferred file format.
|
#Exception for UM3 firmware version >=4.4: UFP is now supported and should be the preferred file format.
|
||||||
if "application/x-ufp" not in machine_file_formats and self.printerType == "ultimaker3" and Version(self.firmwareVersion) >= Version("4.4"):
|
if "application/x-ufp" not in machine_file_formats and Version(self.firmwareVersion) >= Version("4.4"):
|
||||||
machine_file_formats = ["application/x-ufp"] + machine_file_formats
|
machine_file_formats = ["application/x-ufp"] + machine_file_formats
|
||||||
|
|
||||||
# Take the intersection between file_formats and machine_file_formats.
|
# Take the intersection between file_formats and machine_file_formats.
|
||||||
@ -627,4 +627,4 @@ def findByKey(list: List[Union[PrintJobOutputModel, PrinterOutputModel]], key: s
|
|||||||
for item in list:
|
for item in list:
|
||||||
if item.key == key:
|
if item.key == key:
|
||||||
return item
|
return item
|
||||||
return None
|
return None
|
||||||
|
@ -11,7 +11,6 @@ hardware_type = nozzle
|
|||||||
[values]
|
[values]
|
||||||
brim_width = 7
|
brim_width = 7
|
||||||
infill_line_width = 0.23
|
infill_line_width = 0.23
|
||||||
infill_overlap = 0
|
|
||||||
layer_height_0 = 0.17
|
layer_height_0 = 0.17
|
||||||
line_width = 0.23
|
line_width = 0.23
|
||||||
machine_nozzle_cool_down_speed = 0.85
|
machine_nozzle_cool_down_speed = 0.85
|
||||||
@ -21,10 +20,18 @@ machine_nozzle_size = 0.25
|
|||||||
machine_nozzle_tip_outer_diameter = 0.65
|
machine_nozzle_tip_outer_diameter = 0.65
|
||||||
material_final_print_temperature = =material_print_temperature - 10
|
material_final_print_temperature = =material_print_temperature - 10
|
||||||
material_initial_print_temperature = =material_print_temperature - 5
|
material_initial_print_temperature = =material_print_temperature - 5
|
||||||
|
raft_airgap = 0.3
|
||||||
|
raft_base_thickness = =resolveOrValue('layer_height_0') * 1.2
|
||||||
|
raft_interface_line_spacing = =raft_interface_line_width + 0.2
|
||||||
|
raft_interface_line_width = =line_width * 2
|
||||||
raft_interface_thickness = =layer_height * 1.5
|
raft_interface_thickness = =layer_height * 1.5
|
||||||
|
raft_jerk = =jerk_print
|
||||||
|
raft_margin = 15
|
||||||
|
raft_surface_layers = 2
|
||||||
retraction_count_max = 25
|
retraction_count_max = 25
|
||||||
retraction_extrusion_window = 1
|
retraction_extrusion_window = 1
|
||||||
retraction_min_travel = 0.7
|
retraction_min_travel = 0.7
|
||||||
|
retraction_prime_speed = =retraction_speed
|
||||||
skin_overlap = 15
|
skin_overlap = 15
|
||||||
speed_layer_0 = 20
|
speed_layer_0 = 20
|
||||||
speed_print = 55
|
speed_print = 55
|
||||||
@ -32,8 +39,12 @@ speed_topbottom = 20
|
|||||||
speed_wall = =math.ceil(speed_print * 30 / 55)
|
speed_wall = =math.ceil(speed_print * 30 / 55)
|
||||||
support_angle = 60
|
support_angle = 60
|
||||||
support_bottom_distance = =support_z_distance / 2
|
support_bottom_distance = =support_z_distance / 2
|
||||||
|
support_pattern = zigzag
|
||||||
support_top_distance = =support_z_distance
|
support_top_distance = =support_z_distance
|
||||||
|
support_use_towers = True
|
||||||
support_z_distance = =layer_height * 2
|
support_z_distance = =layer_height * 2
|
||||||
|
switch_extruder_prime_speed = =switch_extruder_retraction_speeds
|
||||||
|
switch_extruder_retraction_amount = =machine_heat_zone_length
|
||||||
top_bottom_thickness = 1.2
|
top_bottom_thickness = 1.2
|
||||||
wall_line_width_x = 0.23
|
wall_line_width_x = 0.23
|
||||||
wall_thickness = 1.3
|
wall_thickness = 1.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user