Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Ghostkeeper 2017-09-18 11:17:54 +02:00
commit 050474ef9e
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75
7 changed files with 22 additions and 30 deletions

View File

@ -34,9 +34,11 @@ Dependencies
Configuring Cura
----------------
* Link your CuraEngine backend by inserting the following line in home/.config/cura/config.cfg :
Link your CuraEngine backend by inserting the following lines in `$HOME/.config/cura/config.cfg` :
```
[backend]
location = /[path_to_the..]/CuraEngine/build/CuraEngine
```
Build scripts
-------------

View File

@ -41,7 +41,7 @@ class PlatformPhysics:
def _onSceneChanged(self, source):
self._change_timer.start()
def _onChangeTimerFinished(self):
def _onChangeTimerFinished(self, was_triggered_by_tool=False):
if not self._enabled:
return
@ -71,14 +71,15 @@ class PlatformPhysics:
# Check if this is the first time a project file node was loaded (disable auto drop in that case), defaults to True
should_auto_drop = node.getSetting("auto_drop", True)
# This should NOT happen if the scene change was triggered by a tool (like translate), only on project load
if was_triggered_by_tool:
should_auto_drop = True
# If a node is grouped or it's loaded from a project file (auto-drop disabled), don't move it down
if Preferences.getInstance().getValue("physics/automatic_drop_down") and not (node.getParent() and node.getParent().callDecoration("isGroup")) and node.isEnabled() and should_auto_drop:
z_offset = node.callDecoration("getZOffset") if node.getDecorator(ZOffsetDecorator.ZOffsetDecorator) else 0
move_vector = move_vector.set(y=-bbox.bottom + z_offset)
# Enable auto-drop after processing the project file node for the first time
node.setSetting("auto_drop", False)
# If there is no convex hull for the node, start calculating it and continue.
if not node.getDecorator(ConvexHullDecorator):
node.addDecorator(ConvexHullDecorator())
@ -167,4 +168,4 @@ class PlatformPhysics:
node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator)
self._enabled = True
self._onChangeTimerFinished()
self._onChangeTimerFinished(True)

View File

@ -101,7 +101,7 @@ class PrintInformation(QObject):
self._print_time_message_values = {}
# Full fill message values using keys from _print_time_message_translations
for key in sorted(self._print_time_message_translations.keys()):
for key in self._print_time_message_translations.keys():
self._print_time_message_values[key] = Duration(None, self)

View File

@ -77,7 +77,10 @@ class ThreeMFReader(MeshReader):
# \returns Uranium SceneNode.
def _convertSavitarNodeToUMNode(self, savitar_node):
um_node = SceneNode()
um_node.setSetting("auto_drop", False) # Disable the auto-drop feature when loading a project file and processing the nodes for the first time
# Disable the auto-drop feature when loading a project file and processing the nodes for the first time
um_node.setSetting("auto_drop", False)
transformation = self._createMatrixFromTransformationString(savitar_node.getTransformation())
um_node.setTransformation(transformation)
mesh_builder = MeshBuilder()

View File

@ -162,7 +162,7 @@ class SliceInfo(Extension):
data["models"].append(model)
print_times = print_information.printTimesPerFeature
print_times = print_information._print_time_message_values
data["print_times"] = {"travel": int(print_times["travel"].getDisplayString(DurationFormat.Format.Seconds)),
"support": int(print_times["support"].getDisplayString(DurationFormat.Format.Seconds)),
"infill": int(print_times["infill"].getDisplayString(DurationFormat.Format.Seconds)),

View File

@ -44,10 +44,8 @@ Item
{
id: resolutionLabel
anchors.top: resolutionSlider.top
anchors.topMargin: UM.Theme.getSize("default_margin").height * 1.2
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width
text: catalog.i18nc("@label", "Layer Height")
font: UM.Theme.getFont("default")
@ -57,10 +55,9 @@ Item
Text
{
id: speedLabel
anchors.top: resolutionLabel.bottom
anchors.bottom: resolutionSlider.bottom
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
anchors.topMargin: UM.Theme.getSize("default_margin").height * 1.5
text: catalog.i18nc("@label", "Print Speed")
font: UM.Theme.getFont("default")
@ -70,7 +67,7 @@ Item
Text
{
id: speedLabelSlower
anchors.top: speedLabel.top
anchors.bottom: speedLabel.bottom
anchors.left: resolutionSlider.left
text: catalog.i18nc("@label", "Slower")
@ -82,7 +79,7 @@ Item
Text
{
id: speedLabelFaster
anchors.top: speedLabel.top
anchors.bottom: speedLabel.bottom
anchors.right: resolutionSlider.right
text: catalog.i18nc("@label", "Faster")
@ -95,11 +92,11 @@ Item
{
id: resolutionSlider
anchors.top: parent.top
anchors.left: infillCellRight.left
anchors.right: infillCellRight.right
width: UM.Theme.getSize("sidebar").width * .55
height: UM.Theme.getSize("quality_slider_bar").height * 30
height: UM.Theme.getSize("quality_slider_bar").height * 25
property var model: Cura.ProfilesModel
@ -349,23 +346,12 @@ Item
}
else if (i == total_tick_count - 1)
{
start_x = current_start_x - offset * 2;
start_x = current_start_x - offset * 2.5;
}
ctx.fillText(resolutionSlider.model.getItem(i).layer_height_without_unit, start_x, text_top);
current_start_x += step_size;
}
// print currently selected quality text
if (resolutionSlider.showQualityText && resolutionSlider.currentQualityIndex != undefine)
{
const text_top = parent.height / 2 + tick_height + tick_text_height * 2;
total_tick_count = resolutionSlider.totalTickCount;
const step_size = resolutionSlider.tickStepSize;
current_start_x = (tick_left_right_margin) + step_size * (resolutionSlider.currentQualityIndex - resolutionSlider.fullRangeMin);
ctx.fillStyle = UM.Theme.getColor("quality_slider_text");
ctx.fillText(resolutionSlider.model.getItem(resolutionSlider.currentQualityIndex).name, current_start_x - 6, text_top);
}
}
MouseArea

View File

@ -289,7 +289,7 @@
"extruder_button_material_margin": [0.70, 0.9],
"extruder_button_material": [0.75, 0.75],
"sidebar": [34.0, 10.0],
"sidebar": [35.0, 10.0],
"sidebar_margin": [1.71, 1.43],
"sidebar_margin_thin": [0.71, 0.71],
"sidebar_header": [0.0, 4.0],