Jump to content
Ultimaker Community of 3D Printing Experts

Can Cura 5.0.0 handled ‘if’ statements?


Recommended Posts

Posted · Can Cura 5.0.0 handled ‘if’ statements?

Does anyone know if Cura 5.0.0 can handle ‘if’ statements in the machine settings start or end gcode? I’d like to add an if statement in the end gcode to raise the print head by 10mm, but only if z height is 10mm less than printer envelope. I can easily do this with an ‘if’ statement in the end gcode…but earlier versions of Cura did not allow this…or it wasn’t recognized. 

  • Link to post
    Share on other sites

    Posted · Can Cura 5.0.0 handled ‘if’ statements?

    It does not support logic or math in the Start or End gcodes.

    Unless your prints are always at max height you can use a relative move of 5 or 10mm's to get the nozzle off the print.

  • Link to post
    Share on other sites

    Posted · Can Cura 5.0.0 handled ‘if’ statements?

    Thanks for reply. Ya, I could do that, and also reduce z height accordingly under printer limits to be sure no issues, but thought it would be neat if it could handle the logic…maybe in future….

  • Link to post
    Share on other sites

    Posted · Can Cura 5.0.0 handled ‘if’ statements?

    My printer lists a Zmax at 250.  I didn't like the way the bowden and cables were bent when it's that high so I lowered it to 240 in cura.  I can still use the 250 if I need it.  I go back into Machine Settings and move the height back up for just that print.  It doesn't happen often (I think once for me).

    There is a slicer (PrusaSlicer?) that does math in the StartUp and End gcodes but I'm not sure if it can do logic.

  • Link to post
    Share on other sites

    Posted · Can Cura 5.0.0 handled ‘if’ statements?
    4 hours ago, GregValiant said:

    There is a slicer (PrusaSlicer?) that does math in the StartUp and End gcodes but I'm not sure if it can do logic.

    Just for Information Yes they can do it ( Prusa And SuperSlicer) Ie for Ender-3 end Gcode

    image.thumb.png.79e5ddef68bd647cc1bc31b32f8db42b.png

  • Link to post
    Share on other sites

    Posted · Can Cura 5.0.0 handled ‘if’ statements?

    Yes thanks...I also use Prusa Slicer and that is where I got the idea from. Wanted to use with Cura as well if that was possible....but I guess it isn't.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 12 replies
    ×
    ×
    • Create New...