Merge branch 'master' into feature-backup-manager

This commit is contained in:
ChrisTerBeke 2018-05-14 17:16:36 +02:00
commit e14f57892a
31 changed files with 71 additions and 287 deletions

View file

@ -151,7 +151,9 @@ class CuraApplication(QtApplication):
Resources.addSearchPath(os.path.join(QtApplication.getInstallPrefix(), "share", "cura", "resources"))
if not hasattr(sys, "frozen"):
Resources.addSearchPath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources"))
resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources")
Resources.addSearchPath(resource_path)
Resources.setBundledResourcesPath(resource_path)
self._use_gui = True
self._open_file_queue = [] # Files to open when plug-ins are loaded.
@ -1018,6 +1020,8 @@ class CuraApplication(QtApplication):
scene_bounding_box = None
is_block_slicing_node = False
active_build_plate = self.getMultiBuildPlateModel().activeBuildPlate
print_information = self.getPrintInformation()
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
if (
not issubclass(type(node), CuraSceneNode) or
@ -1029,6 +1033,11 @@ class CuraApplication(QtApplication):
is_block_slicing_node = True
count += 1
# After clicking the Undo button, if the build plate empty the project name needs to be set
if print_information.baseName == '':
print_information.setBaseName(node.getName())
if not scene_bounding_box:
scene_bounding_box = node.getBoundingBox()
else:
@ -1036,7 +1045,7 @@ class CuraApplication(QtApplication):
if other_bb is not None:
scene_bounding_box = scene_bounding_box + node.getBoundingBox()
print_information = self.getPrintInformation()
if print_information:
print_information.setPreSliced(is_block_slicing_node)
@ -1153,39 +1162,6 @@ class CuraApplication(QtApplication):
Selection.add(node)
## Delete all nodes containing mesh data in the scene.
# \param only_selectable. Set this to False to delete objects from all build plates
@pyqtSlot()
def deleteAll(self, only_selectable = True):
Logger.log("i", "Clearing scene")
if not self.getController().getToolsEnabled():
return
nodes = []
for node in DepthFirstIterator(self.getController().getScene().getRoot()):
if not isinstance(node, SceneNode):
continue
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
continue # Node that doesnt have a mesh and is not a group.
if only_selectable and not node.isSelectable():
continue
if not node.callDecoration("isSliceable") and not node.callDecoration("getLayerData") and not node.callDecoration("isGroup"):
continue # Only remove nodes that are selectable.
if node.getParent() and node.getParent().callDecoration("isGroup"):
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
nodes.append(node)
if nodes:
op = GroupedOperation()
for node in nodes:
op.addOperation(RemoveSceneNodeOperation(node))
# Reset the print information
self.getController().getScene().sceneChanged.emit(node)
op.push()
Selection.clear()
## Reset all translation on nodes with mesh data.
@pyqtSlot()
def resetAllTranslation(self):

View file

@ -30,9 +30,7 @@ class CuraPackageManager(QObject):
# JSON file that keeps track of all installed packages.
self._bundled_package_management_file_path = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"..",
"resources",
os.path.abspath(Resources.getBundledResourcesPath()),
"packages.json"
)
self._user_package_management_file_path = os.path.join(
@ -294,7 +292,7 @@ class CuraPackageManager(QObject):
from cura.CuraApplication import CuraApplication
installation_dirs_dict = {
"materials": Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer),
"quality": Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer),
"qualities": Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer),
"plugins": os.path.abspath(Resources.getStoragePath(Resources.Plugins)),
}

View file

@ -16,9 +16,10 @@ Window
width: 720 * screenScaleFactor
height: 640 * screenScaleFactor
minimumWidth: 720 * screenScaleFactor
maximumWidth: 720 * screenScaleFactor
minimumHeight: 350 * screenScaleFactor
minimumWidth: width
maximumWidth: minimumWidth
minimumHeight: height
maximumHeight: minimumHeight
color: UM.Theme.getColor("sidebar")
UM.I18nCatalog
{

View file

@ -13,7 +13,6 @@ from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkRepl
from UM.Application import Application
from UM.Logger import Logger
from UM.PluginRegistry import PluginRegistry
from UM.Qt.Bindings.PluginsModel import PluginsModel
from UM.Extension import Extension
from UM.i18n import i18nCatalog
from UM.Version import Version
@ -22,7 +21,6 @@ import cura
from cura.CuraApplication import CuraApplication
from .AuthorsModel import AuthorsModel
from .PackagesModel import PackagesModel
from .ConfigsModel import ConfigsModel
i18n_catalog = i18nCatalog("cura")

View file

@ -37,7 +37,7 @@
"overrides": {
"machine_name": { "default_value": "Ultimaker S5" },
"machine_width": { "default_value": 330 },
"machine_depth": { "default_value": 245 },
"machine_depth": { "default_value": 240 },
"machine_height": { "default_value": 300 },
"machine_heated_bed": { "default_value": true },
"machine_nozzle_heat_up_speed": { "default_value": 1.4 },

View file

@ -1,22 +0,0 @@
[general]
version = 4
name = M1 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = fine
weight = 2
[values]
layer_height = 0.04375
layer_height_0 = 0.2625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,22 +0,0 @@
[general]
version = 4
name = M2 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = high
weight = 1
[values]
layer_height = 0.0875
layer_height_0 = 0.2625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,22 +0,0 @@
[general]
version = 4
name = M3 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = normal
weight = 0
[values]
layer_height = 0.13125
layer_height_0 = 0.2625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,23 +0,0 @@
[general]
version = 4
name = M4 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = fast
weight = -1
global_quality = true
[values]
layer_height = 0.175
layer_height_0 = 0.2625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,22 +0,0 @@
[general]
version = 4
name = M5 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = faster
weight = -2
[values]
layer_height = 0.21875
layer_height_0 = 0.2625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,22 +0,0 @@
[general]
version = 4
name = M6 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = draft
weight = -3
[values]
layer_height = 0.2625
layer_height_0 = 0.2625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,22 +0,0 @@
[general]
version = 4
name = M7 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = turbo
weight = -4
[values]
layer_height = 0.30625
layer_height_0 = 0.30625
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -1,23 +0,0 @@
[general]
version = 4
name = M8 Quality
definition = malyan_m200
[metadata]
setting_version = 4
type = quality
quality_type = hyper
weight = -5
global_quality = true
[values]
layer_height = 0.35
layer_height_0 = 0.35
wall_thickness = 1.05
top_bottom_thickness = 0.72
infill_sparse_density = 22
speed_print = 50
speed_layer_0 = =round(speed_print * 30 / 50)
speed_topbottom = 20
cool_min_layer_time = 5
cool_min_speed = 10

View file

@ -25,11 +25,11 @@ jerk_enabled = True
jerk_print = 25
line_width = =machine_nozzle_size * 0.92
machine_min_cool_heat_time_window = 15
material_bed_temperature_layer_0 = 90
material_final_print_temperature = 195
material_initial_print_temperature = 200
material_print_temperature = 205
material_print_temperature_layer_0 = 208
material_bed_temperature_layer_0 = =material_bed_temperature + 5
material_final_print_temperature = =material_print_temperature - 10
material_initial_print_temperature = =material_print_temperature - 5
material_print_temperature = =default_material_print_temperature - 15
material_print_temperature_layer_0 = =material_print_temperature + 3
multiple_mesh_overlap = 0
prime_tower_enable = False
prime_tower_size = 16

View file

@ -26,5 +26,6 @@ speed_wall = =math.ceil(speed_print * 45 / 60)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
wall_thickness = 1
infill_line_width = 0.4
speed_infill = 50
infill_line_width = =round(line_width * 0.4 / 0.35, 2)
speed_infill = =math.ceil(speed_print * 50 / 60)

View file

@ -25,5 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 40 / 60)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
infill_line_width = 0.4
speed_infill = 45
infill_line_width = =round(line_width * 0.4 / 0.35, 2)
speed_infill = =math.ceil(speed_print * 45 / 60)

View file

@ -24,5 +24,6 @@ speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 50)
speed_wall = =math.ceil(speed_print * 30 / 50)
infill_line_width = 0.4
speed_infill = 40
infill_line_width = =round(line_width * 0.4 / 0.35, 2)
speed_infill = =math.ceil(speed_print * 40 / 50)

View file

@ -23,5 +23,5 @@ speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 55)
speed_wall = =math.ceil(speed_print * 30 / 55)
infill_line_width = 0.4
speed_infill = 40
infill_line_width = =round(line_width * 0.4 / 0.35, 2)
speed_infill = =math.ceil(speed_print * 40 / 55)

View file

@ -23,8 +23,7 @@ speed_wall = =math.ceil(speed_print * 45 / 60)
speed_wall_0 = =math.ceil(speed_wall * 35 / 45)
wall_thickness = 1
jerk_travel = 50
infill_pattern = zigzag
speed_infill = 50
speed_infill = =math.ceil(speed_print * 50 / 60)
prime_tower_purge_volume = 1

View file

@ -22,8 +22,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 60)
speed_wall = =math.ceil(speed_print * 40 / 60)
speed_wall_0 = =math.ceil(speed_wall * 30 / 40)
jerk_travel = 50
infill_pattern = zigzag
speed_infill = 50
speed_infill = =math.ceil(speed_print * 50 / 60)
prime_tower_purge_volume = 1

View file

@ -23,8 +23,6 @@ speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 50)
speed_wall = =math.ceil(speed_print * 30 / 50)
jerk_travel = 50
infill_pattern = zigzag
speed_infill = 40
speed_infill = =math.ceil(speed_print * 40 / 50)
prime_tower_purge_volume = 1

View file

@ -21,8 +21,6 @@ speed_layer_0 = 20
speed_topbottom = =math.ceil(speed_print * 30 / 55)
speed_wall = =math.ceil(speed_print * 30 / 55)
jerk_travel = 50
infill_pattern = zigzag
speed_infill = 45
speed_infill = =math.ceil(speed_print * 45 / 55)
prime_tower_purge_volume = 1

View file

@ -29,11 +29,11 @@ line_width = =machine_nozzle_size * 0.95
machine_min_cool_heat_time_window = 15
machine_nozzle_cool_down_speed = 0.85
machine_nozzle_heat_up_speed = 1.5
material_bed_temperature_layer_0 = 95
material_final_print_temperature = 205
material_initial_print_temperature = 210
material_print_temperature = 215
material_print_temperature_layer_0 = 220
material_bed_temperature_layer_0 = =material_bed_temperature + 5
material_final_print_temperature = =material_print_temperature - 10
material_initial_print_temperature = =material_print_temperature - 5
material_print_temperature = =default_material_print_temperature - 5
material_print_temperature_layer_0 = =material_print_temperature + 5
material_standby_temperature = 100
multiple_mesh_overlap = 0
prime_tower_enable = False

View file

@ -29,11 +29,11 @@ line_width = =machine_nozzle_size * 0.95
machine_min_cool_heat_time_window = 15
machine_nozzle_cool_down_speed = 0.85
machine_nozzle_heat_up_speed = 1.5
material_bed_temperature_layer_0 = 95
material_final_print_temperature = 195
material_initial_print_temperature = 205
material_print_temperature = 207
material_print_temperature_layer_0 = 210
material_bed_temperature_layer_0 = =material_bed_temperature + 5
material_final_print_temperature = =material_print_temperature - 12
material_initial_print_temperature = =material_print_temperature - 2
material_print_temperature = =default_material_print_temperature - 13
material_print_temperature_layer_0 = =material_print_temperature + 3
material_standby_temperature = 100
multiple_mesh_overlap = 0
prime_tower_enable = False

View file

@ -29,11 +29,11 @@ line_width = =machine_nozzle_size * 0.95
machine_min_cool_heat_time_window = 15
machine_nozzle_cool_down_speed = 0.85
machine_nozzle_heat_up_speed = 1.5
material_bed_temperature_layer_0 = 95
material_final_print_temperature = 195
material_initial_print_temperature = 200
material_print_temperature = 205
material_print_temperature_layer_0 = 208
material_bed_temperature_layer_0 = =material_bed_temperature + 5
material_final_print_temperature = =material_print_temperature - 10
material_initial_print_temperature = =material_print_temperature - 5
material_print_temperature = =default_material_print_temperature - 15
material_print_temperature_layer_0 = =material_print_temperature + 3
material_standby_temperature = 100
multiple_mesh_overlap = 0
prime_tower_enable = False

View file

@ -18,6 +18,7 @@ brim_width = 8.75
cool_fan_speed_max = 100
cool_min_layer_time_fan_speed_max = 6
cool_min_speed = 4
gradual_infill_step_height = =5 * layer_height
infill_line_width = =round(line_width * 0.38 / 0.38, 2)
infill_overlap = 0
infill_pattern = cross_3d
@ -40,7 +41,6 @@ prime_tower_wipe_enabled = True
retraction_count_max = 12
retraction_extra_prime_amount = 0.8
retraction_extrusion_window = 1
retraction_hop = 1.5
retraction_hop_only_when_collides = True
retraction_min_travel = =line_width * 2
retraction_prime_speed = 15
@ -61,5 +61,3 @@ travel_avoid_distance = 1.5
wall_0_inset = 0
wall_line_width_x = =line_width
wall_thickness = 0.76
jerk_travel = 50

View file

@ -18,6 +18,7 @@ brim_width = 8.75
cool_fan_speed_max = 100
cool_min_layer_time_fan_speed_max = 6
cool_min_speed = 4
gradual_infill_step_height = =5 * layer_height
infill_line_width = =round(line_width * 0.38 / 0.38, 2)
infill_overlap = 0
infill_pattern = cross_3d
@ -40,7 +41,6 @@ prime_tower_wipe_enabled = True
retraction_count_max = 12
retraction_extra_prime_amount = 0.8
retraction_extrusion_window = 1
retraction_hop = 1.5
retraction_hop_only_when_collides = True
retraction_min_travel = =line_width * 2
retraction_prime_speed = 15
@ -62,4 +62,3 @@ wall_0_inset = 0
wall_line_width_x = =line_width
wall_thickness = 0.76
jerk_travel = 50

View file

@ -18,6 +18,7 @@ brim_width = 8.75
cool_fan_speed_max = 100
cool_min_layer_time_fan_speed_max = 6
cool_min_speed = 4
gradual_infill_step_height = =5 * layer_height
infill_line_width = =round(line_width * 0.38 / 0.38, 2)
infill_overlap = 0
infill_pattern = cross_3d
@ -39,7 +40,6 @@ prime_tower_wipe_enabled = True
retraction_count_max = 12
retraction_extra_prime_amount = 0.8
retraction_extrusion_window = 1
retraction_hop = 1.5
retraction_hop_only_when_collides = True
retraction_min_travel = =line_width * 2
retraction_prime_speed = 15
@ -61,4 +61,3 @@ wall_0_inset = 0
wall_line_width_x = =line_width
wall_thickness = 0.76
jerk_travel = 50

View file

@ -17,17 +17,15 @@ cool_fan_speed_max = =100
cool_min_speed = 2
gradual_infill_step_height = =3 * layer_height
infill_line_width = =round(line_width * 0.65 / 0.75, 2)
infill_pattern = cubic
line_width = =machine_nozzle_size * 0.9375
machine_nozzle_cool_down_speed = 0.75
machine_nozzle_heat_up_speed = 1.6
material_final_print_temperature = =max(-273.15, material_print_temperature - 15)
material_initial_print_temperature = =max(-273.15, material_print_temperature - 10)
material_print_temperature = =default_material_print_temperature + 10
prime_tower_enable = False
prime_tower_enable = True
support_angle = 70
support_line_width = =line_width * 0.75
support_pattern = ='triangles'
support_xy_distance = =wall_line_width_0 * 1.5
top_bottom_thickness = =layer_height * 4
wall_line_width = =round(line_width * 0.75 / 0.75, 2)
@ -36,8 +34,9 @@ wall_thickness = =wall_line_width_0 + wall_line_width_x
retract_at_layer_change = False
speed_print = 45
speed_wall = =round(speed_print * 40 / 45)
speed_wall_0 = =round(speed_print * 35 / 45)
speed_topbottom = =round(speed_print * 35 / 45)
speed_topbottom = =math.ceil(speed_print * 35 / 45)
speed_wall = =math.ceil(speed_print * 40 / 45)
speed_wall_x = =speed_wall
speed_wall_0 = =math.ceil(speed_wall * 35 / 40)
infill_sparse_density = 15
layer_height_0 = 0.4

View file

@ -17,18 +17,16 @@ cool_fan_speed_max = =100
cool_min_speed = 2
gradual_infill_step_height = =3 * layer_height
infill_line_width = =round(line_width * 0.65 / 0.75, 2)
infill_pattern = cubic
line_width = =machine_nozzle_size * 0.9375
machine_nozzle_cool_down_speed = 0.75
machine_nozzle_heat_up_speed = 1.6
material_final_print_temperature = =max(-273.15, material_print_temperature - 15)
material_initial_print_temperature = =max(-273.15, material_print_temperature - 10)
material_print_temperature = =default_material_print_temperature + 15
prime_tower_enable = False
prime_tower_enable = True
raft_margin = 10
support_angle = 70
support_line_width = =line_width * 0.75
support_pattern = ='triangles'
support_xy_distance = =wall_line_width_0 * 1.5
top_bottom_thickness = =layer_height * 4
wall_line_width = =round(line_width * 0.75 / 0.75, 2)
@ -36,8 +34,9 @@ wall_line_width_x = =round(wall_line_width * 0.625 / 0.75, 2)
wall_thickness = =wall_line_width_0 + wall_line_width_x
retract_at_layer_change = False
speed_print = 45
speed_wall = =round(speed_print * 40 / 45)
speed_wall_0 = =round(speed_print * 35 / 45)
speed_topbottom = =round(speed_print * 35 / 45)
speed_topbottom = =math.ceil(speed_print * 35 / 45)
speed_wall = =math.ceil(speed_print * 40 / 45)
speed_wall_x = =speed_wall
speed_wall_0 = =math.ceil(speed_wall * 35 / 40)
infill_sparse_density = 15
layer_height_0 = 0.4

View file

@ -17,17 +17,15 @@ cool_fan_speed_max = =100
cool_min_speed = 2
gradual_infill_step_height = =3 * layer_height
infill_line_width = =round(line_width * 0.65 / 0.75, 2)
infill_pattern = cubic
line_width = =machine_nozzle_size * 0.9375
machine_nozzle_cool_down_speed = 0.75
machine_nozzle_heat_up_speed = 1.6
material_final_print_temperature = =max(-273.15, material_print_temperature - 15)
material_initial_print_temperature = =max(-273.15, material_print_temperature - 10)
material_print_temperature = =default_material_print_temperature + 10
prime_tower_enable = False
prime_tower_enable = True
support_angle = 70
support_line_width = =line_width * 0.75
support_pattern = ='triangles'
support_xy_distance = =wall_line_width_0 * 1.5
top_bottom_thickness = =layer_height * 4
wall_line_width = =round(line_width * 0.75 / 0.75, 2)
@ -35,8 +33,9 @@ wall_line_width_x = =round(wall_line_width * 0.625 / 0.75, 2)
wall_thickness = =wall_line_width_0 + wall_line_width_x
retract_at_layer_change = False
speed_print = 45
speed_wall = =round(speed_print * 40 / 45)
speed_wall_0 = =round(speed_print * 35 / 45)
speed_topbottom = =round(speed_print * 35 / 45)
speed_topbottom = =math.ceil(speed_print * 35 / 45)
speed_wall = =math.ceil(speed_print * 40 / 45)
speed_wall_x = =speed_wall
speed_wall_0 = =math.ceil(speed_wall * 35 / 40)
infill_sparse_density = 15
layer_height_0 = 0.4