mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-10 01:19:02 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
af4ea9183c
@ -64,8 +64,6 @@ Cura.MachineAction
|
|||||||
{
|
{
|
||||||
startBedLevelingButton.visible = false;
|
startBedLevelingButton.visible = false;
|
||||||
bedlevelingButton.visible = true;
|
bedlevelingButton.visible = true;
|
||||||
checkupMachineAction.heatupHotendStarted = false;
|
|
||||||
checkupMachineAction.heatupBedStarted = false;
|
|
||||||
manager.startCheck();
|
manager.startCheck();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
"default_value": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position"
|
"default_value": "G28 ; Home extruder\nM107 ; Turn off fan\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\n{IF_BED}M190 S{BED}\n{IF_EXT0}M104 T0 S{TEMP0}\n{IF_EXT0}M109 T0 S{TEMP0}\n{IF_EXT1}M104 T1 S{TEMP1}\n{IF_EXT1}M109 T1 S{TEMP1}\nG32 S3 ; auto level\nG92 E0 ; Reset extruder position"
|
||||||
},
|
},
|
||||||
"machine_end_gcode": {
|
"machine_end_gcode": {
|
||||||
"default_value": "M104 S0\nM140 S0 ; heated bed heater off\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors"
|
"default_value": "M104 S0 ; turn off extruders\nM140 S0 ; heated bed heater off\nG91 ; relative positioning\nG1 E-2 F5000; retract 2mm\nG28 Z; move bed down\nG90 ; absolute positioning\nM84 ; disable motors"
|
||||||
},
|
},
|
||||||
"layer_height": {
|
"layer_height": {
|
||||||
"default_value": 0.15
|
"default_value": 0.15
|
||||||
@ -68,7 +68,7 @@
|
|||||||
"default_value": 1.2
|
"default_value": 1.2
|
||||||
},
|
},
|
||||||
"material_print_temperature": {
|
"material_print_temperature": {
|
||||||
"default_value": 215
|
"default_value": 205
|
||||||
},
|
},
|
||||||
"material_bed_temperature": {
|
"material_bed_temperature": {
|
||||||
"default_value": 60
|
"default_value": 60
|
||||||
@ -77,23 +77,30 @@
|
|||||||
"default_value": 1.75
|
"default_value": 1.75
|
||||||
},
|
},
|
||||||
"speed_print": {
|
"speed_print": {
|
||||||
"default_value": 60
|
"default_value": 50
|
||||||
|
},
|
||||||
|
"speed_wall_0": {
|
||||||
|
"default_value": 25
|
||||||
|
},
|
||||||
|
"speed_wall_x": {
|
||||||
|
"default_value": 40
|
||||||
},
|
},
|
||||||
"speed_infill": {
|
"speed_infill": {
|
||||||
"default_value": 100
|
"default_value": 80
|
||||||
},
|
},
|
||||||
"speed_topbottom": {
|
"speed_topbottom": {
|
||||||
"default_value": 30
|
"default_value": 30
|
||||||
},
|
},
|
||||||
|
"speed_support_interface":
|
||||||
|
{
|
||||||
|
"default_value": 20
|
||||||
|
},
|
||||||
"speed_travel": {
|
"speed_travel": {
|
||||||
"default_value": 150
|
"default_value": 150
|
||||||
},
|
},
|
||||||
"speed_layer_0": {
|
"speed_layer_0": {
|
||||||
"default_value": 30.0,
|
"default_value": 30.0,
|
||||||
"minimum_value": 0.1
|
"minimum_value": 0.1
|
||||||
},
|
|
||||||
"infill_overlap": {
|
|
||||||
"default_value": 10.0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ UM.MainWindow
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
|
anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
|
||||||
visible: base.monitoringPrint
|
visible: base.monitoringPrint
|
||||||
source: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].cameraImage : ""
|
source: Cura.MachineManager.printerOutputDevices.length > 0 && Cura.MachineManager.printerOutputDevices[0].cameraImage ? Cura.MachineManager.printerOutputDevices[0].cameraImage : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageStack
|
UM.MessageStack
|
||||||
|
@ -16,23 +16,7 @@ Menu
|
|||||||
{
|
{
|
||||||
model: UM.InstanceContainersModel
|
model: UM.InstanceContainersModel
|
||||||
{
|
{
|
||||||
filter:
|
filter: materialFilter("Generic")
|
||||||
{
|
|
||||||
var result = { "type": "material" }
|
|
||||||
if(Cura.MachineManager.filterMaterialsByMachine)
|
|
||||||
{
|
|
||||||
result.definition = Cura.MachineManager.activeDefinitionId
|
|
||||||
if(Cura.MachineManager.hasVariants)
|
|
||||||
{
|
|
||||||
result.variant = Cura.MachineManager.activeVariantId
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result.definition = "fdmprinter"
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
@ -48,10 +32,137 @@ Menu
|
|||||||
onObjectAdded: menu.insertItem(index, object)
|
onObjectAdded: menu.insertItem(index, object)
|
||||||
onObjectRemoved: menu.removeItem(object)
|
onObjectRemoved: menu.removeItem(object)
|
||||||
}
|
}
|
||||||
|
MenuSeparator { }
|
||||||
|
Instantiator
|
||||||
|
{
|
||||||
|
model: brandModel
|
||||||
|
Menu
|
||||||
|
{
|
||||||
|
id: brandMenu
|
||||||
|
title: brandName
|
||||||
|
property string brandName: model.brandName
|
||||||
|
property var brandMaterials: model.materials
|
||||||
|
|
||||||
|
Instantiator
|
||||||
|
{
|
||||||
|
model: brandMaterials
|
||||||
|
Menu
|
||||||
|
{
|
||||||
|
id: brandMaterialsMenu
|
||||||
|
title: materialName
|
||||||
|
property string materialName: model.materialName
|
||||||
|
|
||||||
|
Instantiator
|
||||||
|
{
|
||||||
|
model: UM.InstanceContainersModel
|
||||||
|
{
|
||||||
|
filter: materialFilter(brandMenu.brandName, brandMaterialsMenu.materialName)
|
||||||
|
}
|
||||||
|
MenuItem
|
||||||
|
{
|
||||||
|
text: model.name
|
||||||
|
checkable: true;
|
||||||
|
checked: model.id == Cura.MachineManager.activeMaterialId;
|
||||||
|
exclusiveGroup: group;
|
||||||
|
onTriggered:
|
||||||
|
{
|
||||||
|
Cura.MachineManager.setActiveMaterial(model.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onObjectAdded: brandMaterialsMenu.insertItem(index, object)
|
||||||
|
onObjectRemoved: brandMaterialsMenu.removeItem(object)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onObjectAdded: brandMenu.insertItem(index, object)
|
||||||
|
onObjectRemoved: brandMenu.removeItem(object)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onObjectAdded: menu.insertItem(index, object)
|
||||||
|
onObjectRemoved: menu.removeItem(object)
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel
|
||||||
|
{
|
||||||
|
id: brandModel
|
||||||
|
Component.onCompleted: populateBrandModel()
|
||||||
|
}
|
||||||
|
|
||||||
|
//: Model used to populate the brandModel
|
||||||
|
UM.InstanceContainersModel
|
||||||
|
{
|
||||||
|
id: materialsModel
|
||||||
|
filter: materialFilter()
|
||||||
|
onDataChanged: populateBrandModel()
|
||||||
|
}
|
||||||
|
|
||||||
ExclusiveGroup { id: group }
|
ExclusiveGroup { id: group }
|
||||||
|
|
||||||
MenuSeparator { }
|
MenuSeparator { }
|
||||||
|
|
||||||
MenuItem { action: Cura.Actions.manageMaterials }
|
MenuItem { action: Cura.Actions.manageMaterials }
|
||||||
|
|
||||||
|
function materialFilter(brand, material)
|
||||||
|
{
|
||||||
|
var result = { "type": "material" };
|
||||||
|
if(brand)
|
||||||
|
{
|
||||||
|
result.brand = brand;
|
||||||
|
}
|
||||||
|
if(material)
|
||||||
|
{
|
||||||
|
result.material = material;
|
||||||
|
}
|
||||||
|
if(Cura.MachineManager.filterMaterialsByMachine)
|
||||||
|
{
|
||||||
|
result.definition = Cura.MachineManager.activeDefinitionId;
|
||||||
|
if(Cura.MachineManager.hasVariants)
|
||||||
|
{
|
||||||
|
result.variant = Cura.MachineManager.activeVariantId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.definition = "fdmprinter";
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function populateBrandModel()
|
||||||
|
{
|
||||||
|
// Create a structure of unique brands and their material-types
|
||||||
|
var items = materialsModel.items;
|
||||||
|
var materialsByBrand = {}
|
||||||
|
for (var i in items) {
|
||||||
|
var brandName = items[i]["metadata"]["brand"];
|
||||||
|
var materialName = items[i]["metadata"]["material"];
|
||||||
|
|
||||||
|
if (brandName == "Generic")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!materialsByBrand.hasOwnProperty(brandName))
|
||||||
|
{
|
||||||
|
materialsByBrand[brandName] = [];
|
||||||
|
}
|
||||||
|
if (materialsByBrand[brandName].indexOf(materialName) == -1)
|
||||||
|
{
|
||||||
|
materialsByBrand[brandName].push(materialName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
brandModel.clear();
|
||||||
|
for (var brand in materialsByBrand)
|
||||||
|
{
|
||||||
|
var materialsByBrandModel = [];
|
||||||
|
var materials = materialsByBrand[brand];
|
||||||
|
for (var material in materials)
|
||||||
|
{
|
||||||
|
materialsByBrandModel.push({materialName: materials[material]})
|
||||||
|
}
|
||||||
|
brandModel.append({
|
||||||
|
brandName: brand,
|
||||||
|
materials: materialsByBrandModel
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user