-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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-12093 Add ability to write condition Start/End gcode parts #19619
Conversation
CURA-12093 In this context, the tooltip is quite useless, and causes some issues because it sometimes appears when you don't want to. Moreover, the next commit will add a link to a detailed documentation.
Currently I have these lines in my StartUp: Under this PR those two lines would appear to translate to: which is certainly both easier to read, and to edit in the text box. A problem I have noticed has to do with multiple extruder printers and setting the temperature of the "Initial Extruder". Will nested "if" statements be allowed? |
Hi @GregValiant, thank you for this very valuable feedback 😃
You are completely correct, and this is indeed a case where this improvement would perform. It has really been designed for this.
The second example would also work. However, now you can also set formulas in the extruder number, so you can actually do the following, assuming your printer has 2 extruders:
This would be very handy indeed. I actually think that with the conditional G-Code parts, a few more variables/functions will be necessary to make it really useful. If you have others in mind, feel free to post an exhaustive list.
This first implementation doesn't, I didn't feel a great need for it, as the conditional parts is already a nice improvement. I think we can start with this, and if you feel that it would be really helpful, please tell us.
Good that you do so 😄 but I can also understand that some people want to control exactly what happens at start. |
The world of multi-extruders is complicated once you get into mixing hot ends and 3 or 4 extruders. I have been playing with IDEX definitions and post-processing plugins to allow Cura to better support IDEX machines (in particular the SOVOL SV06 and the Raise3D IDEX because both use M605 to set the mode. That conveniently dumps all the axis conversion on the printer/processor making Cura a suitable slicer for them. It is a niche situation but I thought I'd bring this up since you are looking at the StartUp. This problem might also extends to conventional dual extruder machines when "prime tower" is enabled.
What I had wished for was "T0_is_enabled" and "T0_is_used" which could be called in the StartUp. In post process I can pull "is_enabled" from the extruder stack. To get "is_used" for an enabled extruder I have to go through the entire gcode to see if it is being called at some point. If it is never called then it doesn't need to be heated up. That obviously is beyond can be can be done in the StartUp, but I thought I'd mention it. There may be some use for these so I'll throw them at you. PS: I'm glad I don't have to write the "how to" instructions for this. |
That does make very much sense indeed. It also depends on the printer's startup sequence though. For example, on UM printers, when the build plate Z-calibration sequence is being processed, it does both T0 and T1, and I am not sure we can actually disable the calibration for one of them, even if not used. Which means we have to heat it up anyway. But I agree that it is quite annoying, and those variables can probably help with other printers.
What about printers with more than 2 extruders ? Would you require the exact ordering of all the extruders ? For now, the post-processing script is a good option indeed. One issue we currently have, is that we resolve the start/end G-Code before actually sending the data to the engine. So in some edge cases the engine may take different decisions than the front-end, resulting e.g. in the |
The "Initial Extruder Number is wrong" bug was a big problem. Resolving that fixed a lot of issues in the StartUp of dual extruder machines. I understand not wanting to make a huge change over this but I thought it was worth mentioning. A post-processor or plugin is a good option for a mass produced printer but not so much for a custom one-off or a machine that has been altered (butchered) by the owner. There is a commonality in those situations as most of the time each extruder would feed it's own hot end and the hot ends would be mounted on a common print carriage. When that is the case the "off nozzle" should not be brought to print temperature. Insuring that happens is where I've gotten stuck. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments, but LGTM! I'll take a look at the component-test later.
I'm playing with the StartUp and Endings in 5.9alpha. So far it looks good. I like it. Much greater flexibility when changing materials. |
Add a new syntax to the machine/extruder start/end custom g-code, to enable or disable large parts of code.
Please also review the associated documentation:
https://github.com/Ultimaker/Cura/wiki/Start-End-G%E2%80%90Code
Also feel free to add unit test cases. The more the better 😃
CURA-12093