-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cura Support #43
Comments
I'll need to check how the gcode looks. If Cura saves the print settings to the gcode as comments, that will help a lot. If all settings can be parsed and custom g-code can be injected, it shouldn't be to hard. |
yup, I think another problem was the old version was hard because it was all absolute gcode, now it can do relative gcode as well. |
I had a look at the gcode lastest Cura Beta produces:
|
Thanks for looking into this! :) I can try to submit a enhancement request to the Cura team and see how they feel about it. Let me know if that's ok! Thanks! |
No problem. |
Done :) Cross referencing: Ultimaker/Cura#3667 |
I'm a developer for Cura. Could you help me out with what's needed exactly for the first two things that Spegelius mentioned? I could easily add a comment before all Currently we put the settings that the user has overridden at the end of the g-code. It's intended to have a quick way of knowing from the g-code what the user has changed if they send the g-code over to Ultimaker's support team. So indeed it's not all settings by far (but we know what the rest of them are by looking at Cura's defaults for the most part). |
The TOOL CHANGE comment is a remnant from the beginning of filaswitch development and isn't necessary, I'll probably remove handling for in from code anyways. In other slicers (S3D, Slic3r and KISSlicer), that comment is added to the custom g-code section and it is positioned just before the actual T-command. I tried to do this in Cura in Machine Settings -> Extruder x -> Start G-code, but the comment was positioned only after the actual T-command, which doesn't work:
Anyhow, not a necessity as I can do without it and in general I hope to do without slicers needing filaswitch specific changes. About print settings: filaswitch needs quite a lot of info about what the print settings are to make the tool change g-code additions integrate seamlessly to the print. The preferred way to obtain that info is to have the settings in the g-code files because there's no need to parse the g-code and do deductions, which could be wrong. S3D, Slic3r and KISSlicer do this already (they store all print settings) so there's code implemented for reading required settings from the comments. Alternatives for this:
List of settings (at least these are needed):
In general, I'd just dump all the settings, in my opinion it's good to have a store of old print settings that one can go back if needed. KISS actually allows users to read the print settings from old gcode, if there's need to recover settings. |
If you put the I don't think it's feasible to parse the g-code. It'll be impossible to disambiguate the extrusion multiplier and path width for instance, and it'll be very hard to detect the brim, raft, z-offset and coasting. Cura currently puts the settings at the end of the g-code just like S3D, Slic3r and KISS, all the way in the bottom of the file. And you can import a .gcode file as profile to get the settings from it back. However it only puts settings there that the user has overwritten from the default profiles. In theory you could fill the rest in by the defaults in Cura but that would be a pain because you'd have to maintain multiple sets of default settings in Filaswitch for each version of Cura or something. We decided to put only the user-changed settings in there so that it'd be a bit more human-readable. I don't think we'll change that part. I was hoping we might want to put a few more things in the g-code headers but that is a lot of settings there! I'll sleep a bit over it I guess. There's a few problems with the settings that you need in Cura in general:
|
I'll re-check the tool change comment positioning; I tried it on some beta-vserion of Cura. Also might've configured it wrong, can't remember the details anymore.
|
I'm going to have a look at this again. I'm pretty disappointed with the latest S3D update, and Slic3rPE still forces models to be on the build plate, which makes printing some things very challenging. |
Here's a new section of documentation about the temperature regulation in CuraEngine that will be relevant to you: |
Thanks, @Ghostkeeper. Correct me if I am wrong, but Cura does send all settings to CuraEngine to slice, right? Perhaps a setting flag that would tell CuraEngine to dump all the settings to a file that could be parsed by filaswitch for the relevant stuff would be one way to go. |
I'm actually working on a gcode parser that doesn't need the settings in the gcode file, got fed up after Slic3r did some things that broke the Slic3r layer parser... it does read Cura gcode already, but it's in early stages still, many things to implement. Also I'll be writing some unit test so it'll take a while. |
Cool. Let me know if you need help testing and whatnot. |
Roger. Current WIP code is in genericparser-branch, not usable yet but has the basics for parsing the gcode. About Cura: installed the latest version, having problems with changing retraction length for other extruders than 0, where's the per extruder settings? |
Yes, Cura's front-end sends all settings via Protobuf messages over a local socket to CuraEngine. If Cura is packaged in debug mode, these settings are output to the log as well. Cura's beta releases are always packaged in debug mode, so you can see there how it looks. Alternatively, you could run CuraEngine using verbose mode ( To make CuraEngine dump all settings to a file is not something we would implement in the mainstream Cura branch for just this filaswitch application. So you'd need to distribute your own version of Cura to get that or manage somehow to read it from the log. |
Branch generic-parser has now code that seems to process Cura-sliced files ok. I haven't printed any of the files yet, but I'll try one tonight/tomorrow. Also only Cura works ATM. And temperature handling is disabled so make sure to tune Cura temps properly for all extruders. |
Ok more rant: why does Cura add unnecessary tool change to the beginning of a file? I sliced a model that uses T1 and T2, but Cura still adds T0 to the beginning: `;FLAVOR:Marlin ;TIME:4833 ;Generated with Cura_SteamEngine 3.6.0 |
There are quite a lot of things like this that are sort of annoying about Cura. I've seen unexplained movements to X0 Y0 after the first use of each tool. |
Haven't noticed that, at least yet.But some odd movements now and then, head moving to areas where it shouldn't be and messing up the print with blobs of wrong colors. |
Good progress! I'll try to do some tests starting next month. I've been busy working on a carousel-based tool changer I'm taking to MRRF at the end of the month (hence the use of the Cura prime tower) and various improvements for my Octoprint plugin. |
This was a bug in Cura (and also considered by the developers to be a bug) that should be fixed now. |
@paukstelis : sounds interesting, I've also been thinking about how to go about implementing tool changing. Nothing concrete, too much other projects going on...
Well that movement to X0 Y0 happened a couple of times for me. I'm using Cura 3.6.0. These movements were after tool change. Example line: G0 F5400 X0.00 Y0.00 Z0.5. Only a couple of such lines, maybe related to tool change being the last for that tool? Progress so far:
Todo:
Printed a benchy with 2 colors: Underextruding for some reason quite a lot. On other note, I managed to optimize the filament prepurge routine: now there's first a 20 mm slowish retract, then 2.5s pause and after that I ram 29mm, followed by immediate long and fast retract. Cuts the ramming amount to half and the tips seem to be cleaner. |
Not nearly the precision of the E3D tool changer, but it is somewhat novel. Looks like this: Yes, the X0.0 Y0.0 movements are bugging a number of people: Ultimaker/Cura#2433 I believe setting layer_start_x and layer_start_y to something else can at least minimize some bad things from happening for this bug. I just looked at the cpp file for the M82/M83 commands it throws in there. I don't quite get why its even there. There isn't an option to mix relative and absolute extrusion for different extruders (if you check relative extrusion it applies to all extruders). Based on that thread above, the post-processing replacement tag might be a simpler solution for the temperature parsing, just replace all the existing M109/104s with comments. The unexplained movements over the model at the first tool changes are something that still bugs me and is probably related to the X0.0 Y0.0 bug. |
So I have finally gotten around to testing this out without any luck. I pulled the latest and switched to genericparser. At this point, I have tried testing with gcode from Cura 3.6.0. It looks like there are a number of things that aren't getting assigned to the extruders?:
|
Hmm strange, I'll check that once I get some time |
I have gotten it to work with some profiles, but for other profiles it fails with this error. I'm looking at using Cura for printing with Prusa MMU2S. It looks like there is mostly a new protocol in Slic3rPE for MMU2 (ramming, etc.). I think most of this can be adapted from existing methods in filaswitch, but it looks like the wipe during initial retract is not yet implemented in genericparser, so I'll see if I can work up a PR for that. |
I have some wipe movements implemented on master branch, just need to merge
it to the genericparser. I'll try to work on it this week, I need to do it
while I still remember what is what anyways... :)
…On Mon, May 6, 2019 at 1:22 AM paukstelis ***@***.***> wrote:
I have gotten it to work with some profiles, but for other profiles it
fails with this error.
I'm looking at using Cura for printing with Prusa MMU2S. It looks like
there is mostly a new protocol in Slic3rPE for MMU2 (ramming, etc.). I
think most of this can be adapted from existing methods in filaswitch, but
it looks like the wipe during initial retract is not yet implemented in
genericparser, so I'll see if I can work up a PR for that.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQU7WHYMIJ5DJIT4UHAWSLPT5MZXANCNFSM4EZ4OWEQ>
.
|
I merged master to genericparser so the new wipe movements should be available. See CubeFeeder4c_wipe hwcfg for turning them on. Also comments welcome about how they work, they might need some tuning.
|
Great. I'll check it out this evening and hopefully try some prints. Random 0,0 moves are a Cura problem. I don't see filaswitch needing to take care of it on its own. I just use Cura post-processing with search/replace (X0.0 -> ; X0.0) which works well enough until there is a real Cura fix. |
I'm trying to use the initial retracts as 'ramming' which is followed by long retracts. I've found a couple of things. First, not all initial retract moves are included in the wipe. I have 12 moves, only the first few are actually used. Second, the long retracts with wipe don't seem to be outputting any extruder moves. Here is what I am using in the hardware config:
And here is what gets output:
Actually, a third thing I found was that prepurge.initial.retract must be defined or an error gets thrown. |
If you see this happen with the current stable release of Cura (4.0), I'd like to have a project file so that I can reproduce it and maybe fix it or point out what settings are causing it. Edit: Nevermind. We've linked before to a topic that links to a topic where reproduce steps are located. |
The issue with no extruder movements on long retract wipe is just that the extruder is not defined in the method gen_movement call. Just needs the EDIT: Also figured out that wipe distance, rr_wipe_length was hard coded at 8. How about: |
Managed to do some testing and working on a first print. There will certainly need to be some modifications to make it nicer, but it does work and I was getting OK, though not great filament tips with the settings I had. One of the other problems I ran across is that tower raft does not seem to work in the genericparser branch. It throws this error:
I've always found the rafts help a lot when the tower is not very large. |
I've also discovered the cause of the z_hop error, though not the explanation. It looks like having movements in the starting gcode really messes things up. For example, if I have this line in my starting gcode script:
It fails and throws a z_hop error. Removing that line and filaswitch works just fine. |
Ok I'll try to look at these problems during weekend. The wipes need more
work because filaswitch isn't meant for one printer only -> the moves need
to be fitted to work with different settings.
…On Thu, May 9, 2019 at 4:18 AM paukstelis ***@***.***> wrote:
I've also discovered the cause of the z_hop error, though not the
explanation. It looks like having negative positions in the starting gcode
really messes things up. For example, if I have this line in my starting
gcode script:
;go outside print area
G1 Y-3.0 F1000.0
It fails and throws a z_hop error. Removing that line and filaswitch works
just fine.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQU7WFE3ZZBZKEP3G77HPTPUN3XPANCNFSM4EZ4OWEQ>
.
|
I've done one print with Cura+Filaswitch+Prusa MMU2S and it was successful! I had no user interventions to fix load/unloads on the MMU2 (something I haven't done with Slic3rPE), so it seems that the tip quality even in this unoptimized state is pretty good. One other thing to consider would be to ease up on where the slicer identification takes place. If I recall correctly, right now it looks for the 'generated by Cura SteamEngine' comment at line 5 or something, but newer versions of Cura (including the git master branch) write some extra stuff so its no longer at that position and needs to be manually changed. Maybe if it appears in the first 30-40 lines? |
If the Griffin g-code flavour is used, the text Otherwise it puts a header before the generator which, if I've counted correctly, causes the |
Fixed some bugs: raft should work now, gcode inside START_GCODE comments shouldn't affect the parsing, Slic3r PE tuning and S3D should be also supported now. |
Raft still doesn't work for me. I've also found that if I get lots of division by zero errors, depending on how many lines I manually define (running from command line in most cases). Last file I worked with it would throw an error until I manually got to 8 lines. Let me know if you want to see that file to test. |
Ok, send me the file, easier to debug.
pe 10. toukok. 2019 klo 2.50 ip. paukstelis <notifications@github.com>
kirjoitti:
… Raft still doesn't work for me. I've also found that if I get lots of
division by zero errors, depending on how many lines I manually define
(running from command line in most cases). Last file I worked with it would
throw an error until I manually got to 8 lines. Let me know if you want to
see that file to test.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQU7WF3HJDDQ2VR5ZTIPULPUVOQPANCNFSM4EZ4OWEQ>
.
|
Here you go. With hwcfg I am using. |
Found the reason for the missing raft and division by zero errors: second tower first layer was at 0.5, which caused the purge calculation try to print one very fat line. Fixed the tower z gap fill function so now each tower has same initial z so raft works and no more huge gaps (hopefully) |
I've gotten back around to doing some more testing. Observations:
|
|
Temperature handling should be now working in genericparser branch. No test prints done, but gcode seems ok. Also with Cura, make sure that the standby temperature is same as the printing temperature. With single nozzle setup the standby temperature is really unwelcome feature... |
We've had a pull request on Cura to ease the workflow in Cura of working with a printer with a mixing nozzle similar to this. |
@Ghostkeeper : great, that feature makes things easier. Sliced a multi-model with Cura 4.1 and there seems to be few of those moves to 0 coordinates: G0 F5400 X0.00 Y10 Z0.5. At a guess, does this happen when extruder prints the last time during a print? The model uses 4 materials, 3 of them are on the first layer and 2 of those print only on first layer. Incidentally there are two moves. |
We haven't seen a bug with those moves recently. Perhaps the Layer Start X/Y is 0 or the A project file can help to debug. |
Here's the project file: https://www.dropbox.com/s/wicl3tvg448dtex/CFFFP_3DBenchy_-_Dualprint.3mf?dl=1. Printed Benchy, tool changes seem to work quite nicely. I need to tune the general print settings, though, seems the retraction needs to be upped a bit and probably other stuff. Also I'm seeing the underextrusion still, again not sure what does that. Haven't tried removing the extra M82 commands that are after each tool change, could be that those are messing with the Duet pressure advance... |
I have still been seeing the occasional X0.0 Y0.0 moves as well in 4.1 |
Cura seems to be improving a lot faster than S3D in terms of features (adaptive layers, tree support, etc), but they still do not support single nozzle / dual extrusion :(
I asked the devs if there are any plans, and they said the next release (3.3) should support single nozzle. I also tried the beta, and I see now there is an option to inject custom g-code at each extruder start / end.
Question: How hard would it be to get filaswitch working with Cura 3.X?
The text was updated successfully, but these errors were encountered: