Merge branch 'master' into first_layer_line_width

This commit is contained in:
14bitVoid 2017-07-11 01:39:14 +02:00
commit a08d11769d
10 changed files with 87 additions and 34 deletions

View file

@ -268,35 +268,37 @@ class CuraApplication(QtApplication):
ContainerRegistry.getInstance().load()
# set the setting version for Preferences
Preferences.getInstance().addPreference("metadata/setting_version", CuraApplication.SettingVersion)
preferences = Preferences.getInstance()
preferences.addPreference("metadata/setting_version", 0)
preferences.setValue("metadata/setting_version", self.SettingVersion) #Don't make it equal to the default so that the setting version always gets written to the file.
Preferences.getInstance().addPreference("cura/active_mode", "simple")
preferences.addPreference("cura/active_mode", "simple")
Preferences.getInstance().addPreference("cura/categories_expanded", "")
Preferences.getInstance().addPreference("cura/jobname_prefix", True)
Preferences.getInstance().addPreference("view/center_on_select", True)
Preferences.getInstance().addPreference("mesh/scale_to_fit", False)
Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True)
Preferences.getInstance().addPreference("cura/dialog_on_project_save", True)
Preferences.getInstance().addPreference("cura/asked_dialog_on_project_save", False)
Preferences.getInstance().addPreference("cura/choice_on_profile_override", "always_ask")
Preferences.getInstance().addPreference("cura/choice_on_open_project", "always_ask")
preferences.addPreference("cura/categories_expanded", "")
preferences.addPreference("cura/jobname_prefix", True)
preferences.addPreference("view/center_on_select", True)
preferences.addPreference("mesh/scale_to_fit", False)
preferences.addPreference("mesh/scale_tiny_meshes", True)
preferences.addPreference("cura/dialog_on_project_save", True)
preferences.addPreference("cura/asked_dialog_on_project_save", False)
preferences.addPreference("cura/choice_on_profile_override", "always_ask")
preferences.addPreference("cura/choice_on_open_project", "always_ask")
Preferences.getInstance().addPreference("cura/currency", "")
Preferences.getInstance().addPreference("cura/material_settings", "{}")
preferences.addPreference("cura/currency", "")
preferences.addPreference("cura/material_settings", "{}")
Preferences.getInstance().addPreference("view/invert_zoom", False)
preferences.addPreference("view/invert_zoom", False)
for key in [
"dialog_load_path", # dialog_save_path is in LocalFileOutputDevicePlugin
"dialog_profile_path",
"dialog_material_path"]:
Preferences.getInstance().addPreference("local_file/%s" % key, os.path.expanduser("~/"))
preferences.addPreference("local_file/%s" % key, os.path.expanduser("~/"))
Preferences.getInstance().setDefault("local_file/last_used_type", "text/x-gcode")
preferences.setDefault("local_file/last_used_type", "text/x-gcode")
Preferences.getInstance().setDefault("general/visible_settings", """
preferences.setDefault("general/visible_settings", """
machine_settings
resolution
layer_height

View file

@ -340,10 +340,8 @@ class CuraContainerRegistry(ContainerRegistry):
# \return the ID of the active material or the empty string
def _activeMaterialId(self):
global_container_stack = Application.getInstance().getGlobalContainerStack()
if global_container_stack:
material = global_container_stack.findContainer({"type": "material"})
if material:
return material.getId()
if global_container_stack and global_container_stack.material:
return global_container_stack.material.getId()
return ""
## Returns true if the current machien requires its own quality profiles

View file

@ -47,6 +47,9 @@ class CuraContainerStack(ContainerStack):
self.containersChanged.connect(self._onContainersChanged)
import cura.CuraApplication #Here to prevent circular imports.
self.addMetaDataEntry("setting_version", cura.CuraApplication.CuraApplication.SettingVersion)
# This is emitted whenever the containersChanged signal from the ContainerStack base class is emitted.
pyqtContainersChanged = pyqtSignal()

View file

@ -157,7 +157,7 @@ class MachineManager(QObject):
if str(index) == extruder.getMetaDataEntry("position"):
matching_extruder = extruder
break
if matching_extruder and matching_extruder.findContainer({"type": "variant"}).getName() != hotend_id:
if matching_extruder and matching_extruder.variant.getName() != hotend_id:
# Save the material that needs to be changed. Multiple changes will be handled by the callback.
self._auto_hotends_changed[str(index)] = containers[0].getId()
self._printer_output_devices[0].materialHotendChangedMessage(self._materialHotendChangedCallback)
@ -181,11 +181,10 @@ class MachineManager(QObject):
matching_extruder = extruder
break
if matching_extruder and matching_extruder.findContainer({"type": "material"}).getMetaDataEntry("GUID") != material_id:
if matching_extruder and matching_extruder.material.getMetaDataEntry("GUID") != material_id:
# Save the material that needs to be changed. Multiple changes will be handled by the callback.
variant_container = matching_extruder.findContainer({"type": "variant"})
if self._global_container_stack.getBottom().getMetaDataEntry("has_variants") and variant_container:
variant_id = self.getQualityVariantId(self._global_container_stack.getBottom(), variant_container)
if self._global_container_stack.getBottom().getMetaDataEntry("has_variants") and matching_extruder.variant:
variant_id = self.getQualityVariantId(self._global_container_stack.getBottom(), matching_extruder.variant)
for container in containers:
if container.getMetaDataEntry("variant") == variant_id:
self._auto_materials_changed[str(index)] = container.getId()
@ -507,9 +506,8 @@ class MachineManager(QObject):
result = []
if ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() is not None:
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
variant_container = stack.findContainer({"type": "variant"})
if variant_container and variant_container != self._empty_variant_container:
result.append(variant_container.getId())
if stack.variant and stack.variant != self._empty_variant_container:
result.append(stack.variant.getId())
return result

View file

@ -107,9 +107,9 @@ class ProfilesModel(InstanceContainersModel):
continue
#Quality has no value for layer height either. Get the layer height from somewhere lower in the stack.
skip_until_container = global_container_stack.findContainer({"type": "material"})
skip_until_container = global_container_stack.material
if not skip_until_container: #No material in stack.
skip_until_container = global_container_stack.findContainer({"type": "variant"})
skip_until_container = global_container_stack.variant
if not skip_until_container: #No variant in stack.
skip_until_container = global_container_stack.getBottom()
item["layer_height"] = str(global_container_stack.getRawProperty("layer_height", "value", skip_until_container = skip_until_container.getId())) + unit #Fall through to the currently loaded material.

View file

@ -622,6 +622,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
self._sendCommand("M140 S0")
self._sendCommand("M104 S0")
self._sendCommand("M107")
self.homeHead()
self.homeBed()
self._sendCommand("M84")
self._is_printing = False
self._is_paused = False

View file

@ -36,7 +36,7 @@ class UMOUpgradeSelection(MachineAction):
global_container_stack = Application.getInstance().getGlobalContainerStack()
if global_container_stack:
# Make sure there is a definition_changes container to store the machine settings
definition_changes_container = global_container_stack.findContainer({"type": "definition_changes"})
definition_changes_container = global_container_stack.definition_changes
if not definition_changes_container:
definition_changes_container = self._createDefinitionChangesContainer(global_container_stack)

View file

@ -1135,6 +1135,14 @@
"limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true
},
"fill_outline_gaps": {
"label": "Print Thin Walls",
"description": "Print pieces of the model which are horizontally thinner than the nozzle size.",
"type": "bool",
"default_value": "false",
"limit_to_extruder": "wall_0_extruder_nr",
"settable_per_mesh": true
},
"xy_offset":
{
"label": "Horizontal Expansion",
@ -1350,7 +1358,7 @@
"skin_overlap":
{
"label": "Skin Overlap Percentage",
"description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.",
"description": "The amount of overlap between the skin and the walls as a percentage of the line width. A slight overlap allows the walls to connect firmly to the skin. This is a percentage of the average line widths of the skin lines and the innermost wall.",
"unit": "%",
"type": "float",
"default_value": 5,
@ -3429,6 +3437,47 @@
"enabled": "support_enable",
"settable_per_mesh": true
},
"support_infill_sparse_thickness":
{
"label": "Support Infill Layer Thickness",
"description": "The thickness per layer of support infill material. This value should always be a multiple of the layer height and is otherwise rounded.",
"unit": "mm",
"type": "float",
"default_value": 0.1,
"minimum_value": "resolveOrValue('layer_height')",
"maximum_value_warning": "0.75 * machine_nozzle_size",
"maximum_value": "resolveOrValue('layer_height') * 8",
"value": "resolveOrValue('layer_height')",
"enabled": "support_enable and support_infill_rate > 0",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false
},
"gradual_support_infill_steps":
{
"label": "Gradual Support Infill Steps",
"description": "Number of times to reduce the support infill density by half when getting further below top surfaces. Areas which are closer to top surfaces get a higher density, up to the Support Infill Density.",
"default_value": 0,
"type": "int",
"minimum_value": "0",
"maximum_value_warning": "5",
"maximum_value": "999999 if support_line_distance == 0 else (20 - math.log(support_line_distance) / math.log(2))",
"enabled": "support_enable and support_infill_rate > 0",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false
},
"gradual_support_infill_step_height":
{
"label": "Gradual Support Infill Step Height",
"description": "The height of support infill of a given density before switching to half the density.",
"unit": "mm",
"type": "float",
"default_value": 1.5,
"minimum_value": "0.0001",
"minimum_value_warning": "3 * resolveOrValue('layer_height')",
"enabled": "support_enable and support_infill_rate > 0 and gradual_support_infill_steps > 0",
"limit_to_extruder": "support_infill_extruder_nr",
"settable_per_mesh": false
},
"support_interface_enable":
{
"label": "Enable Support Interface",

View file

@ -70,7 +70,7 @@
"machine_start_gcode": { "default_value": "" },
"machine_end_gcode": { "default_value": "" },
"prime_tower_position_x": { "default_value": 175 },
"prime_tower_position_y": { "default_value": 177 },
"prime_tower_position_y": { "value": "machine_depth - prime_tower_size - (brim_width if adhesion_type == 'brim' else (raft_margin if adhesion_type == 'raft' else (skirt_gap if adhesion_type == 'skirt' else 0))) - 1" },
"prime_tower_wipe_enabled": { "default_value": false },
"prime_blob_enable": { "enabled": true },

View file

@ -142,6 +142,7 @@ Item
style: UM.Theme.styles.scrollview;
flickableItem.flickableDirection: Flickable.VerticalFlick;
__wheelAreaScrollSpeed: 75; // Scroll three lines in one scroll event
ListView
{