Jump to content
Ultimaker Community of 3D Printing Experts

ChangeAtZ: at which layer or height exactly ?


Recommended Posts

Posted (edited) · ChangeAtZ: at which layer or height exactly ?

I'm a sr. software engineer.  I've already created my own post processing extension over the weekend (calling it SpeedChangeByLayer) that changes print speed or fan speed per layer, not by z-axis movements.  Started with the ChangeAtZ script, removed everything except print/fan speeds, then yanked out everything dealing with trying to find/calculate the z-axis movements and restructured the code & storage structure.  Instead, it now looks for the ;LAYER:xx comments, inserting the start of the change just after the proper layer (subtracting 1 from the Cura gui layer number, which ChangeAtZ does not do) and the reset just before the next ;LAYER:xx comment.  Currently, my code is messy as hell but works perfectly for a single layer.  Can insert multiple instances of it to affect multiple layers.  Also, the percentage change for print speed is always is a percentage of the original speed, not of the instance before it.  ie.If 1st change = 50% & 2nd change = 20%, the 2nd is 20% of the original speed, not 20% of 50%.  Not sure if I'll submit it or not.  I want to change the fan speed to work as a percentage instead of having the user enter the PWM number from 0-255 and also need to tweak the fan speed routines so it can work across a span of layers.  "Start speed change at layer 10 for a total of 5 layers".  Currently, that only works with the print speed.  Since the print speed change is a %, like changing the speed from the machine's panel during printing, I can always reset it back to 100% at the end of the layer(s).  With the fan speed, it can be different on each layer as in, "ramp up to 50% speed over 10 layers" in Cura.  So I have to first scan the entire layer for a fan change, M106 or M107, store it, then reset the fan to that speed at the end of the layer.  It's like moving the existing fan speed to the end of the layer, getting it out of the way so you can override the layer with your setting from the extension. (Keep wanting to call them plugins, but technically, they are extensions working under the post processing script)

Edited by randyinla
  • Link to post
    Share on other sites
    Posted (edited) · ChangeAtZ: at which layer or height exactly ?
    1 hour ago, gr5 said:

    The error might actually be in the GUI and not the plugin (the gui might refer to the bottom layer as layer 1 might that might be considered a bug).

     

     

    I wouldn't say the gui has a defect.  End users want to see the first  of something labeled as "1" not "0".  The code has to start at 0 due to the way Arrays are 0-based in the programming language.  The defect is that the plugin must subtract 1 from the number entered so it can insert the change into the correct layer in the code.  It's a common thing that has to be done on almost every interface to anything.

    Edited by randyinla
  • 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
    • Our picks

      • Ultimaker Transformation Summit

        On April 20 - April 23 we will host the Ultimaker Transformation Summit. Come talk to us via Live chat and get inspired by any of our relevant presentations!
        • 5 replies
      • New here? Register your Ultimaker for free 3D printer 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
        • 0 replies
    ×
    ×
    • Create New...