Jump to content
Erik_Es

ChangeAtZ: at which layer or height exactly ?

Recommended Posts

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

In the ChangeAtZ plugin you enter the height at which you want the change to happen, either by height or by layer number.

For a test print (I'm new to Cura 3, have been using 14.7 for years now...) I set the plugin to start the fan at layer 8 (so no fan for the first 7 layers). However, the fan then starts AFTER printing 8 layers, so at the start of the 9th layer.

This seems wrong, unless perhaps the layer numbers are the same as in the gcode, where the first layer (layer 1 in my book) is actually called layer 0.

 

To avoid this numbering confusion, it is perhaps better to use height instead of layer number. But that is also a bit confusing. For instance, let's say I want to print a bottom of 1 mm thickness without fan, then start the fan the moment it starts printing the next layer above that, which would be at height 1,2 mm (using layer height 0.2 mm). Which value for height should I then enter in the plugin ?

 

And do I have to take into account that the first layer is thicker ? So if initial layer is 0.3 mm and layer height is 0.2 mm, should I enter 1,3 mm in the plugin if I want to start the fan immediately after printing a "1 mm" bottom (which is actually 1,1 mm because of the thicker first layer) ?

(I have found (with Cura 14.7) that you don't have to account for this extra thickness (unless using layer height < 0.1 mm), because the action set in the plugin will happen in the first layer that reaches the set height OR goes a bit PAST the set height. But I am curious to know if it works like that in Cura 3.6 as well.)

 

So to condense this in 3 simple questions:

 

- does the plugin change the value at the start or at the end of the set layer number or height ?

- in the plugin, is the first layer called layer 1 or layer 0 ?

- when using height instead of layer number, do I have to adjust the value for the extra thickness in the first layer ?

 

 

 

 

 

Edited by Erik_Es
  • Like 1

Share this post


Link to post
Share on other sites
Posted · ChangeAtZ: at which layer or height exactly ?

So this is a "post processing" plugin which means it looks at the same gcode file you can see with any text editor.  In a cura output are comments that you can read.  Here is a sample at the start of the second layer.  Lines that start with semicolon look at first.  Go ahead, do that now.  Notice that it says "layer:1" but this is the second layer.  Much higher up it says "layer:0".  Notice the 3rd line from the bottom ends with "Z0.47".  0.47 is first layer (.27) plus second layer thickness (.2) which are defaults.  If you search only for the letter Z in a gcode file you will quickly find just the layer changes (unless zhop is turned on).

 

So the plugin is much dumber than a person  - it looks for key words below: "layer" or "z" and extracts the number after that.  I believe it will insert commands after the line with the Z in it.  So answers:

1) start

2) 0

3) Yes - note that it will be greater than or equal to the threshold you set

 

If ZHOP is turned on it *might* fool the plugin.  Or the plugin hopefully is smart enough to search only for the first Z after a LAYER comment.

 

It's confusing!  I know!  Sorry!  I didn't write it.  But gcode is really simple once you play with it a few times and the author of the plugin kind of assumes you know a little gcode I guess?  I don't know.  Bad excuse.  Anyway the author kept the code as simple as possible so they just fine "layer" or "Z" look at the number and then insert the desired gcode.  the M106 is fan, M140 is bed temp.  F is speed in mm/minute.  G0 and G1 are both move commands.  E is extruder position.

 

G1 F1200 X109.105 Y115.638 E48.83473
G0 F7500 X125.44 Y116.44
G0 X125.675 Y116.675
;TIME_ELAPSED:91.942808
;LAYER:1
M140 S60
M106 S85
G0 F11250 X125.675 Y116.675 Z0.47
;TYPE:WALL-INNER
G1 F1560 X107.325 Y116.675 E49.15114
G1 X107.325 Y98.325 E49.46755

 

Share this post


Link to post
Share on other sites
Posted (edited) · ChangeAtZ: at which layer or height exactly ?

OK thanks gr5. I was expecting it to be like that. So I will use layer number (which is much easier in most cases) and keep in mind to subtract 1 from the layer shown in the layer view.

 

Thought it would be good to get this clear, as it will be helpful as well to other people using this plugin and not getting why changes happen one layer later than expected.

 

BTW: I understand gcode reasonably well, but I try to avoid fiddling around in it myself. I'm quite wary of introducing errors that might cause damage to my printers...

 

If you would be so kind to check another topic I started, called "plugins not saved", that would be most helpful. Although I like 3.6 very much so far, it seems such a pity that these useful plugins can not be saved/loaded as part of the profile anymore. Hopefully this can be put right in Cura 4 ?

Edited by Erik_Es

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Our picks

    • Ultimaker Cura 4.0 | Stable available!
      Ultimaker Cura 4.0 is mainly focused on the improved user interface and cloud integration.
      As always, we want to collect your user feedback for this release. If there are any improvements you can think of, feel free to mention it here and help us to shape the next release.
      • 98 replies
×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!