Merge branch 'master' into layer_view3_cleanup

This commit is contained in:
Jack Ha 2017-01-30 11:25:55 +01:00
commit 2f9618f2ad
60 changed files with 30062 additions and 10918 deletions

View file

@ -118,7 +118,7 @@ class ThreeMFReader(MeshReader):
Job.yieldThread()
# TODO: We currently do not check for normals and simply recalculate them.
mesh_builder.calculateNormals()
mesh_builder.calculateNormals(fast=True)
mesh_builder.setFileName(name)
mesh_data = mesh_builder.build()

View file

@ -44,7 +44,7 @@ class ThreeMFWriter(MeshWriter):
result += str(matrix._data[2,2]) + " "
result += str(matrix._data[0,3]) + " "
result += str(matrix._data[1,3]) + " "
result += str(matrix._data[2,3]) + " "
result += str(matrix._data[2,3])
return result
## Should we store the archive
@ -78,10 +78,11 @@ class ThreeMFWriter(MeshWriter):
model_relation_element = ET.SubElement(relations_element, "Relationship", Target = "/3D/3dmodel.model", Id = "rel0", Type = "http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel")
model = ET.Element("model", unit = "millimeter", xmlns = self._namespaces["3mf"])
model.set("xmlns:cura", self._namespaces["cura"])
# Add the version of Cura this was created with. As "CuraVersion" is not a recognised metadata name
# by 3mf itself, we place it in our own namespace.
version_metadata = ET.SubElement(model, "metadata", xmlns = self._namespaces["cura"], name = "CuraVersion")
# Add the version of Cura this was created with. Since there is no "version" or similar metadata name we need
# to prefix it with the cura namespace, as specified by the 3MF specification.
version_metadata = ET.SubElement(model, "metadata", name = "cura:version")
version_metadata.text = Application.getInstance().getVersion()
resources = ET.SubElement(model, "resources")

View file

@ -125,6 +125,8 @@ There are no more unnecessary retractions in support.
Each layer now has less extruder switches than the machine has extruders.
Concentric infill doesnt generate the first infill perimeter next to the walls.
Extruder priming now always happens on the first layer.
Raising the build plate of the Ultimaker 2 now has the proper speed again.
Changing material while the Ultimaker 2 is paused works again.
[2.3.1]
*Layer Height in Profile Selection

View file

@ -156,11 +156,10 @@ UM.Dialog
anchors.verticalCenter: parent.verticalCenter
}
Rectangle {
Item {
width: 180
height: 20
Layout.fillWidth:true
color: "transparent"
Layout.fillWidth: true
Slider {
id: smoothing

View file

@ -71,8 +71,9 @@ Item
width: valueLabel.width + UM.Theme.getSize("default_margin").width
Behavior on height { NumberAnimation { duration: 50; } }
border.width: UM.Theme.getSize("default_lining").width;
border.color: UM.Theme.getColor("slider_groove_border");
border.width: UM.Theme.getSize("default_lining").width
border.color: UM.Theme.getColor("slider_groove_border")
color: UM.Theme.getColor("tool_panel_background")
visible: UM.LayerView.getLayerActivity && Printer.getPlatformActivity ? true : false

View file

@ -9,7 +9,7 @@ from UM.Application import Application
from UM.Preferences import Preferences
from UM.View.Renderer import Renderer
from UM.Settings.Validator import ValidatorState
from UM.Math.Color import Color
from UM.View.GL.OpenGL import OpenGL
import cura.Settings
@ -35,12 +35,14 @@ class SolidView(View):
if not self._enabled_shader:
self._enabled_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "overhang.shader"))
theme = Application.getInstance().getTheme()
self._enabled_shader.setUniformValue("u_overhangColor", Color(*theme.getColor("model_overhang").getRgb()))
if not self._disabled_shader:
self._disabled_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "striped.shader"))
theme = Application.getInstance().getTheme()
self._disabled_shader.setUniformValue("u_diffuseColor1", theme.getColor("model_unslicable").getRgbF())
self._disabled_shader.setUniformValue("u_diffuseColor2", theme.getColor("model_unslicable_alt").getRgbF())
self._disabled_shader.setUniformValue("u_diffuseColor1", Color(*theme.getColor("model_unslicable").getRgb()))
self._disabled_shader.setUniformValue("u_diffuseColor2", Color(*theme.getColor("model_unslicable_alt").getRgb()))
self._disabled_shader.setUniformValue("u_width", 50.0)
multi_extrusion = False
@ -89,7 +91,7 @@ class SolidView(View):
extruder_index = max(0, self._extruders_model.find("id", extruder_id))
try:
material_color = self._extruders_model.getItem(extruder_index)["color"]
except KeyError:
except KeyError:
material_color = self._extruders_model.defaultColors[0]
if extruder_index != ExtruderManager.getInstance().activeExtruderIndex: