Merge branch 'maintenance' into devel

This commit is contained in:
Gina Häußge committed 2021-04-14 15:35:50 +02:00
commit beef176ac0
25 files changed
+320 -166

No files matched your search

+3 -5
View File
@@ -1,7 +1,6 @@
name: 🐛 Report a bug
about: Create a bug report to help improve OctoPrint
description: Create a bug report to help improve OctoPrint
title: ""
issue_body: true
body:
- type: markdown
attributes:
@@ -130,7 +129,6 @@ body:
- label: Contents of the JavaScript browser console (always include in cases of issues with the user interface)
- label: Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
- label: GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)
- type: markdown
- type: textarea
attributes:
value: |
## Additional information & file uploads
label: Additional information & file uploads
+4 -7
View File
@@ -1,7 +1,6 @@
name: ✨ Request a feature
about: Request a new feature to implement in OctoPrint
description: Request a new feature to implement in OctoPrint
title: "[Request]"
issue_body: true
body:
- type: markdown
attributes:
@@ -29,9 +28,7 @@ body:
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: markdown
- type: textarea
attributes:
value: >
**Additional context**
Add any other context or screenshots about the feature request here.
label: Additional context
description: Add any other context or screenshots about the feature request here.
+3 -3
View File
@@ -29,10 +29,10 @@ improve/.* 1.7.0 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
staging/bugfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
bug/.* 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
# staging/maintenance is currently the branch for preparation of 1.6.0rc2
# staging/maintenance is currently the branch for preparation of 1.6.0rc3
# so is regressionfix/...
staging/maintenance 1.6.0rc2 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
regressionfix/.* 1.6.0rc2 07c4630d126617c2ae98a9c23ad49facf7bf0bbd pep440-dev
staging/maintenance 1.6.0rc3 c2844c8132871f40f8dec3a0cdff8e7cfd25bab9 pep440-dev
regressionfix/.* 1.6.0rc3 c2844c8132871f40f8dec3a0cdff8e7cfd25bab9 pep440-dev
# staging/devel is currently inactive (but has the 1.4.1rc4 namespace)
staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev
+5 -4
View File
@@ -8,9 +8,9 @@ thanks to everyone who contributed!
* 3D-TECH
* 3DPrinterOS
* Andrew Moorby
* Arnljot Arntsen
* Ash King
* Ashley Merrick
* BigTreeTech
* Boris Hussein
* Brad Jackson
@@ -21,8 +21,10 @@ thanks to everyone who contributed!
* Christoph Sigrist
* Creality3D
* D Brian Kimmel
* Dana Voigt
* DeltaMaker 3D Printers
* Dennis Breining
* Dennis Christilaw
* Diana C Rodriguez
* Douglas Floyd
* Eric Betts
@@ -33,7 +35,6 @@ thanks to everyone who contributed!
* Hog Duske
* Hopewell Medical Acupuncture Center
* Jeremy Cole
* Joe Pasqua
* Joshua Wills
* Julian Melo
* Justin Kaufman
@@ -49,7 +50,6 @@ thanks to everyone who contributed!
* Makespace Madrid
* Mark Walker
* Michael Aumock
* Michael Begala
* Miles Flavel
* Mosaic Manufacturing
* Nat Friedman
@@ -75,6 +75,7 @@ thanks to everyone who contributed!
* Sven Mueller
* TH3D
* The Spaghetti Detective
* Ulderico Cirello
* Ulrich Kempken
and 2296 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
and 2309 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)!
+3 -1
View File
@@ -74,6 +74,7 @@ def util():
@click.option("--g90-extruder", "g90_extruder", is_flag=True)
@click.option("--bed-z", "bedz", type=float, default=0)
@click.option("--progress", "progress", is_flag=True)
@click.option("--layers", "layers", is_flag=True)
@click.argument("path", type=click.Path())
def gcode_command(
path,
@@ -87,6 +88,7 @@ def gcode_command(
g90_extruder,
bedz,
progress,
layers,
):
"""Runs a GCODE file analysis."""
@@ -121,7 +123,7 @@ def gcode_command(
def progress_callback(percentage):
click.echo(f"PROGRESS:{percentage}")
interpreter = gcode(progress_callback=progress_callback)
interpreter = gcode(progress_callback=progress_callback, incl_layers=layers)
interpreter.load(
path,
+1 -1
View File
@@ -670,7 +670,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
object.
Returns:
bool: ``True`` if the the implementation will serve the request,
bool: ``True`` if the implementation will serve the request,
``False`` otherwise.
"""
return False
@@ -18,10 +18,10 @@ from octoprint.util.version import (
)
SENTRY_URL_SERVER = (
"https://cd0da78d9d394b96bf910e74e9d366c3@o118517.ingest.sentry.io/1373987"
"https://650d1f41ffc14ded800d7862f887af20@o118517.ingest.sentry.io/1373987"
)
SENTRY_URL_COREUI = (
"https://9ed26aae61a4434194d9fbb17326b453@o118517.ingest.sentry.io/1374096"
"https://775a5d0614c34a47b9fd1c92e16771af@o118517.ingest.sentry.io/1374096"
)
SETTINGS_DEFAULTS = {
@@ -59,7 +59,9 @@ $(function () {
self.renderer_showMoves = ko.observable(true);
self.renderer_showRetracts = ko.observable(true);
self.renderer_showPrinthead = ko.observable(true);
self.renderer_showSegmentStarts = ko.observable(false);
self.renderer_showBoundingBox = ko.observable(false);
self.renderer_showLayerBoundingBox = ko.observable(false);
self.renderer_showFullSize = ko.observable(false);
self.renderer_extrusionWidthEnabled = ko.observable(false);
self.renderer_extrusionWidth = ko.observable(2);
@@ -94,7 +96,9 @@ $(function () {
showMoves: self.renderer_showMoves(),
showRetracts: self.renderer_showRetracts(),
showHead: self.renderer_showPrinthead(),
showSegmentStarts: self.renderer_showSegmentStarts(),
showBoundingBox: self.renderer_showBoundingBox(),
showLayerBoundingBox: self.renderer_showLayerBoundingBox(),
showFullSize: self.renderer_showFullSize(),
extrusionWidth: self.renderer_extrusionWidthEnabled()
? self.renderer_extrusionWidth()
@@ -141,7 +145,9 @@ $(function () {
self.renderer_showMoves.subscribe(self.rendererOptionUpdated);
self.renderer_showRetracts.subscribe(self.rendererOptionUpdated);
self.renderer_showPrinthead.subscribe(self.rendererOptionUpdated);
self.renderer_showSegmentStarts.subscribe(self.rendererOptionUpdated);
self.renderer_showBoundingBox.subscribe(self.rendererOptionUpdated);
self.renderer_showLayerBoundingBox.subscribe(self.rendererOptionUpdated);
self.renderer_showFullSize.subscribe(self.rendererOptionUpdated);
self.renderer_extrusionWidthEnabled.subscribe(self.rendererOptionUpdated);
self.renderer_extrusionWidth.subscribe(self.rendererOptionUpdated);
@@ -394,7 +400,9 @@ $(function () {
self.renderer_showMoves(true);
self.renderer_showRetracts(true);
self.renderer_showPrinthead(true);
self.renderer_showSegmentStarts(false);
self.renderer_showBoundingBox(false);
self.renderer_showLayerBoundingBox(false);
self.renderer_showFullSize(false);
self.renderer_extrusionWidthEnabled(false);
self.renderer_extrusionWidth(2);
@@ -881,11 +889,13 @@ $(function () {
showMoves: self.renderer_showMoves(),
showRetracts: self.renderer_showRetracts(),
showPrinthead: self.renderer_showPrinthead(),
showSegmentStarts: self.renderer_showSegmentStarts(),
showPrevious: self.renderer_showPrevious(),
showCurrent: self.renderer_showCurrent(),
showNext: self.renderer_showNext(),
showFullsize: self.renderer_showFullSize(),
showBoundingBox: self.renderer_showBoundingBox(),
showLayerBoundingBox: self.renderer_showLayerBoundingBox(),
hideEmptyLayers: self.reader_hideEmptyLayers(),
sortLayers: self.reader_sortLayers()
});
@@ -904,6 +914,8 @@ $(function () {
self.renderer_showRetracts(current["showRetracts"]);
if (current["showPrinthead"] !== undefined)
self.renderer_showPrinthead(current["showPrinthead"]);
if (current["showSegmentStarts"] !== undefined)
self.renderer_showSegmentStarts(current["showSegmentStarts"]);
if (current["showPrevious"] !== undefined)
self.renderer_showPrevious(current["showPrevious"]);
if (current["showCurrent"] !== undefined)
@@ -914,6 +926,8 @@ $(function () {
self.renderer_showFullSize(current["showFullsize"]);
if (current["showBoundingBox"] !== undefined)
self.renderer_showBoundingBox(current["showBoundingBox"]);
if (current["showLayerBoundingBox"] !== undefined)
self.renderer_showLayerBoundingBox(current["showLayerBoundingBox"]);
if (current["hideEmptyLayers"] !== undefined)
self.reader_hideEmptyLayers(current["hideEmptyLayers"]);
if (current["sortLayers"] !== undefined)
@@ -37,6 +37,7 @@ GCODE.renderer = (function () {
colorRetract: "#ff0000",
colorRestart: "#0000ff",
colorHead: "#00ff00",
colorSegmentStart: "#666666",
showMoves: true,
showRetracts: true,
@@ -50,8 +51,11 @@ GCODE.renderer = (function () {
showCurrentLayer: false,
showPreviousLayer: false,
showBoundingBox: false,
showLayerBoundingBox: false,
showFullSize: false,
showHead: false,
showSegmentStarts: false,
sizeSegmentStart: 2 * pixelRatio,
moveModel: true,
zoomInOnModel: false,
@@ -113,7 +117,7 @@ GCODE.renderer = (function () {
ctx.clearRect(p1.x, p1.y, p2.x - p1.x, p2.y - p1.y);
drawGrid();
drawBoundingBox();
drawBoundingBox(layerNumStore);
if (model && model.length) {
if (layerNumStore < model.length) {
if (renderOptions["showNextLayer"] && layerNumStore < model.length - 1) {
@@ -151,28 +155,31 @@ GCODE.renderer = (function () {
if (!model || !model[layer]) return;
var cmds = model[layer];
var i = 0;
var firstExtrusion;
var i;
// find bounds based on x/y moves with extrusion only
// if you want to change that criterion, this is the place to do it
var factorIn = function (cmd) {
return cmd && cmd.extrude && (cmd.x !== undefined || cmd.y !== undefined);
};
while (i < cmds.length) {
if (cmds[i].extrude && (cmds[i].x !== undefined || cmds[i].y !== undefined))
break;
i++;
for (i = 0; i < cmds.length; i++) {
if (factorIn(cmds[i])) break;
}
if (i == cmds.length) return;
if (i === cmds.length) return;
firstExtrusion = i;
// initialize with guaranteed defined values and cut out a bunch of
// testing for undefined cases
var minX = cmds[i].prevX,
maxX = cmds[i].prevX,
minY = cmds[i].prevY,
maxY = cmds[i].prevY;
var minX = cmds[firstExtrusion].prevX,
maxX = cmds[firstExtrusion].prevX,
minY = cmds[firstExtrusion].prevY,
maxY = cmds[firstExtrusion].prevY;
while (i < cmds.length) {
if (cmds[i].extrude && (cmds[i].x !== undefined || cmds[i].y !== undefined)) {
for (i = firstExtrusion; i < cmds.length; i++) {
if (factorIn(cmds[i])) {
minX = Math.min(minX, cmds[i].prevX);
maxX = Math.max(maxX, cmds[i].prevX);
if (cmds[i].x !== undefined) {
@@ -186,7 +193,6 @@ GCODE.renderer = (function () {
maxY = Math.max(maxY, cmds[i].y);
}
}
i++;
}
return {minX: minX, maxX: maxX, minY: minY, maxY: maxY};
@@ -548,24 +554,27 @@ GCODE.renderer = (function () {
ctx.stroke();
};
var drawBoundingBox = function () {
var drawBoundingBox = function (layerNum) {
if (!modelInfo) return;
var minX, minY, width, height;
var draw = function (x, y, w, h, c) {
ctx.beginPath();
ctx.strokeStyle = c;
ctx.setLineDash([2, 5]);
ctx.rect(x, y, w, h);
ctx.stroke();
};
if (renderOptions["showFullSize"]) {
minX = modelInfo.min.x;
minY = modelInfo.min.y;
width = modelInfo.modelSize.x;
height = modelInfo.modelSize.y;
ctx.beginPath();
ctx.strokeStyle = "#0000ff";
ctx.setLineDash([2, 5]);
ctx.rect(minX, minY, width, height);
ctx.stroke();
draw(minX, minY, width, height, "#0000ff");
}
if (renderOptions["showBoundingBox"]) {
@@ -573,14 +582,18 @@ GCODE.renderer = (function () {
minY = modelInfo.boundingBox.minY;
width = modelInfo.boundingBox.maxX - minX;
height = modelInfo.boundingBox.maxY - minY;
draw(minX, minY, width, height, "#ff0000");
}
ctx.beginPath();
ctx.strokeStyle = "#ff0000";
ctx.setLineDash([2, 5]);
ctx.rect(minX, minY, width, height);
ctx.stroke();
if (renderOptions["showLayerBoundingBox"]) {
var layerBounds = getLayerBounds(layerNum);
if (layerBounds) {
minX = layerBounds.minX;
minY = layerBounds.minY;
width = layerBounds.maxX - minX;
height = layerBounds.maxY - minY;
draw(minX, minY, width, height, "#00ff00");
}
}
ctx.setLineDash([1, 0]);
@@ -633,6 +646,23 @@ GCODE.renderer = (function () {
ctx.lineJoin = origLineJoin;
};
var drawCross = function (centerX, centerY, size) {
var x1, y1, x2, y2;
var half = size / 2;
x1 = centerX - half;
x2 = centerX + half;
y1 = centerY - half;
y2 = centerY + half;
ctx.beginPath();
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.moveTo(x1, y2);
ctx.lineTo(x2, y1);
ctx.stroke();
};
var drawLayer = function (layerNum, fromProgress, toProgress, isNotCurrentLayer) {
log.trace(
"Drawing layer " +
@@ -692,6 +722,7 @@ GCODE.renderer = (function () {
//~~ render this layer's commands
var sizeRetractSpot = renderOptions["sizeRetractSpot"] * lineWidthFactor * 2;
var sizeSegmentStart = renderOptions["sizeSegmentStart"] * lineWidthFactor * 2;
// alpha value (100% if current layer is being rendered, 30% otherwise)
// Note - If showing currently layer as preview - also render it at 30% and draw the progress over the top at 100%
@@ -707,6 +738,7 @@ GCODE.renderer = (function () {
var colorMove = {};
var colorRetract = {};
var colorRestart = {};
var colorSegmentStart = {};
function getColorLineForTool(tool) {
var rv = colorLine[tool];
@@ -762,6 +794,19 @@ GCODE.renderer = (function () {
return rv;
}
function getColorSegmentStartForTool(tool) {
var rv = colorSegmentStart[tool];
if (rv === undefined) {
var shade = tool * 0.15;
rv = colorSegmentStart[tool] = pusher
.color(renderOptions["colorSegmentStart"])
.shade(shade)
.alpha(alpha)
.html();
}
return rv;
}
var prevPathType = "fill";
function strokePathIfNeeded(newPathType, strokeStyle) {
if (newPathType != prevPathType || newPathType == "fill") {
@@ -858,6 +903,12 @@ GCODE.renderer = (function () {
drawTriangle(prevX, prevY, sizeRetractSpot, false);
}
}
if (renderOptions["showSegmentStarts"] && !isNotCurrentLayer) {
strokePathIfNeeded("fill");
ctx.strokeStyle = getColorSegmentStartForTool(tool);
drawCross(x, y, sizeSegmentStart);
}
}
// set new (prevX, prevY)
@@ -886,6 +937,7 @@ GCODE.renderer = (function () {
var applyOffsets = function (layerNum) {
var canvasCenter;
var layerBounds;
// determine bed and model offsets
if (ctx) ctx.translate(-offsetModelX, -offsetModelY);
@@ -86,6 +86,12 @@
<label class="checkbox">
<input type="checkbox" data-bind="checked: renderer_showBoundingBox">{{ _('Show printed bounding box') }}
</label>
<label class="checkbox">
<input type="checkbox" data-bind="checked: renderer_showLayerBoundingBox">{{ _('Show layer bounding box') }}
</label>
<label class="checkbox">
<input type="checkbox" data-bind="checked: renderer_showSegmentStarts">{{ _('Show segment starts') }}
</label>
</p>
<p>
<label class="checkbox">
@@ -1 +1 @@
#settings_plugin_pluginmanager_navbar{position:-webkit-sticky;position:sticky;top:0;padding-bottom:1px;border-bottom:1px solid #ddd;background:#fff}#settings_plugin_pluginmanager_pluginlist{display:block;width:auto;overflow-x:hidden;padding-right:2px;margin-bottom:1em}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_name,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_name{text-overflow:ellipsis;text-align:left}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_name .prop,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_name .prop{white-space:nowrap}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions{text-align:center;width:80px}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a{text-decoration:none;color:#000}#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a.disabled,#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_orphanlist{display:block;width:auto;max-height:400px;overflow-x:hidden;overflow-y:scroll;padding-right:2px;margin-bottom:1em}#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_id,#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_id{text-overflow:ellipsis;text-align:left}#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_actions,#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_actions{text-align:center;width:80px}#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_actions a,#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_actions a{text-decoration:none;color:#000}#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_actions a.disabled,#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_repositorydialog h4{position:relative}#settings_plugin_pluginmanager_repositorydialog h4 a.dropdown-toggle{color:inherit;text-decoration:none;font-size:14px}#settings_plugin_pluginmanager_repositorydialog h4 ul.dropdown-menu{font-size:14px}#settings_plugin_pluginmanager_repositorydialog .form-search{text-align:center;margin-bottom:5px!important}#settings_plugin_pluginmanager_repositorydialog .form-inline{padding:5px 10px 5px 5px;margin-bottom:0}#settings_plugin_pluginmanager_repositorydialog .form-inline .help-block{margin-bottom:0;font-size:85%}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_empty,#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable{overflow:hidden;width:100%;height:400px;background-image:url(../img/repo_unavailable.png);text-align:center;display:table}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_empty div,#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable div{display:table-cell;vertical-align:middle}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list{width:auto;height:400px;overflow-x:hidden;overflow-y:scroll;padding-right:2px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry{border-bottom:1px solid #ddd;padding:5px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry .meta{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry .stats .prop{white-space:nowrap}#settings_plugin_pluginmanager_workingdialog_output .message{font-weight:700}#settings_plugin_pluginmanager_workingdialog_output .error{font-weight:700;color:#900}#settings_plugin_pluginmanager_workingdialog_output .stdout{color:#333}#settings_plugin_pluginmanager_workingdialog_output .stderr{color:#900}#settings_plugin_pluginmanager_workingdialog_output .call{color:#009}
#settings_plugin_pluginmanager_pluginlist{height:calc(100vh - 450px);display:block;width:auto;overflow-x:hidden;padding-right:2px;margin-bottom:1em;position:relative;border-top:1px solid #eee;padding-top:6px}#settings_plugin_pluginmanager_pluginlist>table{margin-top:0px}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_name,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_name{text-overflow:ellipsis;text-align:left}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_name .prop,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_name .prop{white-space:nowrap}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions{text-align:center;width:80px}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a{text-decoration:none;color:#000}#settings_plugin_pluginmanager_pluginlist table th.settings_plugin_plugin_manager_plugins_actions a.disabled,#settings_plugin_pluginmanager_pluginlist table td.settings_plugin_plugin_manager_plugins_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_orphanlist{display:block;width:auto;max-height:400px;overflow-x:hidden;overflow-y:scroll;padding-right:2px;margin-bottom:1em}#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_id,#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_id{text-overflow:ellipsis;text-align:left}#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_actions,#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_actions{text-align:center;width:80px}#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_actions a,#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_actions a{text-decoration:none;color:#000}#settings_plugin_pluginmanager_orphanlist table th.settings_plugin_plugin_manager_orphans_actions a.disabled,#settings_plugin_pluginmanager_orphanlist table td.settings_plugin_plugin_manager_orphans_actions a.disabled{color:#ccc;cursor:default}#settings_plugin_pluginmanager_repositorydialog h4{position:relative}#settings_plugin_pluginmanager_repositorydialog h4 a.dropdown-toggle{color:inherit;text-decoration:none;font-size:14px}#settings_plugin_pluginmanager_repositorydialog h4 ul.dropdown-menu{font-size:14px}#settings_plugin_pluginmanager_repositorydialog .form-search{text-align:center;margin-bottom:5px !important}#settings_plugin_pluginmanager_repositorydialog .form-inline{padding:5px;padding-right:10px;margin-bottom:0}#settings_plugin_pluginmanager_repositorydialog .form-inline .help-block{margin-bottom:0;font-size:85%}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable,#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_empty{overflow:hidden;width:100%;height:400px;background-image:url("../img/repo_unavailable.png");text-align:center;display:table}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_unavailable div,#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_empty div{display:table-cell;vertical-align:middle}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list{width:auto;height:400px;overflow-x:hidden;overflow-y:scroll;padding-right:2px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry{border-bottom:1px solid #ddd;padding:5px}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry .meta{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}#settings_plugin_pluginmanager_repositorydialog #settings_plugin_pluginmanager_repositorydialog_list .entry .stats .prop{white-space:nowrap}#settings_plugin_pluginmanager_workingdialog_output .message{font-weight:bold}#settings_plugin_pluginmanager_workingdialog_output .error{font-weight:bold;color:#990000}#settings_plugin_pluginmanager_workingdialog_output .stdout{color:#333333}#settings_plugin_pluginmanager_workingdialog_output .stderr{color:#990000}#settings_plugin_pluginmanager_workingdialog_output .call{color:#000099}
@@ -1,21 +1,20 @@
#settings_plugin_pluginmanager {
}
#settings_plugin_pluginmanager_navbar {
position: -webkit-sticky; /* Safari, according to the internet */
position: sticky;
top: 0;
padding-bottom: 1px;
border-bottom: 1px solid #ddd;
background: white;
}
#settings_plugin_pluginmanager_pluginlist {
height: calc(100vh - 450px);
display: block;
width: auto;
overflow-x: hidden;
padding-right: 2px;
margin-bottom: 1em;
position: relative;
border-top: 1px solid #eee;
padding-top: 6px;
> table {
margin-top: 0px;
}
table {
th,
+10 -14
View File
@@ -1304,33 +1304,29 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
self._logger.exception("Error generating fileData")
fileData = None
if fileData is not None:
if "display" in fileData:
if fileData.get("display"):
display_name = fileData["display"]
if "analysis" in fileData:
if (
estimatedPrintTime is None
and "estimatedPrintTime" in fileData["analysis"]
if isinstance(fileData.get("analysis"), dict):
if estimatedPrintTime is None and fileData["analysis"].get(
"estimatedPrintTime"
):
estimatedPrintTime = fileData["analysis"][
"estimatedPrintTime"
]
if "filament" in fileData["analysis"]:
if fileData["analysis"].get("filament"):
filament = fileData["analysis"]["filament"]
if "statistics" in fileData:
if isinstance(fileData.get("statistics"), dict):
printer_profile = (
self._printerProfileManager.get_current_or_default()["id"]
)
if (
"averagePrintTime" in fileData["statistics"]
and printer_profile
in fileData["statistics"]["averagePrintTime"]
if printer_profile in fileData["statistics"].get(
"averagePrintTime", {}
):
averagePrintTime = fileData["statistics"]["averagePrintTime"][
printer_profile
]
if (
"lastPrintTime" in fileData["statistics"]
and printer_profile in fileData["statistics"]["lastPrintTime"]
if printer_profile in fileData["statistics"].get(
"lastPrintTime", {}
):
lastPrintTime = fileData["statistics"]["lastPrintTime"][
printer_profile
+7 -3
View File
@@ -1215,9 +1215,13 @@ def _getCurrentFile():
def _validate(target, filename):
return filename == "/".join(
map(lambda x: fileManager.sanitize_name(target, x), filename.split("/"))
)
if target == FileDestinations.SDCARD:
# we make no assumptions about the shape of valid SDCard file names
return True
else:
return filename == "/".join(
map(lambda x: fileManager.sanitize_name(target, x), filename.split("/"))
)
class WerkzeugFileWrapper(octoprint.filemanager.util.AbstractFileWrapper):
+1 -1
View File
@@ -1 +1 @@
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.btn.active,.btn.disabled,.btn:active,.btn:focus,.btn:hover,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn.active,.btn:active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:focus,.btn:hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:#333 dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class*=" icon-"],.btn-large [class^=icon-]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class*=" icon-"],.btn-small [class^=icon-]{margin-top:0}.btn-mini [class*=" icon-"],.btn-mini [class^=icon-]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary.active,.btn-primary.disabled,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary.active,.btn-primary:active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning.active,.btn-warning.disabled,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning.active,.btn-warning:active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);background-color:#da4f49;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeaLine truncated
.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:linear-gradient(to bottom, #fff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #ccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#04c;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.btnLine truncated
@@ -513,6 +513,11 @@ $(function () {
clearTimeout(self.webcamDisableTimeout);
}
// IF disabled then we dont need to do anything
if (self.settings.webcam_webcamEnabled() == false) {
return;
}
// Determine stream type and switch to corresponding webcam.
var streamType = determineWebcamStreamType(self.settings.webcam_streamUrl());
if (streamType == "mjpg") {
@@ -707,7 +712,12 @@ $(function () {
self._switchToHlsWebcam = function () {
var video = document.getElementById("webcam_hls");
if (video.canPlayType("application/vnd.apple.mpegurl")) {
// Check for native playback options: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType
if (
video != null &&
typeof video.canPlayType != undefined &&
video.canPlayType("application/vnd.apple.mpegurl") == "probably"
) {
video.src = self.settings.webcam_streamUrl();
} else if (Hls.isSupported()) {
var hls = new Hls();
@@ -163,18 +163,22 @@ $(function () {
listHelperExclusiveFilters.push(SUPPORTED_FILETYPES);
}
var sortByName = function (a, b) {
// sorts ascending
if (a["display"].toLowerCase() < b["display"].toLowerCase()) return -1;
if (a["display"].toLowerCase() > b["display"].toLowerCase()) return 1;
return 0;
};
self.listHelper = new ItemListHelper(
"gcodeFiles",
{
name: function (a, b) {
// sorts ascending
if (a["display"].toLowerCase() < b["display"].toLowerCase())
return -1;
if (a["display"].toLowerCase() > b["display"].toLowerCase()) return 1;
return 0;
},
name: sortByName,
upload: function (a, b) {
// sorts descending
if (a["date"] === undefined && b["date"] === undefined) {
return sortByName(a, b);
}
if (b["date"] === undefined || a["date"] > b["date"]) return -1;
if (a["date"] === undefined || a["date"] < b["date"]) return 1;
return 0;
@@ -44,7 +44,8 @@
return;
}
notice.text_container.css("max-height", height);
notice.text_container.css("overflow", "auto");
notice.text_container.css("overflow-x", "hidden");
notice.text_container.css("overflow-y", "auto");
};
PNotify.prototype.modules.maxheight = {
+4 -3
View File
@@ -845,7 +845,7 @@ ul.dropdown-menu li a {
height: 30px;
margin-right: 10px;
margin-bottom: 10px;
padding-left: 8px;
padding: 0;
}
.control-box {
@@ -1346,10 +1346,11 @@ _:future,
.safari {
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 10px;
-webkit-border-radius: 10px;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2021-03-30 10:55+0200\n"
"PO-Revision-Date: 2021-03-30 11:13+0200\n"
"POT-Creation-Date: 2021-04-14 14:03+0200\n"
"PO-Revision-Date: 2021-04-14 14:04+0200\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -1227,48 +1227,48 @@ msgstr "Analysiere..."
msgid "Analyzed"
msgstr "Analysiert"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:641
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:649
#: src/octoprint/static/js/app/viewmodels/files.js:929
msgid "Model size"
msgstr "Modelgröße"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:651
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:659
msgid "Estimated layer height"
msgstr "Geschätzte Schichthöhe"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:654
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:662
#: src/octoprint/templates/tabs/timelapse.jinja2:69
msgid "mm"
msgstr "mm"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:657
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:665
msgid "Estimated total print time"
msgstr "Geschätzte Gesamtdauer"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:662
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:670
msgid "Layers with extrusion"
msgstr "Layer mit Extrusion"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:695
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:703
msgid "Layer number"
msgstr "Schichtnummer"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:696
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:704
msgid "Layer height"
msgstr "Schichthöhe"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:697
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:705
msgid "GCODE commands"
msgstr "GCODE Befehle"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:701
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:710
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:709
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:718
#: src/octoprint/static/js/app/viewmodels/files.js:944
#: src/octoprint/static/js/app/viewmodels/files.js:960
msgid "Filament"
msgstr "Filament"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:712
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:720
#: src/octoprint/static/js/app/viewmodels/control.js:85
#: src/octoprint/static/js/app/viewmodels/files.js:962
#: src/octoprint/static/js/app/viewmodels/printerstate.js:355
@@ -1278,7 +1278,7 @@ msgstr "Filament"
msgid "Tool"
msgstr "Tool"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:724
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:732
#: src/octoprint/static/js/app/viewmodels/files.js:972
msgid "Estimated print time"
msgstr "Geschätzte Dauer"
@@ -1384,24 +1384,32 @@ msgstr "Boundingbox für besuchte Koordinaten anzeigen"
msgid "Show printed bounding box"
msgstr "Boundingbox für bedruckte Koordinaten anzeigen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:92
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:90
msgid "Show layer bounding box"
msgstr "Boundingbox für bedruckte Koordinaten der Schicht anzeigen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:93
msgid "Show segment starts"
msgstr "Liniensegmentstarts anzeigen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:98
msgid "Hide empty layers"
msgstr "Leere Schichten verstecken"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:92
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:95
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:98
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:101
msgid "Causes reload"
msgstr "Verursacht einen Reload"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:95
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:101
msgid "Sort layers"
msgstr "Schichten sortieren"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:99
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:105
msgid "Reset options"
msgstr "Optionen zurücksetzen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:107
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:113
msgid "\n"
" Note that the time and usage values in this tab are <strong>estimated</strong> by the GCODE viewer in your\n"
" browser and might differ from the values <strong>estimated</strong> by the server that are displayed in the\n"
@@ -1417,7 +1425,7 @@ msgstr "\n"
" ungenau sein können, da sie nur auf Informationen aus den GCODE Dateien basieren.\n"
" "
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:117
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:123
#: src/octoprint/templates/dialogs/settings/folders.jinja2:73
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:94
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:459
@@ -1429,7 +1437,7 @@ msgstr "\n"
msgid "Warning"
msgstr "Warnung"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:118
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:124
msgid "<p>\n"
" You've selected <strong data-bind=\"text: selectedFile.name\"></strong> for printing which has a size of\n"
" <strong data-bind=\"text: formatSize(selectedFile.size())\"></strong>. Depending on your machine this\n"
@@ -1449,7 +1457,7 @@ msgstr "<p>\n"
" Bist Du sicher, dass du die Datei trotzdem visualisieren willst?\n"
" </p>"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:129
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:135
#, python-format
msgid "Yes, please visualize %(name)s regardless of its size"
msgstr "Ja, bitte visualisiere %(name)s unabhängig seiner Größe"
+49 -4
View File
@@ -208,9 +208,8 @@ regex_command = re.compile(
class gcode:
def __init__(self, progress_callback=None):
def __init__(self, incl_layers=False, progress_callback=None):
self._logger = logging.getLogger(__name__)
self.layerList = None
self.extrusionAmount = [0]
self.extrusionVolume = [0]
self.totalMoveTimeMinute = 0
@@ -221,6 +220,25 @@ class gcode:
self._minMax = MinMax3D()
self._progress_callback = progress_callback
self._incl_layers = incl_layers
self._layers = []
self._current_layer = None
def _track_layer(self, pos):
if not self._incl_layers:
return
if self._current_layer is None or self._current_layer["z"] != pos.z:
self._current_layer = {"z": pos.z, "minmax": MinMax3D(), "commands": 1}
self._layers.append(self._current_layer)
elif self._current_layer:
self._current_layer["minmax"].record(pos)
def _track_command(self):
if self._current_layer:
self._current_layer["commands"] += 1
@property
def dimensions(self):
size = self._minMax.size
@@ -237,6 +255,23 @@ class gcode:
"maxZ": None if math.isinf(self._minMax.max.z) else self._minMax.max.z,
}
@property
def layers(self):
return [
{
"num": num + 1,
"z": layer["z"],
"commands": layer["commands"],
"bounds": {
"minX": layer["minmax"].min.x,
"maxX": layer["minmax"].max.x,
"minY": layer["minmax"].min.y,
"maxY": layer["minmax"].max.y,
},
}
for num, layer in enumerate(self._layers)
]
def load(
self,
filename,
@@ -450,6 +485,10 @@ class gcode:
# time to add is maximum of both
totalMoveTimeMinute += max(moveTimeXYZ, extrudeTime)
# process layers if there's extrusion
if e:
self._track_layer(pos)
elif gcode == "G4": # Delay
S = getCodeFloat(line, "S")
if S is not None:
@@ -510,7 +549,6 @@ class gcode:
pos.y = y
if z is not None:
pos.z = z
# M codes
elif gcode == "M82": # Absolute E
relativeE = False
@@ -578,6 +616,9 @@ class gcode:
for _ in range(len(totalExtrusion), currentExtruder + 1):
totalExtrusion.append(0.0)
if gcode or tool:
self._track_command()
if throttle is not None:
throttle(lineNo, readBytes)
if self._progress_callback is not None:
@@ -602,13 +643,17 @@ class gcode:
}
def get_result(self):
return {
result = {
"total_time": self.totalMoveTimeMinute,
"extrusion_length": self.extrusionAmount,
"extrusion_volume": self.extrusionVolume,
"dimensions": self.dimensions,
"printing_area": self.printing_area,
}
if self._incl_layers:
result["layers"] = self.layers
return result
def getCodeInt(line, code):
Binary file not shown.
+31 -23
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2021-03-30 10:55+0200\n"
"PO-Revision-Date: 2021-03-30 11:13+0200\n"
"POT-Creation-Date: 2021-04-14 14:03+0200\n"
"PO-Revision-Date: 2021-04-14 14:04+0200\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -1227,48 +1227,48 @@ msgstr "Analysiere..."
msgid "Analyzed"
msgstr "Analysiert"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:641
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:649
#: src/octoprint/static/js/app/viewmodels/files.js:929
msgid "Model size"
msgstr "Modelgröße"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:651
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:659
msgid "Estimated layer height"
msgstr "Geschätzte Schichthöhe"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:654
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:662
#: src/octoprint/templates/tabs/timelapse.jinja2:69
msgid "mm"
msgstr "mm"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:657
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:665
msgid "Estimated total print time"
msgstr "Geschätzte Gesamtdauer"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:662
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:670
msgid "Layers with extrusion"
msgstr "Layer mit Extrusion"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:695
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:703
msgid "Layer number"
msgstr "Schichtnummer"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:696
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:704
msgid "Layer height"
msgstr "Schichthöhe"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:697
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:705
msgid "GCODE commands"
msgstr "GCODE Befehle"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:701
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:710
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:709
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:718
#: src/octoprint/static/js/app/viewmodels/files.js:944
#: src/octoprint/static/js/app/viewmodels/files.js:960
msgid "Filament"
msgstr "Filament"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:712
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:720
#: src/octoprint/static/js/app/viewmodels/control.js:85
#: src/octoprint/static/js/app/viewmodels/files.js:962
#: src/octoprint/static/js/app/viewmodels/printerstate.js:355
@@ -1278,7 +1278,7 @@ msgstr "Filament"
msgid "Tool"
msgstr "Tool"
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:724
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:732
#: src/octoprint/static/js/app/viewmodels/files.js:972
msgid "Estimated print time"
msgstr "Geschätzte Dauer"
@@ -1384,24 +1384,32 @@ msgstr "Boundingbox für besuchte Koordinaten anzeigen"
msgid "Show printed bounding box"
msgstr "Boundingbox für bedruckte Koordinaten anzeigen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:92
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:90
msgid "Show layer bounding box"
msgstr "Boundingbox für bedruckte Koordinaten der Schicht anzeigen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:93
msgid "Show segment starts"
msgstr "Liniensegmentstarts anzeigen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:98
msgid "Hide empty layers"
msgstr "Leere Schichten verstecken"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:92
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:95
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:98
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:101
msgid "Causes reload"
msgstr "Verursacht einen Reload"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:95
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:101
msgid "Sort layers"
msgstr "Schichten sortieren"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:99
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:105
msgid "Reset options"
msgstr "Optionen zurücksetzen"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:107
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:113
msgid "\n"
" Note that the time and usage values in this tab are <strong>estimated</strong> by the GCODE viewer in your\n"
" browser and might differ from the values <strong>estimated</strong> by the server that are displayed in the\n"
@@ -1417,7 +1425,7 @@ msgstr "\n"
" ungenau sein können, da sie nur auf Informationen aus den GCODE Dateien basieren.\n"
" "
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:117
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:123
#: src/octoprint/templates/dialogs/settings/folders.jinja2:73
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:94
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:459
@@ -1429,7 +1437,7 @@ msgstr "\n"
msgid "Warning"
msgstr "Warnung"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:118
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:124
msgid "<p>\n"
" You've selected <strong data-bind=\"text: selectedFile.name\"></strong> for printing which has a size of\n"
" <strong data-bind=\"text: formatSize(selectedFile.size())\"></strong>. Depending on your machine this\n"
@@ -1449,7 +1457,7 @@ msgstr "<p>\n"
" Bist Du sicher, dass du die Datei trotzdem visualisieren willst?\n"
" </p>"
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:129
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:135
#, python-format
msgid "Yes, please visualize %(name)s regardless of its size"
msgstr "Ja, bitte visualisiere %(name)s unabhängig seiner Größe"
+31 -23
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.6.0.dev405+g72dfa803c\n"
"Project-Id-Version: OctoPrint 1.6.0rc2.dev12+ga1e5b4de6\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2021-03-30 10:55+0200\n"
"POT-Creation-Date: 2021-04-14 14:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1331,48 +1331,48 @@ msgstr ""
msgid "Analyzed"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:641
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:649
#: src/octoprint/static/js/app/viewmodels/files.js:929
msgid "Model size"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:651
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:659
msgid "Estimated layer height"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:654
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:662
#: src/octoprint/templates/tabs/timelapse.jinja2:69
msgid "mm"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:657
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:665
msgid "Estimated total print time"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:662
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:670
msgid "Layers with extrusion"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:695
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:703
msgid "Layer number"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:696
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:704
msgid "Layer height"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:697
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:705
msgid "GCODE commands"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:701
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:710
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:709
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:718
#: src/octoprint/static/js/app/viewmodels/files.js:944
#: src/octoprint/static/js/app/viewmodels/files.js:960
msgid "Filament"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:712
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:720
#: src/octoprint/static/js/app/viewmodels/control.js:85
#: src/octoprint/static/js/app/viewmodels/files.js:962
#: src/octoprint/static/js/app/viewmodels/printerstate.js:355
@@ -1382,7 +1382,7 @@ msgstr ""
msgid "Tool"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:724
#: src/octoprint/plugins/gcodeviewer/static/js/gcodeviewer.js:732
#: src/octoprint/static/js/app/viewmodels/files.js:972
msgid "Estimated print time"
msgstr ""
@@ -1495,24 +1495,32 @@ msgstr ""
msgid "Show printed bounding box"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:92
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:90
msgid "Show layer bounding box"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:93
msgid "Show segment starts"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:98
msgid "Hide empty layers"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:92
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:95
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:98
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:101
msgid "Causes reload"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:95
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:101
msgid "Sort layers"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:99
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:105
msgid "Reset options"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:107
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:113
msgid ""
"\n"
" Note that the time and usage values in this tab are "
@@ -1527,7 +1535,7 @@ msgid ""
" "
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:117
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:123
#: src/octoprint/templates/dialogs/settings/folders.jinja2:73
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:94
#: src/octoprint/templates/dialogs/settings/serialconnection.jinja2:459
@@ -1539,7 +1547,7 @@ msgstr ""
msgid "Warning"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:118
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:124
msgid ""
"<p>\n"
" You've selected <strong data-bind=\"text: "
@@ -1556,7 +1564,7 @@ msgid ""
" </p>"
msgstr ""
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:129
#: src/octoprint/plugins/gcodeviewer/templates/gcodeviewer_tab.jinja2:135
#, python-format
msgid "Yes, please visualize %(name)s regardless of its size"
msgstr ""