This commit is contained in:
Jaime van Kessel 2016-05-17 09:43:26 +02:00
commit 62cdde1a9b
7 changed files with 80 additions and 13 deletions

View File

@ -114,6 +114,7 @@ class CuraApplication(QtApplication):
Preferences.getInstance().addPreference("cura/active_mode", "simple") Preferences.getInstance().addPreference("cura/active_mode", "simple")
Preferences.getInstance().addPreference("cura/recent_files", "") Preferences.getInstance().addPreference("cura/recent_files", "")
Preferences.getInstance().addPreference("cura/categories_expanded", "") Preferences.getInstance().addPreference("cura/categories_expanded", "")
Preferences.getInstance().addPreference("cura/jobname_prefix", True)
Preferences.getInstance().addPreference("view/center_on_select", True) Preferences.getInstance().addPreference("view/center_on_select", True)
Preferences.getInstance().addPreference("mesh/scale_to_fit", True) Preferences.getInstance().addPreference("mesh/scale_to_fit", True)
Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True) Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True)

View File

@ -105,6 +105,9 @@ class CuraEngineBackend(Backend):
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"] return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"]
def close(self):
self._terminate() # Forcefully shutdown the backend.
## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished. ## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished.
# \param time The amount of time the print will take. # \param time The amount of time the print will take.
# \param material_amount The amount of material the print will use. # \param material_amount The amount of material the print will use.
@ -118,6 +121,7 @@ class CuraEngineBackend(Backend):
## Perform a slice of the scene. ## Perform a slice of the scene.
def slice(self): def slice(self):
self._stored_layer_data = []
if not self._enabled: if not self._enabled:
return return

View File

@ -50,7 +50,8 @@
"skirt_minimal_length": "skirt_minimal_length", "skirt_minimal_length": "skirt_minimal_length",
"brim_line_count": "brim_line_count", "brim_line_count": "brim_line_count",
"raft_margin": "raft_margin", "raft_margin": "raft_margin",
"raft_airgap": "raft_airgap_all", "raft_airgap": "float(raft_airgap_all) + float(raft_airgap)",
"layer_0_z_overlap": "raft_airgap",
"raft_surface_layers": "raft_surface_layers", "raft_surface_layers": "raft_surface_layers",
"raft_surface_thickness": "raft_surface_thickness", "raft_surface_thickness": "raft_surface_thickness",
"raft_surface_line_width": "raft_surface_linewidth", "raft_surface_line_width": "raft_surface_linewidth",

View File

@ -30,9 +30,6 @@
"machine_center_is_zero": { "machine_center_is_zero": {
"default": false "default": false
}, },
"machine_gcode_flavor": {
"default": "RepRap"
},
"machine_platform_offset": { "machine_platform_offset": {
"default": [6, 1320, 0] "default": [6, 1320, 0]
}, },
@ -58,6 +55,5 @@
"skirt_minimal_length": { "default": 30.0, "visible": false }, "skirt_minimal_length": { "default": 30.0, "visible": false },
"skirt_gap": { "default": 6.0 }, "skirt_gap": { "default": 6.0 },
"cool_fan_full_at_height": { "default": 0.4, "visible": false }, "cool_fan_full_at_height": { "default": 0.4, "visible": false },
"support_enable": { "default": false }
} }
} }

View File

@ -555,10 +555,11 @@
"unit": "%", "unit": "%",
"type": "float", "type": "float",
"default": 10, "default": 10,
"inherit_function": "10 if infill_sparse_density < 95 else 0", "inherit_function": "10 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0",
"min_value_warning": "-50", "min_value_warning": "-50",
"max_value_warning": "100", "max_value_warning": "100",
"visible": false, "visible": false,
"enabled": "infill_pattern != \"concentric\"",
"children": { "children": {
"infill_overlap_mm": { "infill_overlap_mm": {
"label": "Infill Overlap", "label": "Infill Overlap",
@ -568,8 +569,35 @@
"default": 0.04, "default": 0.04,
"min_value_warning": "-0.5 * machine_nozzle_size", "min_value_warning": "-0.5 * machine_nozzle_size",
"max_value_warning": "machine_nozzle_size", "max_value_warning": "machine_nozzle_size",
"inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 else 0", "inherit_function": "infill_line_width * parent_value / 100 if infill_sparse_density < 95 and infill_pattern != \"concentric\" else 0",
"visible": false "visible": false,
"enabled": "infill_pattern != \"concentric\""
}
}
},
"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.",
"unit": "%",
"type": "float",
"default": 5,
"min_value_warning": "-50",
"max_value_warning": "100",
"inherit_function": "5 if top_bottom_pattern != \"concentric\" else 0",
"visible": false,
"enabled": "top_bottom_pattern != \"concentric\"",
"children": {
"skin_overlap_mm": {
"label": "Skin Overlap",
"description": "The amount of overlap between the skin and the walls. A slight overlap allows the walls to connect firmly to the skin.",
"unit": "mm",
"type": "float",
"default": 0.02,
"min_value_warning": "-0.5 * machine_nozzle_size",
"max_value_warning": "machine_nozzle_size",
"inherit_function": "skin_line_width * parent_value / 100 if top_bottom_pattern != \"concentric\" else 0",
"visible": false,
"enabled": "top_bottom_pattern != \"concentric\""
} }
} }
}, },
@ -1537,13 +1565,26 @@
"description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.", "description": "The gap between the final raft layer and the first layer of the object. Only the first layer is raised by this amount to lower the bonding between the raft layer and the object. Makes it easier to peel off the raft.",
"unit": "mm", "unit": "mm",
"type": "float", "type": "float",
"default": 0.35, "default": 0.3,
"min_value": "0", "min_value": "0",
"max_value_warning": "1.0", "max_value_warning": "1.0",
"enabled": "adhesion_type == \"raft\"", "enabled": "adhesion_type == \"raft\"",
"global_only": "True", "global_only": "True",
"visible": true "visible": true
}, },
"layer_0_z_overlap": {
"label": "Initial Layer Z Overlap",
"description": "Make the first and second layer of the object overlap in the Z direction to compensate for the filament lost in the airgap. All models above the first model layer will be shifted down by this amount.",
"unit": "mm",
"type": "float",
"default": 0.05,
"inherit_function": "layer_height / 2",
"min_value": "0",
"max_value_warning": "layer_height",
"enabled": "adhesion_type == \"raft\"",
"global_only": "True",
"visible": true
},
"raft_surface_layers": { "raft_surface_layers": {
"label": "Raft Top Layers", "label": "Raft Top Layers",
"description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.", "description": "The number of top layers on top of the 2nd raft layer. These are fully filled layers that the object sits on. 2 layers result in a smoother top surface than 1.",

View File

@ -30,14 +30,19 @@ UM.PreferencesPage
UM.Preferences.resetPreference("general/language") UM.Preferences.resetPreference("general/language")
UM.Preferences.resetPreference("physics/automatic_push_free") UM.Preferences.resetPreference("physics/automatic_push_free")
UM.Preferences.resetPreference("mesh/scale_to_fit") UM.Preferences.resetPreference("mesh/scale_to_fit")
UM.Preferences.resetPreference("info/automatic_update_check")
UM.Preferences.resetPreference("info/send_slice_info") UM.Preferences.resetPreference("info/send_slice_info")
UM.Preferences.resetPreference("cura/jobname_prefix")
pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free")) pushFreeCheckbox.checked = boolCheck(UM.Preferences.getValue("physics/automatic_push_free"))
checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit")) scaleToFitCheckbox.checked = boolCheck(UM.Preferences.getValue("mesh/scale_to_fit"))
prefixJobNameCheckbox.checked = boolCheck(UM.Preferences.getValue("cura/jobname_prefix"))
var defaultLanguage = UM.Preferences.getValue("general/language") var defaultLanguage = UM.Preferences.getValue("general/language")
setDefaultLanguage(defaultLanguage) setDefaultLanguage(defaultLanguage)
if (UM.Models.pluginsModel.find("id", "UpdateChecker") > -1) {
UM.Preferences.resetPreference("info/automatic_update_check")
checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
}
} }
ColumnLayout ColumnLayout
@ -113,7 +118,7 @@ UM.PreferencesPage
UM.TooltipArea { UM.TooltipArea {
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect.") text: catalog.i18nc("@info:tooltip", "Should objects on the platform be moved so that they no longer intersect?")
CheckBox CheckBox
{ {
@ -153,6 +158,7 @@ UM.PreferencesPage
} }
UM.TooltipArea { UM.TooltipArea {
visible: UM.Models.pluginsModel.find("id", "UpdateChecker") > -1
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?")
@ -179,5 +185,19 @@ UM.PreferencesPage
onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked) onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked)
} }
} }
UM.TooltipArea {
width: childrenRect.width
height: childrenRect.height
text: catalog.i18nc("@info:tooltip", "Should a prefix based on the printer name be added to the print job name automatically?")
CheckBox
{
id: prefixJobNameCheckbox
text: catalog.i18nc("@option:check", "Add machine prefix to job name")
checked: boolCheck(UM.Preferences.getValue("cura/jobname_prefix"))
onCheckedChanged: UM.Preferences.setValue("cura/jobname_prefix", checked)
}
}
} }
} }

View File

@ -31,6 +31,7 @@ Rectangle {
function createFileName(){ function createFileName(){
var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ") var splitMachineName = UM.MachineManager.activeMachineInstance.split(" ")
var abbrMachine = '' var abbrMachine = ''
if ((UM.Preferences.getValue("cura/jobname_prefix"))) {
for (var i = 0; i < splitMachineName.length; i++){ for (var i = 0; i < splitMachineName.length; i++){
if (splitMachineName[i].search(/ultimaker/i) != -1){ if (splitMachineName[i].search(/ultimaker/i) != -1){
abbrMachine += 'UM' abbrMachine += 'UM'
@ -48,7 +49,10 @@ Rectangle {
} }
} }
} }
printJobTextfield.text = abbrMachine + '_' + base.fileBaseName printJobTextfield.text = abbrMachine + '_' + base.fileBaseName
} else {
printJobTextfield.text = base.fileBaseName
}
} }
Connections { Connections {