Merge remote-tracking branch 'origin/master' into CURA-5561_gcode_analysis

This commit is contained in:
Lipu Fei 2018-09-06 14:34:30 +02:00
commit 053613ad97
11 changed files with 58915 additions and 29 deletions

View file

@ -200,7 +200,9 @@ class QualityManager(QObject):
machine_definition_id = getMachineDefinitionIDForQualitySearch(machine.definition)
# This determines if we should only get the global qualities for the global stack and skip the global qualities for the extruder stacks
has_variant_materials = parseBool(machine.getMetaDataEntry("has_variant_materials", False))
has_variants = machine.getHasVariants()
has_materials = machine.getHasMaterials()
has_variants_or_materials = has_variants or has_materials
# To find the quality container for the GlobalStack, check in the following fall-back manner:
# (1) the machine-specific node
@ -214,7 +216,7 @@ class QualityManager(QObject):
for node in nodes_to_check:
if node and node.quality_type_map:
# Only include global qualities
if has_variant_materials:
if has_variants_or_materials:
quality_node = list(node.quality_type_map.values())[0]
is_global_quality = parseBool(quality_node.metadata.get("global_quality", False))
if not is_global_quality:
@ -302,7 +304,7 @@ class QualityManager(QObject):
for node in nodes_to_check:
if node and node.quality_type_map:
if has_variant_materials:
if has_variants_or_materials:
# Only include variant qualities; skip non global qualities
quality_node = list(node.quality_type_map.values())[0]
is_global_quality = parseBool(quality_node.metadata.get("global_quality", False))

View file

@ -13,6 +13,8 @@ from UM.Settings.SettingInstance import InstanceState
from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.Interfaces import PropertyEvaluationContext
from UM.Logger import Logger
from UM.Util import parseBool
import cura.CuraApplication
from . import Exceptions
@ -188,6 +190,12 @@ class GlobalStack(CuraContainerStack):
def getHeadAndFansCoordinates(self):
return self.getProperty("machine_head_with_fans_polygon", "value")
def getHasMaterials(self) -> bool:
return parseBool(self.getMetaDataEntry("has_materials", False))
def getHasVariants(self) -> bool:
return parseBool(self.getMetaDataEntry("has_variants", False))
## private:
global_stack_mime = MimeType(

View file

@ -44,12 +44,11 @@ UM.PointingRectangle {
id: valueLabel
anchors {
left: parent.left
leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
verticalCenter: parent.verticalCenter
horizontalCenter: parent.horizontalCenter
}
width: maximumValue.toString().length * 12 * screenScaleFactor
width: (maximumValue.toString().length + 1) * 10 * screenScaleFactor
text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array
horizontalAlignment: TextInput.AlignRight

View file

@ -33,6 +33,9 @@ class AuthorsModel(ListModel):
def _update(self):
items = []
if not self._metadata:
self.setItems([])
return
for author in self._metadata:
items.append({

View file

@ -11,7 +11,6 @@
"has_machine_quality": true,
"has_materials": true,
"has_machine_materials": true,
"has_variant_materials": true,
"has_variants": true,
"variants_name": "Tool",

View file

@ -0,0 +1,92 @@
{
"name": "Creality Ender-3",
"version": 2,
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"author": "Sacha Telgenhof",
"manufacturer": "Creality3D",
"file_formats": "text/x-gcode",
"platform": "creality_ender3_platform.stl",
"preferred_quality_type": "draft"
},
"overrides": {
"machine_name": {
"default_value": "Creality Ender-3"
},
"machine_width": {
"default_value": 220
},
"machine_height": {
"default_value": 250
},
"machine_depth": {
"default_value": 220
},
"machine_heated_bed": {
"default_value": true
},
"gantry_height": {
"default_value": 30
},
"machine_head_polygon": {
"default_value": [
[-30, 34],
[-30, -32],
[30, -32],
[30, 34]
]
},
"material_diameter": {
"default_value": 1.75
},
"acceleration_enabled": {
"default_value": true
},
"acceleration_print": {
"default_value": 500
},
"acceleration_travel": {
"default_value": 500
},
"jerk_enabled": {
"default_value": true
},
"jerk_travel": {
"default_value": 20
},
"layer_height": {
"default_value": 0.15
},
"layer_height_0": {
"default_value": 0.2
},
"adhesion_type": {
"default_value": "skirt"
},
"top_bottom_thickness": {
"default_value": 0.6
},
"retraction_amount": {
"default_value": 5
},
"retraction_speed": {
"default_value": 40
},
"cool_min_layer_time": {
"default_value": 10
},
"skirt_line_count": {
"default_value": 4
},
"skirt_gap": {
"default_value": 5
},
"machine_start_gcode": {
"default_value": "; Ender 3 Custom Start G-code\nM104 S{material_print_temperature_layer_0} ; Set Extruder temperature\nM140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature\nM190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature\nM109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature\nG28 ; Home all axes\nG92 E0 ; Reset Extruder\nG1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed\nG1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position\nG1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line\nG1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little\nG1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line\nG92 E0 ; Reset Extruder\nG1 Z5.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed"
},
"machine_end_gcode": {
"default_value": "; Ender 3 Custom End G-code\nG4 ; Wait\nM220 S100 ; Reset Speed factor override percentage to default (100%)\nM221 S100 ; Reset Extrude factor override percentage to default (100%)\nG91 ; Set coordinates to relative\nG1 F1800 E-3 ; Retract filament 3 mm to prevent oozing\nG1 F3000 Z10 ; Move Z Axis up 10 mm to allow filament ooze freely\nG90 ; Set coordinates to absolute\nG1 X0 Y{machine_depth} F1000 ; Move Heat Bed to the front for easy print removal\nM104 S0 ; Turn off Extruder temperature\nM140 S0 ; Turn off Heat Bed\nM106 S0 ; Turn off Cooling Fan\nM107 ; Turn off Fan\nM84 ; Disable stepper motors"
}
}
}

View file

@ -1297,8 +1297,8 @@
"default_value": 0,
"type": "float",
"enabled": "travel_compensate_overlapping_walls_0_enabled or travel_compensate_overlapping_walls_x_enabled",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true,
"settable_per_extruder": false
},
"wall_min_flow_retract":
{
@ -1307,8 +1307,8 @@
"type": "bool",
"default_value": false,
"enabled": "(travel_compensate_overlapping_walls_0_enabled or travel_compensate_overlapping_walls_x_enabled) and wall_min_flow > 0",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true,
"settable_per_extruder": false
},
"fill_perimeter_gaps":
{
@ -6496,6 +6496,30 @@
"settable_per_extruder": false,
"settable_per_meshgroup": false
},
"wall_overhang_angle":
{
"label": "Overhanging Wall Angle",
"description": "Walls that overhang more than this angle will be printed using overhanging wall settings. When the value is 90, no walls will be treated as overhanging.",
"unit": "°",
"type": "float",
"minimum_value": "0",
"minimum_value_warning": "2",
"maximum_value": "90",
"default_value": 90,
"settable_per_mesh": true
},
"wall_overhang_speed_factor":
{
"label": "Overhanging Wall Speed",
"description": "Overhanging walls will be printed at this percentage of their normal print speed.",
"unit": "%",
"type": "float",
"default_value": 100,
"minimum_value": "10",
"minimum_value_warning": "25",
"maximum_value": "100",
"settable_per_mesh": true
},
"bridge_settings_enabled":
{
"label": "Enable Bridge Settings",
@ -6515,8 +6539,8 @@
"minimum_value": "0",
"default_value": 5,
"enabled": "bridge_settings_enabled",
"settable_per_mesh": false,
"settable_per_extruder": true
"settable_per_mesh": true,
"settable_per_extruder": false
},
"bridge_skin_support_threshold":
{
@ -6530,18 +6554,6 @@
"enabled": "bridge_settings_enabled",
"settable_per_mesh": true
},
"bridge_wall_max_overhang":
{
"label": "Bridge Wall Max Overhang",
"description": "The maximum allowed width of the region of air below a wall line before the wall is printed using bridge settings. Expressed as a percentage of the wall line width. When the air gap is wider than this, the wall line is printed using the bridge settings. Otherwise, the wall line is printed using the normal settings. The lower the value, the more likely it is that overhung wall lines will be printed using bridge settings.",
"unit": "%",
"default_value": 100,
"type": "float",
"minimum_value": "0",
"maximum_value": "100",
"enabled": "bridge_settings_enabled",
"settable_per_mesh": true
},
"bridge_wall_coast":
{
"label": "Bridge Wall Coasting",
@ -6552,7 +6564,7 @@
"minimum_value": "0",
"maximum_value": "500",
"enabled": "bridge_settings_enabled",
"settable_per_mesh": false
"settable_per_mesh": true
},
"bridge_wall_speed":
{

View file

@ -13,7 +13,6 @@
"has_machine_quality": true,
"has_materials": true,
"has_machine_materials": true,
"has_variant_materials": true,
"has_variants": true,
"preferred_variant_name": "AA 0.4",
"preferred_quality_type": "normal",

View file

@ -13,7 +13,6 @@
"platform_offset": [0, 0, 0],
"has_machine_quality": true,
"has_machine_materials": true,
"has_variant_materials": true,
"has_materials": true,
"has_variants": true,
"preferred_variant_name": "AA 0.4",

View file

@ -15,7 +15,6 @@
"has_machine_quality": true,
"has_materials": true,
"has_machine_materials": true,
"has_variant_materials": true,
"has_variant_buildplates": true,
"has_variants": true,
"preferred_variant_name": "AA 0.4",

File diff suppressed because it is too large Load diff