Gina Häußge
c0096c41a0
Merge branch 'maintenance' into devel
...
# Conflicts:
# setup.py
# src/octoprint/cli/plugins.py
# src/octoprint/events.py
# src/octoprint/filemanager/__init__.py
# src/octoprint/logging/__init__.py
# src/octoprint/plugins/announcements/__init__.py
# src/octoprint/plugins/appkeys/__init__.py
# src/octoprint/plugins/forcelogin/__init__.py
# src/octoprint/plugins/forcelogin/static/js/main.js
# src/octoprint/plugins/forcelogin/templates/forcelogin_index.jinja2
# src/octoprint/plugins/pluginmanager/static/css/pluginmanager.css
# src/octoprint/plugins/printer_safety_check/__init__.py
# src/octoprint/plugins/softwareupdate/__init__.py
# src/octoprint/plugins/virtual_printer/virtual.py
# src/octoprint/printer/__init__.py
# src/octoprint/printer/estimation.py
# src/octoprint/printer/standard.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# src/octoprint/server/api/settings.py
# src/octoprint/server/api/system.py
# src/octoprint/server/apps/__init__.py
# src/octoprint/server/util/__init__.py
# src/octoprint/server/util/flask.py
# src/octoprint/server/util/sockjs.py
# src/octoprint/server/views.py
# src/octoprint/settings.py
# src/octoprint/slicing/__init__.py
# src/octoprint/static/js/app/helpers.js
# src/octoprint/static/js/app/main.js
# src/octoprint/static/js/app/viewmodels/settings.js
# src/octoprint/static/js/app/viewmodels/temperature.js
# src/octoprint/templates/dialogs/settings/accesscontrol.jinja2
# src/octoprint/templates/dialogs/settings/api.jinja2
# src/octoprint/templates/initscript.jinja2
# src/octoprint/templates/tabs/control.jinja2
# src/octoprint/timelapse.py
# src/octoprint/users.py
# src/octoprint/util/comm.py
# src/octoprint/util/gcodeInterpreter.py
# src/octoprint/vendor/sockjs/tornado/transports/rawwebsocket.py
# src/octoprint/vendor/sockjs/tornado/transports/websocket.py
# translations/messages.pot
2019-05-10 17:13:55 +02:00
Gina Häußge
b79fc94a4e
☔ Protect against NaN & Inf in GCODE
...
Also cleanup broken metadata entries that contain invalid json.
Fixes #3022
2019-05-08 17:49:53 +02:00
Matthias Urlichs
b781681e0f
There's no 'file' in Py3
2019-02-03 19:01:47 +01:00
Matthias Urlichs
67c5a5e168
went through "except Exception:" with a fine comb
2019-02-03 16:39:01 +01:00
Matthias Urlichs
1dacbc35bf
Use unicode_literals __future__
2019-02-03 14:09:57 +01:00
Matthias Urlichs
a1a15e40e0
Replace all bare "except:" handlers
...
These are never what we want, as they swallow KeyboardInterrupt.
TODO: many of these handlers really should be more specific and/or
log that they replaced an unparseable value with a default.
2019-01-28 07:50:55 +01:00
Matthias Urlichs
c05b6572c5
Fix coding= headers
2019-01-27 17:36:16 +01:00
Matthias Urlichs
958fc7600d
Merge commit 'e0543de8ef5c1f67d4064e84a5e7ecacbdf1029e' into py23
2019-01-27 17:15:52 +01:00
MirceaDan
f243a52823
all files start now with same 2 lines
...
# coding=utf-8
from __future__ import absolute_import, division, print_function
2018-12-02 02:13:12 -08:00
MirceaDan
f5c8b04958
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
...
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
2018-12-01 15:07:04 -08:00
Gina Häußge
452645d950
Merge pull request #2742 from eyal0/faster_analysis3
...
Faster gcode analysis: Remove kwargs Vector.__init__ and simplify getCodeFloat
2018-07-19 09:41:06 +02:00
Eyal Soha
d2bb731bd7
Remove kwargs from Vector constructor and also simplify getCodeFloat
2018-07-19 09:43:48 +03:00
Eyal Soha
cd3c8ebbe6
Use infinity instead of None in MinMax3D to improve performance
...
Speed is improved by about 5%
2018-07-18 16:57:42 +03:00
Eyal Soha
542edbc3e6
Revert "Use infinity instead of None for faster MinMax3d"
...
This reverts commit 792fe328ef .
Most of the speed-up comes from removing the unneeded import and the unrolling so no big deal.
2018-07-13 20:07:35 +03:00
Eyal
8c1262dd3f
Replace infinity tests with inequality
2018-07-13 11:57:52 +03:00
Eyal Soha
792fe328ef
Use infinity instead of None for faster MinMax3d
2018-07-13 00:44:04 +03:00
Eyal Soha
111a37e97e
Unroll record for improved speed
2018-07-13 00:42:33 +03:00
Eyal Soha
c2bb234c20
Remove extra import math
2018-07-13 00:29:43 +03:00
Gina Häußge
c84e199e87
Add & use "octoprint analysis gcode" subcommand
...
That should solve any weird import issues we have when
running gcodeInterpreter.py directly (and hence putting
octoprint.util as first entry into the python path,
causing potential issues with imported modules such as
yaml to catch the octoprint.util.platform module instead
of the actual python platform module).
See reported problem with that by @CapnBry in #2095
2017-09-28 10:33:28 +02:00
Gina Häußge
c81c93896b
Apply tool offsets immediately and only once
...
Less tracking of offsets and also more similar to how
firmware does this.
We rewrite our current position on tool change to current position
plus tool offset instead of applying it for every single
position change.
2017-07-05 15:16:08 +02:00
Gina Häußge
639d8d4c5f
Perform gcode analysis in subprocess
2017-06-26 16:19:18 +02:00
Gina Häußge
77db00a2ea
Extend coordinates used for min/max calculation
...
Both old and new position are relevant, we are extruding from one to
the other.
2017-06-13 15:58:12 +02:00
Gina Häußge
dba95ee94f
Handle G90/G91 and M82/M83 distinct by default
...
By default G90/G91 define relativeMode, M82/M83 define relativeE. The
extruder coordinate will be viewed as relative when either
relativeMode or relativeE are set. This mirrors the implementation in
Marlin (current and legacy forks) as well as Repetier.
SmoothieWare's implementation resets the relative mode of the
extruder on a G90/G91. To still accomodate this different
implementation a new settings has been added under Settings >
Feature: "G90/G91 overrides relative extruder mode". Checking this
switches to the alternative interpretation for future gcode analysis
and visualization.
The only difference between the two of them is that the following
segment of GCODE:
M83
G90
will have the extruder still set to relative on Marlin and
Repetier but set to absolute on Smoothieware.
Please note that the setting in all likelihood will be moved to
the printer profile in the future, since it makes more sense to have
it on a per printer basis. It's not part of the set of features
available for auto detection since it's required for GCODE analysis
and hence needs to be known even outside of a connection to the
printer.
Implements #1818
2017-05-10 16:43:20 +02:00
Gina Häußge
853bb2fc16
Have G92 set pos directly, use offset only for tool offsets
...
See #1906 for related discussion
2017-05-09 17:17:08 +02:00
Gina Häußge
fe585e7115
Do not repeatedly apply any set offsets in the gcode interpreter
...
They would accumulate and cause wrong calculations
Solves #1863
2017-04-12 09:38:53 +02:00
Gina Häußge
d298c3c672
Apply analysis throttle only every n lines
...
Default n = 100, configurable via config.yaml. Should make analysis a
bit faster while still giving the Pi air to breathe.
2017-03-09 15:38:52 +01:00
Gina Häußge
e6dd37e26e
Various analysis queue fixes
...
* Fix priority queue sorting (sorts ascending, not descending!)
* Abort low priority jobs when a high priority job comes in
* Utilize queue for tracking aborted jobs too
* Abort analysis for items that are to be deleted/moved (also
fixes issue under Windows where it was impossible to delete
a file for which the analysis was still running).
2017-01-12 18:16:42 +01:00
Gina Häußge
2ab7fa4d3a
Support volume calculate for S3D files
2017-01-11 12:11:16 +01:00
Gina Häußge
6e474d9096
Fix model size calculation during GCODE analysis
...
* Properly handle G0/G1 with no X, Y, Z coordinates in relative mode
instead of duplicating coordinates - should fix #1675
* Only take move commands with X, Y, Z coordinates into account for
model size calculation - this makes our internal GCODE analysis behave
like the GCODE viewer's analysis and produce the same model size. The
downside is that extrusions on the origin are no longer taken into account
for checking if a model is within bounds of the print bed, but that should
hopefully not produce any issues in the real world.
2017-01-10 12:16:33 +01:00
Gina Häußge
76a04cbe9d
Merge branch 'dev/python3B' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3B
2016-07-15 11:28:55 +02:00
MirceaDan
c33a9f9aa2
from __future__ import absolute_import, division, print_function
...
changed the behavior to import division and print to be consistent
across all app and similar with python 3.x
2016-07-15 00:16:58 -07:00
Gina Häußge
27227e271d
Don't try to calculate min/max for empty bounding box
2016-07-13 12:50:16 +02:00
Gina Häußge
9fca41c76c
Merge branch 'maintenance' into devel
2016-07-05 14:53:54 +02:00
Gina Häußge
8c80e3ac4a
Scalar3D => Vector3D
2016-07-05 14:53:16 +02:00
Gina Häußge
66792da5bc
MinMax3D type for tracking printing area & include dimensions in analysis
2016-07-05 14:40:00 +02:00
Gina Häußge
5a9852e7b8
Merge branch 'maintenance' into devel
...
Conflicts:
src/octoprint/util/gcodeInterpreter.py
2016-07-05 14:37:17 +02:00
Gina Häußge
79d660f377
Further GCODE interpreter fixes & optimizations
...
* Introduce Vector3D type to help with coordinate back and
forth calculations
* Fix typo in movement calculation (Y twice instead of Y and Z)
* Removed some code duplication
2016-07-05 13:22:16 +02:00
Salandora
2ae2405792
Add diff part to retract too because of things like G1 X-10 Y-10 Z1 E-5
...
(cherry picked from commit de325c3)
2016-07-05 13:16:07 +02:00
Salandora
6e42e3e0ef
Add calculation for moves in Z direction
...
(cherry picked from commit b9cf42f)
2016-07-05 13:16:02 +02:00
Salandora
ad3ae405f6
Check for moveType == move instead of x,y,z is not None, otherwise x,y,z,e moves wouldn't be seen as extrude/retract moves
...
(cherry picked from commit 1b6a46c)
2016-07-05 13:15:55 +02:00
Javier Martínez Arrieta
92279fb3a0
Squashed commit of the following:
...
commit cd6688be26
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Thu May 12 15:13:23 2016 +0200
Removed previousE
commit 413655f705
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Thu May 12 12:36:54 2016 +0200
Changed to detect in case of two extruders
commit b0cfa28eaf
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Mon Apr 11 18:11:54 2016 +0200
Identation issues solved and code improved
commit 95b6eba2ad
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Mon Apr 4 18:48:47 2016 +0200
Changed message shown to user using sprintf and improved 'if' checks
commit 3baf9d7fc0
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Tue Mar 8 17:46:40 2016 +0000
Analysis now done in frontend, taking also into account centre origin
commit e742e74475
Author: Javier Martínez Arrieta <martinezarrietajavier@gmail.com >
Date: Sat Mar 5 21:37:02 2016 +0100
Update analysis.py
commit 29a821c2f4
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Mon Feb 29 19:11:59 2016 +0000
Removed unrelated folders and files for pull request
commit 0edbcf3d3c
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Sat Feb 27 10:54:47 2016 +0000
Completed requirements and solutions for Slic3r integration and added requirements for scheduled printing
commit a92b7e3ade
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Mon Feb 22 11:06:22 2016 +0000
Changed requirements and solution file for Slic3r integration
commit 201b5723d9
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Thu Feb 18 12:15:54 2016 +0000
Solved problem with character '}' at static/js/viewmodels/file.js
commit d89319c2a5
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Wed Feb 17 21:04:44 2016 +0000
Completed requirementes to add Slic3r as a plugin
commit 9e07a3b7c0
Merge: caf4e84 6945394
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Wed Feb 17 10:03:56 2016 +0000
Added functionality to warn in case object exceeds printing area
commit caf4e84ab2
Author: Javierma87 <javier.martinez.arrieta@alumnos.upm.es >
Date: Thu Feb 11 18:32:36 2016 +0000
Added docs-tfg and implemented functionality of warning in case object is bigger than printer area
2016-05-12 15:41:12 +02:00
Gina Häußge
a6c21c4985
Merge branch 'fix/utf8BomResilience' into devel
...
Conflicts:
src/octoprint/static/js/app/dataupdater.js
src/octoprint/util/comm.py
2015-10-05 19:58:01 +02:00
Gina Häußge
45c92cb1f4
Fix: Open GCODE files als utf-8, replacing encoding errors
...
Also detect files that contain a BOM and strip it.
Internal handling of GCODE file contents switched to unicode.
Should take care of #1077
2015-10-05 19:43:40 +02:00
Bryan Mayland
0253f525b0
Include a time estimate for gcode which uses firmware retract, if retract settings are seen in gcode
2015-09-12 11:32:52 -04:00
Gina Häußge
c6cb430594
Throttle gcode analysis a bit for low prio entries
...
Give the Pi's CPU a bit air to breathe...
2015-06-19 22:33:26 +02:00
Gina Häußge
5fa30e4145
Ignore feed rates of 0, those don't make sense anyhow
...
Fixes #887
2015-05-10 00:36:09 +02:00
Gina Häußge
ce363ce409
Fixed a bug causing gcodeInterpreter to hiccup on GCODES containing invalid coordinates such as Xnan or Yinf, causing in turn the file API to fail until the offending file was deleted and its metadata removed
2015-02-01 17:27:12 +01:00
Gina Häußge
014d39c11d
Fetch estimated print time from cura slicing result, create print time statistics per printer profile, interpolate between stats and live estimation during printing for print time left
2014-12-17 17:31:30 +01:00
Gina Häußge
f2562500a3
Print time estimation is now not displayed until it becomes somewhat stable
2014-12-12 23:38:57 +01:00
Gina Häußge
8dbde90a93
Merge branch 'master' into devel
2014-12-09 22:25:19 +01:00