Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNino van Hooff <ninovanhooff@gmail.com>2020-05-29 15:30:33 +0300
committerNino van Hooff <ninovanhooff@gmail.com>2020-05-29 15:30:33 +0300
commit89f0970a887612a6819263633180d027d06224af (patch)
tree0b900495a95a234c15f893563975eb346aee6e20 /plugins/GCodeWriter
parent1e33360c359373f7acbf95ca9706514d12c0dd7f (diff)
Remove trailing whitespace from Python files
Diffstat (limited to 'plugins/GCodeWriter')
-rw-r--r--plugins/GCodeWriter/GCodeWriter.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py
index 93ff0f51ff..160857443b 100644
--- a/plugins/GCodeWriter/GCodeWriter.py
+++ b/plugins/GCodeWriter/GCodeWriter.py
@@ -17,12 +17,12 @@ catalog = i18nCatalog("cura")
class GCodeWriter(MeshWriter):
"""Writes g-code to a file.
-
+
While this poses as a mesh writer, what this really does is take the g-code
in the entire scene and write it to an output device. Since the g-code of a
single mesh isn't separable from the rest what with rafts and travel moves
and all, it doesn't make sense to write just a single mesh.
-
+
So this plug-in takes the g-code that is stored in the root of the scene
node tree, adds a bit of extra information about the profiles and writes
that to the output device.
@@ -30,7 +30,7 @@ class GCodeWriter(MeshWriter):
version = 3
"""The file format version of the serialised g-code.
-
+
It can only read settings with the same version as the version it was
written with. If the file format is changed in a way that breaks reverse
compatibility, increment this version number!
@@ -42,9 +42,9 @@ class GCodeWriter(MeshWriter):
re.escape("\r"): "\\r" # Carriage return. Windows users may need this for visualisation in their editors.
}
"""Dictionary that defines how characters are escaped when embedded in
-
+
g-code.
-
+
Note that the keys of this dictionary are regex strings. The values are
not.
"""
@@ -58,11 +58,11 @@ class GCodeWriter(MeshWriter):
def write(self, stream, nodes, mode = MeshWriter.OutputMode.TextMode):
"""Writes the g-code for the entire scene to a stream.
-
+
Note that even though the function accepts a collection of nodes, the
entire scene is always written to the file since it is not possible to
separate the g-code for just specific nodes.
-
+
:param stream: The stream to write the g-code to.
:param nodes: This is ignored.
:param mode: Additional information on how to format the g-code in the
@@ -117,10 +117,10 @@ class GCodeWriter(MeshWriter):
def _serialiseSettings(self, stack):
"""Serialises a container stack to prepare it for writing at the end of the g-code.
-
+
The settings are serialised, and special characters (including newline)
are escaped.
-
+
:param stack: A container stack to serialise.
:return: A serialised string of the settings.
"""