Merge branch 'maintenance' into devel

# Conflicts:
#	AUTHORS.md
This commit is contained in:
Gina Häußge 2017-01-13 15:12:25 +01:00
commit 9650c71155
11 changed files with 169 additions and 37 deletions

View file

@ -75,6 +75,7 @@ date of first contribution):
* [Clemens Niemeyer](https://github.com/clemniem)
* ["I-am-me"](https://github.com/I-am-me)
* [J-J Heinonen](https://github.com/jammi)
* [Noah Martin](https://github.com/noahsmartin)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and

View file

@ -1,5 +1,57 @@
# OctoPrint Changelog
## 1.3.1rc1 (2017-01-13)
### Note for upgraders
#### Change in stock terminal filter configuration
1.3.1 fixes an issue with the two terminal filters for suppressing temperature and SD status messages and adds a new filter for filtering out firmware `wait` messages. These changes will only be active automatically though for stock terminal filter configurations. If you have customized your terminal filters, you'll need to apply these changes manually under "Settings > Terminal filters":
* Changed "Suppress temperature messages" filter, new regex is `(Send: (N\d+\s+)?M105)|(Recv: ok (B|T\d*):)`
* Changed "Suppress SD status messages" filter, new regex is `(Send: (N\d+\s+)?M27)|(Recv: SD printing byte)`
* New "Suppress wait responses" filter, regex is `Recv: wait`
### Improvements
* [#1607](https://github.com/foosel/OctoPrint/issues/1607) - Way better support for password managers (e.g. browser built-in, 1Password, Lastpass)
* [#1638](https://github.com/foosel/OctoPrint/issues/1638) - Make confirmation dialog when cancelling a print optional.
* [#1656](https://github.com/foosel/OctoPrint/issues/1656) - Make wording of buttons on print cancel dialog less confusing.
* [#1705](https://github.com/foosel/OctoPrint/pull/1705) - Simplified install process on Mac by removing dependency on pyobjc.
* [#1706](https://github.com/foosel/OctoPrint/pull/1706) - Added a mask icon for Safari pinned tab and touchbar.
* Support extraction of filament diameter for volume calculation from GCODE files sliced through Simplify3D.
* Abort low priority jobs in the file analysis queue when a high priority job comes in - should make file analysis and hence time estimates show up faster for newly uploaded files.
* Added a terminal filter for firmware `wait` messages to the stock terminal filters. If you did modify your terminal filter configuration, you might want to add this manually:
* New "Suppress wait responses" filter: `Recv: wait`
### Bug fixes
* [#1637](https://github.com/foosel/OctoPrint/issues/1637) - Fix issue preventing a folder to be deleted that has a name which is a common prefix of the file currently being printed.
* [#1641](https://github.com/foosel/OctoPrint/issues/1641) - Fix issue with `octoprint --daemon` not working.
* [#1647](https://github.com/foosel/OctoPrint/issues/1647) - Fix issue with `octoprint` command throwing an error if an environment variable `OCTOPRINT_VERSION` was set to its version number.
* [#1648](https://github.com/foosel/OctoPrint/issues/1648) - Added missing `websocket-client` dependency of `octoprint client` to install script.
* [#1653](https://github.com/foosel/OctoPrint/issues/1653) - Fix for an issue with the included init script on the BBB (see also [#1654](https://github.com/foosel/OctoPrint/issues/1654))
* [#1657](https://github.com/foosel/OctoPrint/issues/1657) - Fix init script regarding check for configured `CONFIGFILE` variable.
* [#1657](https://github.com/foosel/OctoPrint/issues/1657) - Don't care about ordering of common parameters (like `--basedir`, `--config`) on CLI.
* [#1660](https://github.com/foosel/OctoPrint/issues/1660) - Do not show hint regarding keyboard controls beneath webcam stream if keyboard control feature is disabled.
* [#1667](https://github.com/foosel/OctoPrint/issues/1667) - Fix for matching folders not getting listed in the results when performing a search in the file list.
* [#1675](https://github.com/foosel/OctoPrint/issues/1675) - Fix model size calculation in GCODE analysis, produced wrong values in some cases. Also adjusted calculation to match implementation in GCODE viewer, now both produce identical results.
* [#1685](https://github.com/foosel/OctoPrint/issues/1685) - Cura Plugin: Fix filament extraction from CuraEngine slicing output
* [#1692](https://github.com/foosel/OctoPrint/issues/1692) - Cura Plugin: Fix solid layer calculation (backport from [Ultimaker/CuraEngine#140](https://github.com/Ultimaker/CuraEngine/issues/140))
* [#1693](https://github.com/foosel/OctoPrint/issues/1693) - Cura Plugin: Support `perimeter_before_infill` profile setting. Additionally added support for `solidarea_speed`, `raft_airgap_all`, `raft_surface_thickness`, `raft_surface_linewidth` profile settings and adjusted mapping for engine settings `raftAirGapLayer0`, `raftFanSpeed`, `raftSurfaceThickness`and `raftSurfaceLinewidth` according to current mapping in Cura Legacy and adjusted Mach3 GCODE flavor to substitute `S` with `P` in temperature commands of generated start code, also like in Cura Legacy.
* [#1697](https://github.com/foosel/OctoPrint/issues/1697) - Pin Jinja to versions <2.9 for now due to a backwards compatibility issue with templates for versions newer than that. Also pushed as a hotfix to 1.3.0 (as 1.3.0post1).
* Allow a retraction z-hop of 0 in timelapse configuration.
* Fix files in sub folders to not be processed by the initial analysis backlog check during startup of the server.
* Various fixes in the file analysis queue:
* High priority items are now really high priority
* Abort analysis for items that are to be deleted/moved to get around an issue with file access under Windows systems.
* Fix stock terminal filters for suppressing temperature messages and SD status messages to also be able to deal with line number prefixes. If you have added additional terminal filters, you will have to apply this fix manually:
* Changed "Suppress temperature messages" filter: `(Send: (N\d+\s+)?M105)|(Recv: ok (B|T\d*):)`
* Changed "Suppress SD status messages" filter: `(Send: (N\d+\s+)?M27)|(Recv: SD printing byte)`
* Fix issue in german translation.
([Commits](https://github.com/foosel/OctoPrint/compare/1.3.0...1.3.1rc1))
## 1.3.0 (2016-12-08)
### Features

View file

@ -11,12 +11,10 @@ thanks to everyone who contributed!
* Andrew Moorby
* Arnljot Arntsen
* Aurelio Bernal
* Bart Zudell
* Boris Hussein
* Brad Jackson
* Brent Fiegle
* Brian E. Tyler
* Charles Mitchell
* Christopher Day
* Christian Petropolis
* COLLE+McVOY
@ -25,7 +23,6 @@ thanks to everyone who contributed!
* DeltaMaker 3D Printers
* Doug Johnson
* E3D BigBox
* Erik de Bruijn
* Ernesto Martinez
* Exovite
* Frank Sander
@ -34,7 +31,6 @@ thanks to everyone who contributed!
* George Robles
* J. Eckert
* Jamie van Dyke
* Jason Galarneau
* Josh Daniels
* Joshua David Gregory
* Kaile Riser
@ -59,7 +55,6 @@ thanks to everyone who contributed!
* Samer Najia
* SD3D
* SeeMeCNC
* Shane Ekerbicer
* Simon Hallam
* Stefan Krister
* Stephane Schittly
@ -67,6 +62,7 @@ thanks to everyone who contributed!
* Sven Mueller
* Terrance Shaw
* Thomas Hatley
* Timeshell.ca
* Trent Shumay
and 972 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!
and 1016 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel)!

View file

@ -32,6 +32,7 @@
## Server
* [appdirs](http://github.com/ActiveState/appdirs): MIT
* [Awesome-Slugify](https://pypi.python.org/pypi/awesome-slugify): GPLv3
* [Click](http://click.pocoo.org/): BSD
* [feedparser](https://github.com/kurtmckee/feedparser): BSD

View file

@ -145,7 +145,6 @@ You'll need a user account with administrator privileges.
cd OctoPrint
virtualenv venv
source venv/bin/activate
pip install -U pyobjc
pip install -e .[develop]
You can then start OctoPrint via ``~/devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual

View file

@ -50,6 +50,9 @@ INSTALL_REQUIRES = [
"websocket-client>=0.40,<0.41"
]
if sys.platform == "darwin":
INSTALL_REQUIRES.append("appdirs>=1.4.0")
# Additional requirements for optional install options
EXTRA_REQUIRES = dict(
# Dependencies for developing OctoPrint

View file

@ -246,11 +246,11 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
machinecode_path = path + ".gco"
if position and isinstance(position, dict) and "x" in position and "y" in position:
posX = position["x"]
posY = position["y"]
pos_x = position["x"]
pos_y = position["y"]
else:
posX = None
posY = None
pos_x = None
pos_y = None
if on_progress:
if not on_progress_args:
@ -266,8 +266,24 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
working_dir = os.path.dirname(executable)
slicing_profile = Profile(self._load_profile(profile_path), printer_profile, posX, posY)
engine_settings = self._convert_to_engine(profile_path, printer_profile, posX, posY)
slicing_profile = Profile(self._load_profile(profile_path), printer_profile, pos_x, pos_y)
# NOTE: We can assume an extruder count of 1 here since the only way we currently
# support dual extrusion in this implementation is by using the second extruder for support (which
# the engine conversion will automatically detect and adapt accordingly).
#
# We currently do only support STL files as sliceables, which by default can only contain one mesh,
# so no risk of having to slice multi-objects at the moment, which would necessitate a full analysis
# of the objects to slice to determine amount of needed extruders to use here. If we ever decide to
# also support dual extrusion slicing (including composition from multiple STLs or support for OBJ or
# AMF files and the like), this code needs to be adapted!
#
# The extruder count is needed to decide which start/end gcode will be used from the Cura profile.
# Stock Cura implementation counts the number of objects in the scene for this (and also takes a look
# at the support usage, like the engine conversion here does). We only ever have one object.
engine_settings = self._convert_to_engine(profile_path, printer_profile,
pos_x=pos_x, pos_y=pos_y,
used_extruders=1)
# Start building the argument list for the CuraEngine command execution
args = [executable, '-v', '-p']
@ -443,9 +459,9 @@ class CuraPlugin(octoprint.plugin.SlicerPlugin,
with octoprint.util.atomic_write(path, "wb", max_permissions=0o666) as f:
yaml.safe_dump(profile, f, default_flow_style=False, indent=" ", allow_unicode=True)
def _convert_to_engine(self, profile_path, printer_profile, posX, posY):
profile = Profile(self._load_profile(profile_path), printer_profile, posX, posY)
return profile.convert_to_engine()
def _convert_to_engine(self, profile_path, printer_profile, pos_x=None, pos_y=None, used_extruders=1):
profile = Profile(self._load_profile(profile_path), printer_profile, pos_x, pos_y)
return profile.convert_to_engine(used_extruders=used_extruders)
def _sanitize_name(name):
if name is None:

View file

@ -602,8 +602,8 @@ class Profile(object):
diameters = self._get("filament_diameter")
if not match.group(1):
return diameters[0]
index = int(match.group(1))
if index >= len(diameters):
index = int(match.group(1)) - 1
if index >= len(diameters) or index < 0:
return 0.0
return diameters[index]
@ -615,8 +615,8 @@ class Profile(object):
temperatures = self._get("print_temperature")
if not match.group(1):
return temperatures[0]
index = int(match.group(1))
if index >= len(temperatures):
index = int(match.group(1)) - 1
if index >= len(temperatures) or index < 0:
return 0.0
return temperatures[index]
@ -674,9 +674,7 @@ class Profile(object):
return default
return int(value * 1000)
def get_gcode_template(self, key):
extruder_count = self.get_int("extruder_amount")
def get_gcode_template(self, key, extruder_count=1):
if key in self._profile:
gcode = self._profile[key]
else:
@ -736,7 +734,7 @@ class Profile(object):
return pre + str(f)
def get_gcode(self, key):
def get_gcode(self, key, extruder_count=1):
prefix = ""
postfix = ""
@ -746,11 +744,11 @@ class Profile(object):
return ""
if key == "start_gcode":
contents = self.get_gcode_template("start_gcode")
contents = self.get_gcode_template("start_gcode", extruder_count=extruder_count)
prefix += self.get_start_gcode_prefix(contents)
else:
contents = self.get_gcode_template(key)
contents = self.get_gcode_template(key, extruder_count=extruder_count)
return unicode(prefix + re.sub("(.)\{([^\}]*)\}", self.replaceTagMatch, contents).rstrip() + '\n' + postfix).strip().encode('utf-8') + '\n'
@ -861,13 +859,14 @@ class Profile(object):
return int(self.get_float("machine_depth") / 2.0) if not self.get_boolean("machine_center_is_zero") else 0.0
def convert_to_engine(self):
def convert_to_engine(self, used_extruders=1):
edge_width, line_count = self.calculate_edge_width_and_line_count()
solid_layer_count = self.calculate_solid_layer_count()
extruder_count = self.get_int("extruder_amount")
minimal_extruder_count = self.calculate_minimal_extruder_count()
actual_extruder_count = max(minimal_extruder_count, used_extruders)
settings = {
"layerThickness": self.get_microns("layer_height"),
@ -916,10 +915,10 @@ class Profile(object):
"posy": self.get_pos_y() * 1000, # in microns
# gcodes
"startCode": self.get_gcode("start_gcode"),
"endCode": self.get_gcode("end_gcode"),
"preSwitchExtruderCode": self.get_gcode("preSwitchExtruder_gcode"),
"postSwitchExtruderCode": self.get_gcode("postSwitchExtruder_gcode"),
"startCode": self.get_gcode("start_gcode", extruder_count=actual_extruder_count),
"endCode": self.get_gcode("end_gcode", extruder_count=actual_extruder_count),
"preSwitchExtruderCode": self.get_gcode("preSwitchExtruder_gcode", extruder_count=actual_extruder_count),
"postSwitchExtruderCode": self.get_gcode("postSwitchExtruder_gcode", extruder_count=actual_extruder_count),
# fixing
"fixHorrible": 0,

View file

@ -1490,12 +1490,8 @@ class Settings(object):
def _default_basedir(applicationName):
# taken from http://stackoverflow.com/questions/1084697/how-do-i-store-desktop-application-data-in-a-cross-platform-way-for-python
if sys.platform == "darwin":
from AppKit import NSSearchPathForDirectoriesInDomains
# http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#//apple_ref/c/func/NSSearchPathForDirectoriesInDomains
# NSApplicationSupportDirectory = 14
# NSUserDomainMask = 1
# True for expanding the tilde into a fully qualified path
return os.path.join(NSSearchPathForDirectoriesInDomains(14, 1, True)[0], applicationName)
import appdirs
return appdirs.user_data_dir(applicationName, "")
elif sys.platform == "win32":
return os.path.join(os.environ["APPDATA"], applicationName)
else:

View file

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg4693"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="octoprint-favicon-apple.svg">
<defs
id="defs4695" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="31.678384"
inkscape:cx="11.852657"
inkscape:cy="8.0632297"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="1912"
inkscape:window-y="760"
inkscape:window-maximized="1" />
<metadata
id="metadata4698">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<path
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:0.30326968;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 8.4712216,1037.1861 c -2.1050908,0.04 -4.0163689,0.8056 -5.7487668,2.3398 -1.0712052,0.9142 -1.82198358,1.9725 -2.25345195,3.1787 -0.37398533,1.751 -0.40029296,3.4654 -0.0863535,5.0991 0.18720389,1.0348 0.58340878,2.2568 1.19251915,3.6886 l 4.2190532,0 c -0.293453,-0.8621 -0.577953,-1.5323 -0.8471012,-2.0232 -1.153287,-2.1277 -1.411065,-4.2066 -0.7607457,-6.2052 0.2367104,-0.6185 0.5586836,-1.2169 0.9581276,-1.7806 0.1426595,-0.2013 0.3287285,-0.4113 0.5345786,-0.588 0.268515,-0.2936 0.8787071,-0.6679 1.8463495,-1.1514 0.3797863,-0.1946 0.7802208,-0.3318 1.2254154,-0.4195 0.055375,-0.021 0.4121338,-0.071 1.0485963,-0.1439 0.4166658,-0.047 0.9826928,0.01 1.7024248,0.218 0.68338,0.202 1.192041,0.4217 1.554388,0.6785 0.46971,0.3328 0.860598,0.6899 1.196632,1.0691 0.08834,0.1029 0.152532,0.1851 0.217943,0.292 0.119092,0.1449 0.28643,0.3643 0.501681,0.6579 0.120782,0.086 0.202303,0.1674 0.217943,0.2591 0.04417,0.051 0.07097,0.072 0.115138,0.1233 0.109582,0.1583 0.220475,0.3159 0.316636,0.4647 0.07883,0.1164 0.137371,0.2581 0.193271,0.3783 0.07894,-0.3674 0.06507,-0.8608 -0.08636,-1.4721 -0.180483,-0.7126 -0.391176,-1.2047 -0.633269,-1.5174 -0.507116,-0.6215 -0.808763,-0.9976 -0.933455,-1.1062 -0.03075,-0.042 -0.311374,-0.2417 -0.834763,-0.6127 -0.48313,-0.3423 -0.991284,-0.6213 -1.496819,-0.8183 -0.992045,-0.4208 -2.1359359,-0.6284 -3.3596164,-0.6086 z"
id="path3017-7-8"
sodipodi:nodetypes="ccccccccscccccsccccccccccscc" />
<path
inkscape:connector-curvature="0"
style="fill:#000000;stroke:#000000;stroke-width:0.30326967999999999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1"
d="m 10.140749,1039.1641 c -0.122741,0 -0.2371399,0 -0.3413068,0.016 -0.6364625,0.073 -0.9932215,0.1227 -1.0485963,0.1439 -0.4451946,0.088 -0.8456291,0.2249 -1.2254154,0.4195 -0.9676424,0.4835 -1.5778345,0.8578 -1.8463495,1.1514 -0.2058501,0.1767 -0.3919191,0.3867 -0.5345786,0.588 -0.399444,0.5637 -0.7214172,1.1621 -0.9581276,1.7806 -0.6503193,1.9986 -0.3925413,4.0775 0.7607457,6.2052 0.2691482,0.4909 0.5536482,1.1611 0.8471012,2.0232 l 4.2601723,0 c -0.1550496,-0.4598 -0.3855015,-0.9829 -0.7113982,-1.5709 -0.2465293,-0.4771 -0.5321843,-0.9815 -0.8553245,-1.4927 -0.013422,-0.01 -0.00409,-0.021 -0.00409,-0.021 -0.051988,-0.097 -0.098669,-0.1734 -0.1562603,-0.2343 -0.030751,-0.042 -0.051492,-0.073 -0.082242,-0.1152 l -0.1809343,-0.2549 c -0.069319,-0.1298 -0.140197,-0.2592 -0.2056073,-0.366 -0.2460015,-0.3356 -0.4342851,-0.6086 -0.5880347,-0.8183 -0.1308197,-0.2137 -0.2609169,-0.4291 -0.3783173,-0.6333 -1.1170471,-1.6383 -1.0194278,-3.0575 0.2878496,-4.2478 0.3736582,-0.2997 0.8097656,-0.577 1.3405561,-0.7855 0.3188143,-0.1369 0.6574538,-0.2389 0.9745783,-0.3166 2.3182336,-0.3127 4.3630076,0.4721 6.1270826,2.3069 -0.09616,-0.1488 -0.207055,-0.3105 -0.316635,-0.4688 -0.04417,-0.051 -0.07097,-0.068 -0.115139,-0.1192 -0.01564,-0.092 -0.09716,-0.1735 -0.217944,-0.2591 -0.215251,-0.2936 -0.382589,-0.5131 -0.50168,-0.6579 -0.06541,-0.1069 -0.129604,-0.1891 -0.217944,-0.292 -0.336034,-0.3792 -0.726922,-0.7363 -1.196632,-1.0691 -0.362348,-0.2568 -0.871009,-0.4765 -1.554388,-0.6785 -0.539798,-0.1558 -0.992892,-0.2286 -1.361116,-0.2344 z"
id="path3101-4-0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -4,6 +4,7 @@
<title data-bind="text: title">OctoPrint</title>
<link rel="shortcut icon" href="{{ url_for('static', filename='img/tentacle-32x32.png') }}">
<link rel="mask-icon" href="{{ url_for('static', filename='img/favicon.svg') }}" color="#56BE37">
<link rel="apple-touch-icon" sizes="114x114" href="{{ url_for('static', filename='img/apple-touch-icon-114x114.png') }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ url_for('static', filename='img/apple-touch-icon-144x144.png') }}">
@ -119,6 +120,7 @@
<li><a href="https://github.com/foosel/OctoPrint/" target="_blank" rel="noreferrer noopener"><i class="icon-github"></i> {{ _('Sourcecode') }}</a></li>
<li><a href="http://docs.octoprint.org" target="_blank" rel="noreferrer noopener"><i class="icon-book"></i> {{ _('Documentation') }}</a></li>
<li><a href="https://github.com/foosel/OctoPrint/issues" target="_blank" rel="noreferrer noopener"><i class="icon-flag"></i> {{ _('Bugs and Requests') }}</a></li>
<li><a href="https://github.com/foosel/OctoPrint/wiki/FAQ" target="_blank" rel="noreferrer noopener"><i class="icon-question-sign"></i> {{ _('FAQ') }}</a></li>
<li id="footer_about"><a href="javascript:void(0)" data-bind="click: show"><i class="icon-info-sign"></i> {{ _('About') }}</a></li>
</ul>
</div>