How can I tell if the file has been sliced by Cura?
How can I tell if the file has been sliced by Cura?
So, I looked at the .gcode file that I'm using (see it here: http://3dprinterwiki.info/wp-content/uploads/2016/03/Butterfly.gcode). It ends with a string that starts:
;CURA_PROFILE_STRING:eNrtWltv2zYUfhWC/Qg+tljjSbLdJDX0sHZJX9qiWDKs....
That seems like an indication that Cura was used to slice the file right? If so, why don't I get the "profile from gcode" option?
For anyone else that comes across this that wants to decode the string and has the same problem, here's how to decode it:
1) get the base64 string out of the gcode file I referenced earlier
2) in Ruby's irb:
require 'base64'require 'zlib'a = "Zlib::Inflate.inflate(Base64.decode64(a)).split(/[\t\n\f\b]/).each{|l| puts l}
or in Python:
options = ""options = base64.b64decode(options)options = zlib.decompress(options)
(don't know about Python - based on this: https://github.com/daid/LegacyCura/blob/master/Cura/util/profile.py#L256-L257
Edited by GuestThose are settings from the old cura. You can import them there.
The "File > Profile from Gcode" is referring to the old Cura (Cura 15.04 and before).
In the new Cura (Cura 2.1 and newer), the functionality is in the Profiles pane of the preferences. Press the import button and from the types dropdown (where it says Cura Profile (*.curaprofile)), select gcode.
In Cura 2.4, the latter should no longer be necessary; it will show both curaprofiles, gcode and legacy ini files by default. That is, if my pull request gets merged.
@ahoeben -
Wow, I never would have thought to select the file type. Seems like it should be able to figure that out when I click on the file. Oh well...
When I do that, select my .gcode file (the one linked to above), I get the error: "Failed to import profile from (my gcode file): Expecting value: line 1 column 1 (char 0)". The first line in the file is "M190 S50.000000"
I'm using Cura 2.3.1.
Seems like it should be able to figure that out when I click on the file. Oh well...
It should. It will. Cura 2.4
What version of Cura was this gcode sliced with?
The import gcode as profile functionality in Cura 2.x does not support importing gcode from legacy Cura (yet); only gcode produced by Cura 2.x is supported.
@ahoeben - I can't tell what version it's sliced with. I looked through the file and there aren't any hints that I can find. Since I am only in possession of the GCode (this is a sample file that came with my printer), I don't think I'll be able to figure this out.
Ok, then let me put it this way; unfortunately this specific gcode file can not currently be imported as a profile, because it was written by an older version of Cura.
Recommended Posts
nallath 1,124
You can only import the settings from g-code if the g-code was sliced by Cura at some point in time.
Link to post
Share on other sites