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

This commit is contained in:
Ghostkeeper 2017-05-29 15:40:24 +02:00
commit b8f290d835
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75
9 changed files with 224 additions and 33 deletions

View File

@ -51,6 +51,7 @@ Third party plugins
* [Auto orientation](https://github.com/nallath/CuraOrientationPlugin): Calculate the optimal orientation for a model.
* [OctoPrint Plugin](https://github.com/fieldofview/OctoPrintPlugin): Send printjobs directly to OctoPrint and monitor their progress in Cura.
* [WirelessPrinting Plugin](https://github.com/probonopd/WirelessPrinting): Print wirelessly from Cura to your 3D printer connected to an ESP8266 module.
* [Electric Print Cost Calculator Plugin](https://github.com/zoff99/ElectricPrintCostCalculator): Calculate the electric costs of a print.
Making profiles for other printers
----------------------------------

View File

@ -3,13 +3,18 @@
from UM.i18n import i18nCatalog
from UM.OutputDevice.OutputDevice import OutputDevice
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QTimer
from PyQt5.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QTimer, pyqtSignal, QUrl
from PyQt5.QtQml import QQmlComponent, QQmlContext
from PyQt5.QtWidgets import QMessageBox
from enum import IntEnum # For the connection state tracking.
from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Logger import Logger
from UM.Signal import signalemitter
from UM.PluginRegistry import PluginRegistry
from UM.Application import Application
import os
i18n_catalog = i18nCatalog("cura")
@ -57,6 +62,11 @@ class PrinterOutputDevice(QObject, OutputDevice):
self._camera_active = False
self._monitor_view_qml_path = ""
self._monitor_component = None
self._monitor_item = None
self._qml_context = None
def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None):
raise NotImplementedError("requestWrite needs to be implemented")
@ -111,6 +121,32 @@ class PrinterOutputDevice(QObject, OutputDevice):
# Signal to be emitted when some drastic change occurs in the remaining time (not when the time just passes on normally).
preheatBedRemainingTimeChanged = pyqtSignal()
@pyqtProperty(QObject, constant=True)
def monitorItem(self):
# Note that we specifically only check if the monitor component is created.
# It could be that it failed to actually create the qml item! If we check if the item was created, it will try to
# create the item (and fail) every time.
if not self._monitor_component:
self._createMonitorViewFromQML()
return self._monitor_item
def _createMonitorViewFromQML(self):
path = QUrl.fromLocalFile(self._monitor_view_qml_path)
# Because of garbage collection we need to keep this referenced by python.
self._monitor_component = QQmlComponent(Application.getInstance()._engine, path)
# Check if the context was already requested before (Printer output device might have multiple items in the future)
if self._qml_context is None:
self._qml_context = QQmlContext(Application.getInstance()._engine.rootContext())
self._qml_context.setContextProperty("OutputDevice", self)
self._monitor_item = self._monitor_component.create(self._qml_context)
if self._monitor_item is None:
Logger.log("e", "QQmlComponent status %s", self._monitor_component.status())
Logger.log("e", "QQmlComponent error string %s", self._monitor_component.errorString())
@pyqtProperty(str, notify=printerTypeChanged)
def printerType(self):
return self._printer_type

View File

@ -1,3 +1,71 @@
[2.6.0]
*Cura versions
Cura 2.6 beta has local version folders, which means the new version wont overwrite the existing configuration and profiles from older versions, but can create a new folder instead. You can now safely check out new beta versions and, if necessary, start up an older version without the danger of losing your profiles.
*Better support adhesion
Weve added extra support settings to allow the creation of improved support profiles with better PVA/PLA adhesion. The Support Interface settings, such as speed and density, are now split up into Support Roof and Support Floor settings.
*Multi-extrusion support for custom FDM printers
Custom third-party printers and Ultimaker modifications now have multi-extrusion support.
*Model auto-arrange
Weve improved placing multiple models or multiplying the same ones, making it easier to arrange your build plate. If theres not enough build plate space or the model is placed beyond the build plate, you can rectify this by selecting Arrange all models in the context menu or by pressing Command+R (MacOS) or Ctrl+R (Windows and Linux). Cura 2.6 beta will then find a better solution for model positioning.
*Gradual infill
You can now find the Gradual Infill button in Recommended mode. This setting makes the infill concentrated near the top of the model so that we can save time and material for the lower parts of the model. This functionality is especially useful when printing with flexible materials.
*Support meshes
Its now possible to load an extra model that will be used as a support structure.
*Mold
This is a bit of an experimental improvement. Users can use it to print a mold from a 3D model, which can be cast afterwards with the material that you would like your model to have.
*Towers for tiny overhangs
Weve added a new support option allowing users to achieve more reliable results by creating towers to support even the smallest overhangs.
*Cutting meshes
Easily transform any model into a dual-extrusion print by applying a pattern for the second extruder. All areas of the original model, which also fall inside the pattern model, will be printed by the extruder selected for the pattern.
*Extruder per model selection via the context menu or extruder buttons
You can now select the necessary extruder in the right-click menu or extruder buttons. This is a quicker and more user-friendly process. The material color for each extruder will also be represented in the extruder icons.
*Custom toggle
We have made the interface a little bit cleaner and more user-friendly for switching from Recommended to Custom mode.
*Plugin installer
It used to be fairly tricky to install new plugins. We have now added a button to select and install new plugins with ease you will find it in Preferences.
*Project-based menu
Its a lot simpler to save and open files, and Cura will know if its a project, model, or gcode.
*Theme picker
If you have a custom theme, you can now apply it more easily in the preferences screen.
*Time estimates per feature
You can hover over the print time estimate in the lower right corner to see how the printing time is divided over the printing features (walls, infill, etc.).
*Invert the direction of camera zoom
Weve added an option to invert mouse direction for a better user experience.
*Olsson block upgrade
Ultimaker 2 users can now specify if they have the Olsson block installed on their machine.
*OctoPrint plugin
Cura 2.6 beta allows users to send prints to OctoPrint.
*Bug fixes
- Post Processing plugin
- Font rendering
- Progress bar
- Support Bottom Distance issues
*3rd party printers
- MAKEIT
- Alya
- Peopoly Moai
- Rigid3D Zero
- 3D maker
[2.5.0]
*Improved speed
Weve made changing printers, profiles, materials, and print cores even faster. 3MF processing is also much faster now. Opening a 3MF file now takes one tenth of the time.

View File

@ -0,0 +1,40 @@
import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import QtQuick.Layouts 1.1
import QtQuick.Dialogs 1.1
import UM 1.3 as UM
import Cura 1.0 as Cura
Component
{
Image
{
id: cameraImage
width: sourceSize.width
height: sourceSize.height * width / sourceSize.width
anchors.horizontalCenter: parent.horizontalCenter
//anchors.verticalCenter: parent.verticalCenter
//anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
//visible: base.monitoringPrint
onVisibleChanged:
{
if(visible)
{
OutputDevice.startCamera()
} else
{
OutputDevice.stopCamera()
}
}
source:
{
if(OutputDevice.cameraImage)
{
return OutputDevice.cameraImage;
}
return "";
}
}
}

View File

@ -178,6 +178,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
self._last_command = ""
self._compressing_print = False
self._monitor_view_qml_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "MonitorItem.qml")
printer_type = self._properties.get(b"machine", b"").decode("utf-8")
if printer_type.startswith("9511"):

View File

@ -19,6 +19,7 @@ from cura.Settings.CuraContainerRegistry import CuraContainerRegistry
## Handles serializing and deserializing material containers from an XML file
class XmlMaterialProfile(InstanceContainer):
CurrentFdmMaterialVersion = "1.3"
Version = 1
def __init__(self, container_id, *args, **kwargs):
@ -124,7 +125,9 @@ class XmlMaterialProfile(InstanceContainer):
builder = ET.TreeBuilder()
root = builder.start("fdmmaterial", { "xmlns": "http://www.ultimaker.com/material"})
root = builder.start("fdmmaterial",
{"xmlns": "http://www.ultimaker.com/material",
"version": self.CurrentFdmMaterialVersion})
## Begin Metadata Block
builder.start("metadata")

View File

@ -0,0 +1,68 @@
{
"id": "typeamachines",
"version": 2,
"name": "Type A Machines Series 1 2014",
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"author": "typeamachines",
"manufacturer": "typeamachines",
"category": "Other",
"file_formats": "text/x-gcode",
"platform": "tam_series1.stl",
"platform_offset": [-580.0, -6.23, 253.5],
"has_materials": false,
"supported_actions":["UpgradeFirmware"]
},
"overrides": {
"machine_name": { "default_value": "TypeAMachines" },
"layer_height": { "default_value": 0.2 },
"layer_height_0": { "default_value": 0.3 },
"infill_sparse_density": { "default_value": 5 },
"wall_thickness": { "default_value": 1 },
"top_bottom_thickness": { "default_value": 1 },
"infill_pattern": { "value": "'tetrahedral'" },
"machine_width": { "default_value": 305 },
"machine_depth": { "default_value": 305 },
"machine_height": { "default_value": 305 },
"machine_heated_bed": { "default_value": true },
"machine_head_with_fans_polygon": { "default_value": [ [ -35, 65 ], [ -35, -55 ], [ 55, 65 ], [ 55, -55 ] ] },
"gantry_height": { "default_value": 35 },
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
"machine_center_is_zero": { "default_value": false },
"speed_print": { "default_value": 60 },
"speed_travel": { "default_value": 200 },
"retraction_amount": { "default_value": 0.4 },
"retraction_speed": { "default_value": 35},
"xy_offset": { "default_value": -0.01 },
"machine_nozzle_heat_up_speed": { "default_value": 2 },
"machine_nozzle_cool_down_speed": { "default_value": 2 },
"machine_use_extruder_offset_to_offset_coords": { "default_value": true },
"material_diameter": { "default_value": 1.75 },
"machine_nozzle_tip_outer_diameter": { "default_value": 1 },
"machine_nozzle_head_distance": { "default_value": 3 },
"machine_nozzle_expansion_angle": { "default_value": 45 },
"machine_max_acceleration_x": { "default_value": 6000 },
"machine_max_acceleration_y": { "default_value": 6000 },
"machine_max_acceleration_z": { "default_value": 12000 },
"machine_max_acceleration_e": { "default_value": 175 },
"machine_start_gcode": {
"default_value": ";-- START GCODE --\n;Sliced for Type A Machines Series 1\n;Sliced at: {day} {date} {time}\n;Basic settings:\n;Layer height: {layer_height}\n;Walls: {wall_thickness}\n;Fill: {fill_distance}\n;Print Speed: {print_speed}\n;Support: {support}\n;Retraction Speed: {retraction_speed}\n;Retraction Distance: {retraction_amount}\n;Print time: {print_time}\n;Filament used: {filament_amount}m {filament_weight}g\n;Settings based on: {material_profile}\nG21 ;metric values\nG90 ;absolute positioning\nG28 ;move to endstops\nG29 ;allows for auto-levelling\nG1 Z15.0 F12000 ;move the platform down 15mm\nG1 X150 Y5 F9000 ;center\nM140 S{material_bed_temperature} ;Prep Heat Bed\nM109 S{default_material_print_temperature} ;Heat To temp\nM190 S{material_bed_temperature} ;Heat Bed to temp\nG1 X150 Y5 Z0.3 ;move the platform to purge extrusion\nG92 E0 ;zero the extruded length\nG1 F200 X250 E30 ;extrude 30mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 X150 Y150 Z25 F12000 ;recenter and begin\nG1 F9000"
},
"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-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more\nG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way\nM84 ;steppers off\nG90 ;absolute positioning"
}
}
}

Binary file not shown.

View File

@ -400,41 +400,15 @@ UM.MainWindow
}
}
Image
Loader
{
id: cameraImage
width: Math.min(viewportOverlay.width, sourceSize.width)
height: sourceSize.height * width / sourceSize.width
sourceComponent: Cura.MachineManager.printerOutputDevices.length > 0 ? Cura.MachineManager.printerOutputDevices[0].monitorItem: null
visible: base.monitoringPrint
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2
visible: base.monitoringPrint
onVisibleChanged:
{
if(Cura.MachineManager.printerOutputDevices.length == 0 )
{
return;
}
if(visible)
{
Cura.MachineManager.printerOutputDevices[0].startCamera()
} else
{
Cura.MachineManager.printerOutputDevices[0].stopCamera()
}
}
source:
{
if(!base.monitoringPrint)
{
return "";
}
if(Cura.MachineManager.printerOutputDevices.length > 0 && Cura.MachineManager.printerOutputDevices[0].cameraImage)
{
return Cura.MachineManager.printerOutputDevices[0].cameraImage;
}
return "";
}
}
UM.MessageStack