35 Commits

Author SHA1 Message Date
Jaime van Kessel
60a50ee393
Codestyle & readability cleanup for g-codeprofile reader 2020-07-29 10:47:49 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
6035adb963 Fix return type in GCodeProfileReader 2020-05-27 14:24:28 +02:00
Nino van Hooff
40327c4259 Convert doxygen to rst for GcodeReader, GcodeGzReader/Writer,
GCodeProfileReader
2020-05-08 15:58:51 +02:00
Ghostkeeper
54a03723ab
Set encoding correctly when opening files everywhere
Otherwise the encoding is interpreted differently on Windows and Mac.
2018-06-11 11:09:07 +02:00
Lipu Fei
9a5fb47a6e Merge master into material marketplace 2018-05-01 11:56:34 +02:00
Ghostkeeper
572721e20d
Catch ContainerFormatError when deserialising containers
Only the deserialize() functions themselves may pass the ContainerFormatError on, because their callers will have to handle those errors anyway.

Contributes to issue CURA-5045.
2018-04-06 13:26:16 +02:00
Lipu Fei
c3fe53123b Create module cura.ReaderWriters
CURA-4644

Move all reader writer classes into cura.ReaderWriters.
2018-04-05 15:14:15 +02:00
Lipu Fei
a81981a27a Better info on no profiles to import for gcode
CIRA-4946

If a gcode is sliced with default profiles, there won't be any custom
profiles to import from that gcode. In that case, we show a info message
telling the user about this instead of showing an error message.
2018-03-09 16:40:57 +01:00
Ghostkeeper
f91c990fed
Streamline usage of g-code (vs. GCode, Gcode, G-code, gcode, etc.)
This makes it all the same. It is something that came up in our translation pass this time.

Contributes to issue CURA-4883.
2018-02-13 15:50:59 +01:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Lipu Fei
a3d92d557d GCodeProfileReader: make deserialization more robust
CURA-3770
2017-05-08 11:33:50 +02:00
Jaime van Kessel
5482515157 Importing profiles from g-code made by Cura 2.3 is now possible again
CURA-2943
2016-11-17 13:15:25 +01:00
Simon Edwards
64ecb114b8 Store the Quality profile for the 'global' and extruders in the gcode. Read in all of the quality profile during import.
Contributes to CURA-1727 GCode Profile reading/writing: Broken and needs update
2016-07-12 12:41:49 +02:00
fieldOfView
c06e5f4d39 Remove unused name/id when importing a profile from a gcode file
A unique name will be set from the filename by ContainerRegistry
CURA-1615
2016-07-05 21:58:47 +02:00
Thomas Karl Pietrowski
93cdce7b33 GCodeProfileReader: Fixing read of profiles from GCode 2016-06-24 16:01:47 +02:00
Thomas Karl Pietrowski
1fdf835c19 GCodeProfileReader: Increasing the setting version 2016-06-23 19:40:52 +02:00
fieldOfView
7c606b21b5 Remove some trailing spaces
CURA-1615
2016-06-23 10:18:27 +02:00
Thomas Karl Pietrowski
688accfab7 GCodeProfileReader: Removing useless containername 2016-06-22 23:25:04 +02:00
Thomas Karl Pietrowski
4ca247cf37 Changing the profile name to something unique.
Imported profiles will be now called "Custom profile (<G-code
filename>)"
2016-06-17 12:41:24 +02:00
Thomas Karl Pietrowski
200529e8c9 Removing setReadOnly(False)
The profile is writable by default.
2016-06-17 11:43:23 +02:00
Thomas Karl Pietrowski
65f2afeebd Use the same id as set when exporting
Nothing special. Doesn't fix anything..
2016-06-17 11:36:39 +02:00
Thomas Karl Pietrowski
9e1b10d1b8 CURA-1615: Updating GCodeProfileReader
I got the plugin most of all working. At least the "successfully"
imported profile XY" dialog appears. But sadly the profile does not
appear in the list of profiles after that. I can only guess something is
blocking here.
Additionally it should be noted that G-Code exported from Cura 2.1.x
does not work here anymore on Cura 2.2.x.
2016-06-16 20:02:21 +02:00
Jaime van Kessel
9009fb9d3d Codestyle & documentation
CURA-537
2016-04-28 16:01:54 +02:00
Ghostkeeper
7a913bf99a Fix comment
It had some variable name pasted into it by accident.

Contributes to issue CURA-936.
2016-03-02 17:31:58 +01:00
Jaime van Kessel
9c5e169f2b Loaded profiles are now marked as dirty so they are saved correctly
CURA-936
2016-03-01 16:24:43 +01:00
Jaime van Kessel
e90fd95495 Profile importing now checks if it's the right file type
Contributes to CURA-936
2016-03-01 15:16:50 +01:00
Ghostkeeper
afd63c53c0 Escape characters of escape_characters dict at initialisation
Instead of escaping it each time you read a function with that ugly inline for loop, escape the characters when initialising the dict itself.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
a3936540d8 Move escape characters to be a static class variable
It is static and constant, so it won't need to initialise this dictionary every time it reads.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
6908f2c011 Move prefix length out of for loop
It is cached so it only needs to be computed once.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
cfa4382052 Move serialised version number to top of GCode reader/writer
The version number is more clearly exposed there.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
8947873121 Update documentation
The doxygen documentation of the class and both its functions was also out of date.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
fedfffb98d Update documentation
Just a slight inaccuracy in the documentation of one of the imports.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
065b954cad GCodeProfileReader plugin properly returns a profile
Instead of setting the profile as the current profile, return the resulting profile.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00
Ghostkeeper
63d007c02c Rename GCodeReader to GCodeProfileReader
The new name is more appropriate since it reads only the profiles from the g-code. In the future there might be some other plug-in that reads the actual g-code as for instance a mesh.

Contributes to issue CURA-34.
2015-12-17 13:35:16 +01:00