mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Merge branch 'master' of https://github.com/Ultimaker/Cura
This commit is contained in:
commit
329a3dce00
9 changed files with 55 additions and 66 deletions
|
@ -23,7 +23,7 @@ class ConvexHullNode(SceneNode):
|
|||
self._original_parent = parent
|
||||
|
||||
# Color of the drawn convex hull
|
||||
self._color = Color(35, 35, 35, 192)
|
||||
self._color = Color(0.4, 0.4, 0.4, 1.0)
|
||||
|
||||
# The y-coordinate of the convex hull mesh. Must not be 0, to prevent z-fighting.
|
||||
self._mesh_height = 0.1
|
||||
|
|
|
@ -95,11 +95,11 @@ class PlatformPhysics:
|
|||
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
|
||||
head_hull = node.callDecoration("getConvexHullHead")
|
||||
if head_hull:
|
||||
overlap = head_hull.intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
||||
overlap = head_hull.intersectsPolygon(other_node.callDecoration("getConvexHullHead"))
|
||||
if not overlap:
|
||||
other_head_hull = other_node.callDecoration("getConvexHullHead")
|
||||
if other_head_hull:
|
||||
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_head_hull)
|
||||
overlap = node.callDecoration("getConvexHullHead").intersectsPolygon(other_head_hull)
|
||||
else:
|
||||
own_convex_hull = node.callDecoration("getConvexHull")
|
||||
other_convex_hull = other_node.callDecoration("getConvexHull")
|
||||
|
|
|
@ -269,13 +269,16 @@ class MachineManager(QObject):
|
|||
if property_name == "global_inherits_stack":
|
||||
if self._active_container_stack and self._active_container_stack != self._global_container_stack:
|
||||
# Update the global user value when the "global_inherits_stack" function points to a different stack
|
||||
stack_index = int(self._active_container_stack.getProperty(key, property_name))
|
||||
extruder_stacks = [stack for stack in ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())]
|
||||
extruder_stacks = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId()))
|
||||
target_stack_position = int(self._active_container_stack.getProperty(key, "global_inherits_stack"))
|
||||
if target_stack_position == -1: # Prevent -1 from selecting wrong stack.
|
||||
target_stack = self._active_container_stack
|
||||
else:
|
||||
target_stack = extruder_stacks[target_stack_position]
|
||||
|
||||
if len(extruder_stacks) > stack_index:
|
||||
new_value = extruder_stacks[stack_index].getProperty(key, "value")
|
||||
if self._global_container_stack.getProperty(key, "value") != new_value:
|
||||
self._global_container_stack.getTop().setProperty(key, "value", new_value)
|
||||
new_value = target_stack.getProperty(key, "value")
|
||||
if self._global_container_stack.getProperty(key, "value") != new_value:
|
||||
self._global_container_stack.getTop().setProperty(key, "value", new_value)
|
||||
|
||||
if property_name == "validationState":
|
||||
if self._global_stack_valid:
|
||||
|
@ -549,7 +552,7 @@ class MachineManager(QObject):
|
|||
return ""
|
||||
|
||||
@pyqtSlot(str, str)
|
||||
def renameQualityContainer(self, container_id, new_name):
|
||||
def renameQualityContainer(self, container_id, nbalew_name):
|
||||
containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(id = container_id, type = "quality")
|
||||
if containers:
|
||||
new_name = self._createUniqueName("quality", containers[0].getName(), new_name,
|
||||
|
|
|
@ -92,7 +92,7 @@ class CuraEngineBackend(Backend):
|
|||
self._always_restart = True #Always restart the engine when starting a new slice. Don't keep the process running. TODO: Fix engine statelessness.
|
||||
self._process_layers_job = None #The currently active job to process layers, or None if it is not processing layers.
|
||||
|
||||
self._backend_log_max_lines = 200 # Maximal count of lines to buffer
|
||||
self._backend_log_max_lines = 20000 # Maximum number of lines to buffer
|
||||
self._error_message = None #Pop-up message that shows errors.
|
||||
|
||||
self.backendQuit.connect(self._onBackendQuit)
|
||||
|
@ -252,6 +252,9 @@ class CuraEngineBackend(Backend):
|
|||
return
|
||||
|
||||
super()._onSocketError(error)
|
||||
if error.getErrorCode() == Arcus.ErrorCode.Debug:
|
||||
return
|
||||
|
||||
self._terminate()
|
||||
|
||||
if error.getErrorCode() not in [Arcus.ErrorCode.BindFailedError, Arcus.ErrorCode.ConnectionResetError, Arcus.ErrorCode.Debug]:
|
||||
|
|
|
@ -630,9 +630,8 @@
|
|||
"type": "float",
|
||||
"enabled": "support_enable",
|
||||
"value": "line_width",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"support_roof_line_width":
|
||||
{
|
||||
|
@ -645,9 +644,8 @@
|
|||
"type": "float",
|
||||
"enabled": "support_roof_enable",
|
||||
"value": "line_width",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"prime_tower_line_width":
|
||||
{
|
||||
|
@ -1444,10 +1442,9 @@
|
|||
"maximum_value_warning": "150",
|
||||
"default_value": 60,
|
||||
"value": "speed_print",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"enabled": "support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false,
|
||||
"settable_per_extruder": true,
|
||||
"children":
|
||||
{
|
||||
"speed_support_infill":
|
||||
|
@ -1461,10 +1458,9 @@
|
|||
"maximum_value": "299792458000",
|
||||
"maximum_value_warning": "150",
|
||||
"value": "speed_support",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"enabled": "support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"speed_support_roof":
|
||||
{
|
||||
|
@ -1478,9 +1474,8 @@
|
|||
"maximum_value_warning": "150",
|
||||
"enabled": "support_roof_enable and support_enable",
|
||||
"value": "speed_support / 1.5",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1650,10 +1645,9 @@
|
|||
"maximum_value_warning": "10000",
|
||||
"default_value": 3000,
|
||||
"value": "acceleration_print",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"enabled": "acceleration_enabled and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false,
|
||||
"settable_per_extruder": true,
|
||||
"children": {
|
||||
"acceleration_support_infill": {
|
||||
"label": "Support Infill Acceleration",
|
||||
|
@ -1662,13 +1656,12 @@
|
|||
"type": "float",
|
||||
"default_value": 3000,
|
||||
"value": "acceleration_support",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"minimum_value": "0.1",
|
||||
"minimum_value_warning": "100",
|
||||
"maximum_value_warning": "10000",
|
||||
"enabled": "acceleration_enabled and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"acceleration_support_roof": {
|
||||
"label": "Support Roof Acceleration",
|
||||
|
@ -1677,13 +1670,12 @@
|
|||
"type": "float",
|
||||
"default_value": 3000,
|
||||
"value": "acceleration_support",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"minimum_value": "0.1",
|
||||
"minimum_value_warning": "100",
|
||||
"maximum_value_warning": "10000",
|
||||
"enabled": "acceleration_enabled and support_roof_enable and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1841,10 +1833,9 @@
|
|||
"maximum_value_warning": "50",
|
||||
"default_value": 20,
|
||||
"value": "jerk_print",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"enabled": "jerk_enabled and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false,
|
||||
"settable_per_extruder": true,
|
||||
"children": {
|
||||
"jerk_support_infill": {
|
||||
"label": "Support Infill Jerk",
|
||||
|
@ -1853,13 +1844,12 @@
|
|||
"type": "float",
|
||||
"default_value": 20,
|
||||
"value": "jerk_support",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"minimum_value": "0.1",
|
||||
"minimum_value_warning": "5",
|
||||
"maximum_value_warning": "50",
|
||||
"enabled": "jerk_enabled and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"jerk_support_roof": {
|
||||
"label": "Support Roof Jerk",
|
||||
|
@ -1868,13 +1858,12 @@
|
|||
"type": "float",
|
||||
"default_value": 20,
|
||||
"value": "jerk_support",
|
||||
"global_inherits_stack": "support_extruder_nr",
|
||||
"minimum_value": "0.1",
|
||||
"minimum_value_warning": "5",
|
||||
"maximum_value_warning": "50",
|
||||
"enabled": "jerk_enabled and support_roof_enable and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2180,7 +2169,7 @@
|
|||
"default_value": "zigzag",
|
||||
"enabled": "support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"support_connect_zigzags":
|
||||
{
|
||||
|
@ -2190,7 +2179,7 @@
|
|||
"default_value": true,
|
||||
"enabled": "support_enable and (support_pattern == \"zigzag\")",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"support_infill_rate":
|
||||
{
|
||||
|
@ -2203,7 +2192,7 @@
|
|||
"default_value": 15,
|
||||
"enabled": "support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false,
|
||||
"settable_per_extruder": true,
|
||||
"children": {
|
||||
"support_line_distance":
|
||||
{
|
||||
|
@ -2216,7 +2205,7 @@
|
|||
"enabled": "support_enable",
|
||||
"value": "(support_line_width * 100) / support_infill_rate * (2 if support_pattern == \"grid\" else (3 if support_pattern == \"triangles\" else 1))",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2389,7 +2378,7 @@
|
|||
"maximum_value_warning": "100",
|
||||
"enabled":"support_roof_enable and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false,
|
||||
"settable_per_extruder": true,
|
||||
"children":
|
||||
{
|
||||
"support_roof_line_distance":
|
||||
|
@ -2403,7 +2392,7 @@
|
|||
"value": "0 if support_roof_density == 0 else (support_roof_line_width * 100) / support_roof_density * (2 if support_roof_pattern == \"grid\" else (3 if support_roof_pattern == \"triangles\" else 1))",
|
||||
"enabled": "support_roof_enable and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2423,7 +2412,7 @@
|
|||
"default_value": "concentric",
|
||||
"enabled": "support_roof_enable and support_enable",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
"settable_per_extruder": true
|
||||
},
|
||||
"support_use_towers":
|
||||
{
|
||||
|
@ -3359,7 +3348,7 @@
|
|||
"maximum_value_warning": "9999",
|
||||
"default_value": 0,
|
||||
"value": "9999 if draft_shield_height_limitation == 'full' and draft_shield_enabled else 0.0",
|
||||
"enabled": "draft_shield_height_limitation == \"limited\"",
|
||||
"enabled": "draft_shield_enabled and draft_shield_height_limitation == \"limited\"",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
},
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
"default_value": 2
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"default_value": 48
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
|
|
@ -22,7 +22,7 @@ Rectangle
|
|||
{
|
||||
if(!printerConnected)
|
||||
return UM.Theme.getColor("status_offline")
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print")
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print" || Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup" )
|
||||
return UM.Theme.getColor("status_busy")
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "")
|
||||
return UM.Theme.getColor("status_ready")
|
||||
|
@ -53,6 +53,10 @@ Rectangle
|
|||
{
|
||||
return catalog.i18nc("@label:", "Preparing...")
|
||||
}
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup")
|
||||
{
|
||||
return catalog.i18nc("@label:", "Waiting for cleanup...")
|
||||
}
|
||||
else
|
||||
{
|
||||
return " "
|
||||
|
|
|
@ -108,7 +108,7 @@ Rectangle
|
|||
iconSource: {
|
||||
if(!printerConnected)
|
||||
return UM.Theme.getIcon("tab_monitor")
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print")
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "printing" || Cura.MachineManager.printerOutputDevices[0].jobState == "pre_print" || Cura.MachineManager.printerOutputDevices[0].jobState == "wait_cleanup" )
|
||||
return UM.Theme.getIcon("tab_monitor_busy")
|
||||
else if(Cura.MachineManager.printerOutputDevices[0].jobState == "ready" || Cura.MachineManager.printerOutputDevices[0].jobState == "")
|
||||
return UM.Theme.getIcon("tab_monitor_connected")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[shaders]
|
||||
vertex =
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
uniform highp mat4 u_normalMatrix;
|
||||
|
||||
attribute highp vec4 a_vertex;
|
||||
|
@ -10,7 +10,6 @@ vertex =
|
|||
|
||||
varying highp vec3 v_vertex;
|
||||
varying highp vec3 v_normal;
|
||||
varying highp vec2 v_uvs;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
@ -19,56 +18,47 @@ vertex =
|
|||
|
||||
v_vertex = world_space_vert.xyz;
|
||||
v_normal = (u_normalMatrix * normalize(a_normal)).xyz;
|
||||
|
||||
v_uvs = a_uvs;
|
||||
}
|
||||
|
||||
fragment =
|
||||
uniform mediump vec4 u_ambientColor;
|
||||
uniform mediump vec4 u_diffuseColor;
|
||||
uniform highp vec3 u_lightPosition;
|
||||
uniform highp vec3 u_viewPosition;
|
||||
|
||||
uniform mediump float u_opacity;
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
varying highp vec3 v_vertex;
|
||||
varying highp vec3 v_normal;
|
||||
varying highp vec2 v_uvs;
|
||||
|
||||
void main()
|
||||
{
|
||||
// Copied from platform.shader, removed texture
|
||||
mediump vec4 final_color = vec4(0.0);
|
||||
mediump vec4 finalColor = vec4(0.0);
|
||||
|
||||
/* Ambient Component */
|
||||
final_color += u_ambientColor;
|
||||
finalColor += u_ambientColor;
|
||||
|
||||
highp vec3 normal = normalize(v_normal);
|
||||
highp vec3 light_dir = normalize(u_lightPosition - v_vertex);
|
||||
highp vec3 lightDir = normalize(u_lightPosition - v_vertex);
|
||||
|
||||
/* Diffuse Component */
|
||||
highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0);
|
||||
final_color += (n_dot_l * u_diffuseColor);
|
||||
highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0);
|
||||
finalColor += (NdotL * u_diffuseColor);
|
||||
|
||||
final_color.a = u_opacity;
|
||||
|
||||
gl_FragColor = final_color;
|
||||
gl_FragColor = finalColor;
|
||||
gl_FragColor.a = u_opacity;
|
||||
}
|
||||
|
||||
[defaults]
|
||||
u_ambientColor = [0.3, 0.3, 0.3, 1.0]
|
||||
u_diffuseColor = [1.0, 1.0, 1.0, 1.0]
|
||||
u_ambientColor = [0.1, 0.1, 0.1, 1.0]
|
||||
u_diffuseColor = [0.4, 0.4, 0.4, 1.0]
|
||||
u_opacity = 0.5
|
||||
u_texture = 0
|
||||
|
||||
[bindings]
|
||||
u_viewProjectionMatrix = view_projection_matrix
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewProjectionMatrix = view_projection_matrix
|
||||
u_normalMatrix = normal_matrix
|
||||
u_lightPosition = light_0_position
|
||||
u_viewPosition = camera_position
|
||||
|
||||
[attributes]
|
||||
a_vertex = vertex
|
||||
a_normal = normal
|
||||
a_uvs = uv0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue