mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 11:05:57 +08:00
Merge remote-tracking branch 'origin/master' into refactoring_machine_manager
This commit is contained in:
commit
a29a6122f1
@ -826,6 +826,7 @@ class BuildVolume(SceneNode):
|
||||
offset_y = extruder.getProperty("machine_nozzle_offset_y", "value")
|
||||
if offset_y is None:
|
||||
offset_y = 0
|
||||
offset_y = -offset_y #Y direction of g-code is the inverse of Y direction of Cura's scene space.
|
||||
result[extruder_id] = []
|
||||
|
||||
for polygon in machine_disallowed_polygons:
|
||||
|
@ -3,12 +3,14 @@
|
||||
|
||||
import copy
|
||||
|
||||
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
||||
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
|
||||
from UM.Signal import Signal, signalemitter
|
||||
from UM.Settings.InstanceContainer import InstanceContainer
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
from UM.Logger import Logger
|
||||
|
||||
from UM.Settings.Validator import ValidatorState
|
||||
from PyQt5.QtCore import QTimer
|
||||
from UM.Application import Application
|
||||
|
||||
from cura.Settings.PerObjectContainerStack import PerObjectContainerStack
|
||||
@ -38,6 +40,10 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||
self._extruder_stack = ExtruderManager.getInstance().getExtruderStack(0).getId()
|
||||
|
||||
self._is_non_printing_mesh = False
|
||||
self._error_check_timer = QTimer()
|
||||
self._error_check_timer.setInterval(250)
|
||||
self._error_check_timer.setSingleShot(True)
|
||||
self._error_check_timer.timeout.connect(self._checkStackForErrors)
|
||||
|
||||
self._stack.propertyChanged.connect(self._onSettingChanged)
|
||||
|
||||
@ -93,10 +99,22 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
||||
# Trigger slice/need slicing if the value has changed.
|
||||
if property_name == "value":
|
||||
self._is_non_printing_mesh = any(bool(self._stack.getProperty(setting, "value")) for setting in self._non_printing_mesh_settings)
|
||||
|
||||
if not self._is_non_printing_mesh:
|
||||
# self._error_check_timer.start()
|
||||
self._checkStackForErrors()
|
||||
Application.getInstance().getBackend().needsSlicing()
|
||||
Application.getInstance().getBackend().tickle()
|
||||
|
||||
def _checkStackForErrors(self):
|
||||
hasErrors = False;
|
||||
for key in self._stack.getAllKeys():
|
||||
validation_state = self._stack.getProperty(key, "validationState")
|
||||
if validation_state in (ValidatorState.Exception, ValidatorState.MaximumError, ValidatorState.MinimumError):
|
||||
Logger.log("w", "Setting Per Object %s is not valid.", key)
|
||||
hasErrors = True
|
||||
break
|
||||
Application.getInstance().getObjectsModel().setStacksHaveErrors(hasErrors)
|
||||
|
||||
## Makes sure that the stack upon which the container stack is placed is
|
||||
# kept up to date.
|
||||
def _updateNextStack(self):
|
||||
|
@ -44,7 +44,6 @@ class PerObjectSettingsTool(Tool):
|
||||
self._error_check_timer.setSingleShot(True)
|
||||
self._error_check_timer.timeout.connect(self._updateStacksHaveErrors)
|
||||
|
||||
|
||||
def event(self, event):
|
||||
super().event(event)
|
||||
if event.type == Event.MousePressEvent and self._controller.getToolsEnabled():
|
||||
@ -156,10 +155,12 @@ class PerObjectSettingsTool(Tool):
|
||||
|
||||
def _onPropertyChanged(self, key: str, property_name: str) -> None:
|
||||
if property_name == "validationState":
|
||||
self._error_check_timer.start()
|
||||
# self._error_check_timer.start()
|
||||
return
|
||||
|
||||
def _updateStacksHaveErrors(self) -> None:
|
||||
self._checkStacksHaveErrors()
|
||||
return
|
||||
# self._checkStacksHaveErrors()
|
||||
|
||||
|
||||
def _checkStacksHaveErrors(self):
|
||||
@ -180,6 +181,7 @@ class PerObjectSettingsTool(Tool):
|
||||
|
||||
|
||||
def _checkStackForErrors(self, stack):
|
||||
print("checking for errors")
|
||||
if stack is None:
|
||||
return False
|
||||
|
||||
|
@ -21,10 +21,10 @@
|
||||
"overrides": {
|
||||
"machine_name": { "default_value": "FABtotum Personal Fabricator" },
|
||||
"machine_start_gcode": {
|
||||
"default_value": ";Layer height: {layer_height}\n;Walls: {wall_thickness}\n;Fill: {infill_sparse_density}\n;Top\\Bottom Thickness: {top_bottom_thickness}\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nG4 S1 ;1 millisecond pause to buffer the bep bep \nM728 ;FAB bep bep (start the print, go check the oozing and skirt lines adesion) \nG4 S1 ;1 second pause to reach the printer (run fast)\nG92 E0 ;zero the extruded length \nG1 F200 E35 ;slowly extrude 35mm of filament to clean the nozzle and build up extrusion pressure \nG92 E0 ;zero the extruded length again \nG1 F{speed_travel} ;Set travel speed \n;print"
|
||||
"default_value": ";Layer height: {layer_height}\n;Walls: {wall_thickness}\n;Fill: {infill_sparse_density}\n;Top\\Bottom Thickness: {top_bottom_thickness}\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nG4 S1 ;1 millisecond pause to buffer the bep bep \nM300 S2 ;FAB bep bep (start the print, go check the oozing and skirt lines adesion) \nG4 S1 ;1 second pause to reach the printer (run fast)\nG92 E0 ;zero the extruded length \nG1 F200 E35 ;slowly extrude 35mm of filament to clean the nozzle and build up extrusion pressure \nG92 E0 ;zero the extruded length again \n;print"
|
||||
},
|
||||
"machine_end_gcode": {
|
||||
"default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-3 X+5 Y+5 F5000 ;move Z up a bit and retract filament even more\n;end of the print\nM84 ;steppers off\nG90 ;absolute positioning\nM728 ;FAB bep bep (end print)"
|
||||
"default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-3 X+5 Y+5 F5000 ;move Z up a bit and retract filament even more\n;end of the print\nM84 ;steppers off\nG90 ;absolute positioning\nM300 S2 ;FAB bep bep (end print)"
|
||||
},
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"machine_width": { "default_value": 214 },
|
||||
|
@ -123,7 +123,6 @@
|
||||
"raft_margin": { "value": "10" },
|
||||
"raft_surface_layers": { "value": "1" },
|
||||
"retraction_amount": { "value": "2" },
|
||||
"retraction_combing": { "default_value": "noskin" },
|
||||
"retraction_count_max": { "value": "10" },
|
||||
"retraction_extrusion_window": { "value": "1" },
|
||||
"retraction_hop": { "value": "2" },
|
||||
@ -154,6 +153,7 @@
|
||||
"travel_avoid_distance": { "value": "3" },
|
||||
"wall_0_inset": { "value": "0" },
|
||||
"wall_line_width_x": { "value": "round(wall_line_width * 0.3 / 0.35, 2)" },
|
||||
"wall_thickness": { "value": "1" }
|
||||
"wall_thickness": { "value": "1" },
|
||||
"zig_zaggify_infill": { "value": "True" }
|
||||
}
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ material_diameter
|
||||
material_adhesion_tendency
|
||||
material_surface_energy
|
||||
material_flow
|
||||
material_flow_layer_0
|
||||
retraction_enable
|
||||
retract_at_layer_change
|
||||
retraction_amount
|
||||
@ -218,6 +219,7 @@ support_bottom_extruder_nr
|
||||
support_type
|
||||
support_angle
|
||||
support_pattern
|
||||
zig_zaggify_support
|
||||
support_connect_zigzags
|
||||
support_infill_rate
|
||||
support_line_distance
|
||||
@ -281,6 +283,7 @@ raft_fan_speed
|
||||
|
||||
[dual]
|
||||
prime_tower_enable
|
||||
prime_tower_circular
|
||||
prime_tower_size
|
||||
prime_tower_min_volume
|
||||
prime_tower_wall_thickness
|
||||
|
@ -236,6 +236,16 @@ Item
|
||||
onTriggered: CuraActions.deleteSelection();
|
||||
}
|
||||
|
||||
Action //Also add backspace as the same function as delete because on Macintosh keyboards the button called "delete" is actually a backspace, and the user expects it to function as a delete.
|
||||
{
|
||||
id: backspaceSelectionAction
|
||||
text: catalog.i18ncp("@action:inmenu menubar:edit", "Delete &Selected Model", "Delete &Selected Models", UM.Selection.selectionCount)
|
||||
enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection
|
||||
iconName: "edit-delete"
|
||||
shortcut: StandardKey.Backspace
|
||||
onTriggered: CuraActions.deleteSelection()
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: centerSelectionAction;
|
||||
|
@ -12,9 +12,10 @@ material = fabtotum_abs
|
||||
|
||||
[values]
|
||||
adhesion_type = raft
|
||||
speed_print = 80
|
||||
layer_height = 0.2
|
||||
layer_height_0 = 0.2
|
||||
cool_fan_enabled = True
|
||||
cool_fan_enabled = False
|
||||
cool_fan_full_at_height = 0.4
|
||||
cool_fan_speed = 50
|
||||
cool_fan_speed_max = 50
|
||||
|
@ -12,9 +12,10 @@ material = fabtotum_abs
|
||||
|
||||
[values]
|
||||
adhesion_type = raft
|
||||
speed_print = 45
|
||||
layer_height = 0.1
|
||||
layer_height_0 = 0.1
|
||||
cool_fan_enabled = True
|
||||
cool_fan_enabled = False
|
||||
cool_fan_full_at_height = 0.2
|
||||
cool_fan_speed = 50
|
||||
cool_fan_speed_max = 50
|
||||
|
@ -12,9 +12,10 @@ material = fabtotum_abs
|
||||
|
||||
[values]
|
||||
adhesion_type = raft
|
||||
speed_print = 60
|
||||
layer_height = 0.15
|
||||
layer_height_0 = 0.15
|
||||
cool_fan_enabled = True
|
||||
cool_fan_enabled = False
|
||||
cool_fan_full_at_height = 0.3
|
||||
cool_fan_speed = 50
|
||||
cool_fan_speed_max = 50
|
||||
|
@ -44,7 +44,7 @@ skirt_gap = 1.5
|
||||
skirt_line_count = 5
|
||||
speed_infill = =speed_print
|
||||
speed_layer_0 = 25
|
||||
speed_print = 50
|
||||
speed_print = 30
|
||||
speed_topbottom = 40
|
||||
speed_travel = 200
|
||||
speed_wall_0 = 40
|
||||
|
@ -44,7 +44,7 @@ skirt_gap = 1.5
|
||||
skirt_line_count = 5
|
||||
speed_infill = =speed_print
|
||||
speed_layer_0 = 25
|
||||
speed_print = 50
|
||||
speed_print = 30
|
||||
speed_topbottom = 40
|
||||
speed_travel = 200
|
||||
speed_wall_0 = 40
|
||||
|
@ -44,7 +44,7 @@ skirt_gap = 1.5
|
||||
skirt_line_count = 5
|
||||
speed_infill = =speed_print
|
||||
speed_layer_0 = 25
|
||||
speed_print = 50
|
||||
speed_print = 30
|
||||
speed_topbottom = 40
|
||||
speed_travel = 200
|
||||
speed_wall_0 = 40
|
||||
|
@ -12,6 +12,7 @@ material = fabtotum_pla
|
||||
|
||||
[values]
|
||||
adhesion_type = skirt
|
||||
speed_print = 80
|
||||
layer_height = 0.2
|
||||
layer_height_0 = 0.2
|
||||
cool_fan_enabled = True
|
||||
|
@ -12,6 +12,7 @@ material = fabtotum_pla
|
||||
|
||||
[values]
|
||||
adhesion_type = skirt
|
||||
speed_print = 45
|
||||
layer_height = 0.1
|
||||
layer_height_0 = 0.1
|
||||
cool_fan_enabled = True
|
||||
|
@ -12,6 +12,7 @@ material = fabtotum_pla
|
||||
|
||||
[values]
|
||||
adhesion_type = skirt
|
||||
speed_print = 60
|
||||
layer_height = 0.15
|
||||
layer_height_0 = 0.15
|
||||
cool_fan_enabled = True
|
||||
|
25
resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg
Normal file
25
resources/quality/fabtotum/fabtotum_tpu_fast.inst.cfg
Normal file
@ -0,0 +1,25 @@
|
||||
[general]
|
||||
version = 2
|
||||
definition = fabtotum
|
||||
name = Fast Quality
|
||||
|
||||
[metadata]
|
||||
type = quality
|
||||
setting_version = 4
|
||||
material = fabtotum_tpu
|
||||
quality_type = fast
|
||||
weight = -1
|
||||
|
||||
[values]
|
||||
adhesion_type = skirt
|
||||
speed_print = 80
|
||||
layer_height = 0.2
|
||||
layer_height_0 = 0.2
|
||||
cool_fan_enabled = True
|
||||
cool_fan_full_at_height = 0.4
|
||||
cool_fan_speed = 100
|
||||
cool_fan_speed_max = 100
|
||||
cool_fan_speed_min = 100
|
||||
cool_min_layer_time = 5
|
||||
cool_min_speed = 20
|
||||
|
24
resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg
Normal file
24
resources/quality/fabtotum/fabtotum_tpu_high.inst.cfg
Normal file
@ -0,0 +1,24 @@
|
||||
[general]
|
||||
version = 2
|
||||
definition = fabtotum
|
||||
name = High Quality
|
||||
|
||||
[metadata]
|
||||
type = quality
|
||||
setting_version = 4
|
||||
material = fabtotum_tpu
|
||||
quality_type = high
|
||||
weight = 1
|
||||
|
||||
[values]
|
||||
adhesion_type = skirt
|
||||
layer_height = 0.1
|
||||
layer_height_0 = 0.1
|
||||
cool_fan_enabled = True
|
||||
cool_fan_full_at_height = 0.2
|
||||
cool_fan_speed = 100
|
||||
cool_fan_speed_max = 100
|
||||
cool_fan_speed_min = 100
|
||||
cool_min_layer_time = 5
|
||||
cool_min_speed = 20
|
||||
|
25
resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg
Normal file
25
resources/quality/fabtotum/fabtotum_tpu_normal.inst.cfg
Normal file
@ -0,0 +1,25 @@
|
||||
[general]
|
||||
version = 2
|
||||
definition = fabtotum
|
||||
name = Normal Quality
|
||||
|
||||
[metadata]
|
||||
type = quality
|
||||
setting_version = 4
|
||||
material = fabtotum_TPU
|
||||
quality_type = normal
|
||||
weight = 0
|
||||
|
||||
[values]
|
||||
adhesion_type = skirt
|
||||
speed_print = 80
|
||||
layer_height = 0.15
|
||||
layer_height_0 = 0.15
|
||||
cool_fan_enabled = True
|
||||
cool_fan_full_at_height = 0.3
|
||||
cool_fan_speed = 100
|
||||
cool_fan_speed_max = 100
|
||||
cool_fan_speed_min = 100
|
||||
cool_min_layer_time = 5
|
||||
cool_min_speed = 20
|
||||
|
@ -45,7 +45,7 @@ retraction_extrusion_window = 1
|
||||
retraction_hop = 1.5
|
||||
retraction_hop_enabled = True
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = 0.8
|
||||
retraction_min_travel = =line_width * 2
|
||||
retraction_prime_speed = 15
|
||||
skin_overlap = 5
|
||||
speed_equalize_flow_enabled = True
|
||||
|
@ -46,7 +46,7 @@ retraction_extrusion_window = 1
|
||||
retraction_hop = 1.5
|
||||
retraction_hop_enabled = True
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = 0.8
|
||||
retraction_min_travel = =line_width * 2
|
||||
retraction_prime_speed = 15
|
||||
skin_overlap = 5
|
||||
speed_equalize_flow_enabled = True
|
||||
|
@ -43,7 +43,7 @@ retraction_extrusion_window = 1
|
||||
retraction_hop = 1.5
|
||||
retraction_hop_enabled = True
|
||||
retraction_hop_only_when_collides = True
|
||||
retraction_min_travel = 0.8
|
||||
retraction_min_travel = =line_width * 2
|
||||
retraction_prime_speed = 15
|
||||
skin_overlap = 5
|
||||
speed_equalize_flow_enabled = True
|
||||
|
@ -41,7 +41,7 @@ retraction_count_max = 12
|
||||
retraction_extra_prime_amount = 0.5
|
||||
retraction_hop = 1.5
|
||||
retraction_hop_only_when_collides = False
|
||||
retraction_min_travel = 0.8
|
||||
retraction_min_travel = =line_width * 2
|
||||
retraction_prime_speed = 15
|
||||
skin_line_width = =round(line_width * 0.78 / 0.8, 2)
|
||||
speed_print = 30
|
||||
|
@ -42,7 +42,7 @@ retraction_count_max = 12
|
||||
retraction_extra_prime_amount = 0.5
|
||||
retraction_hop = 1.5
|
||||
retraction_hop_only_when_collides = False
|
||||
retraction_min_travel = 0.8
|
||||
retraction_min_travel = =line_width * 2
|
||||
retraction_prime_speed = 15
|
||||
skin_line_width = =round(line_width * 0.78 / 0.8, 2)
|
||||
speed_print = 30
|
||||
|
@ -41,7 +41,7 @@ retraction_count_max = 12
|
||||
retraction_extra_prime_amount = 0.5
|
||||
retraction_hop = 1.5
|
||||
retraction_hop_only_when_collides = False
|
||||
retraction_min_travel = 0.8
|
||||
retraction_min_travel = =line_width * 2
|
||||
retraction_prime_speed = 15
|
||||
skin_line_width = =round(line_width * 0.78 / 0.8, 2)
|
||||
speed_print = 30
|
||||
|
Loading…
x
Reference in New Issue
Block a user