Jump to content

Cura Bug: Layer Numbering


Go to solution Solved by Slashee_the_Cow,

Recommended Posts

Posted · Cura Bug: Layer Numbering

Okay, so it's not critical, but I was viewing a Cura-generated .gcode file with the intention of editing it manually*, and I couldn't make the number of layers add up.

 

According to the preview, the slider on the right went from layer 1 to layer 13.

 

When I looked in the gcode, the ";LAYER:" comment lines went from -5 through 0 to 8.  That's 14 layers.  I couldn't figure out what was going on for a while.

 

Then I discovered there was no ";LAYER: -1"!  It goes -5, -4, -3, -2, 0, 1, 2...!!

 

So, what is the intention of this layer numbering?  Why not keep it the same as the layer numbers when previewing?  I can see the negative numbered layers might be intended to represent the raft or other support, but is 0 the first actual layer or is 1?

 

I know, you're going to ask which version of Cura, but I don't have that info accessible right now.  It's not the recent release, it's whatever was current back in June.

 

* Why would I want to edit gcode?  FreeCAD won't pad disconnected parts of a sketch without them being on some kind of support, because they produce disconnected solids.  The easiest way forward was to put them on a plinth and then delete the plinth from the gcode.

  • Link to post
    Share on other sites

    • Solution
    Posted · Cura Bug: Layer Numbering
    1 hour ago, CrazyIvan2 said:

    So, what is the intention of this layer numbering?  Why not keep it the same as the layer numbers when previewing?  I can see the negative numbered layers might be intended to represent the raft or other support, but is 0 the first actual layer or is 1?

    0 is the first layer. There is no -1 because it leaves an air gap between the raft and your model so that you can easily remove the raft.

     

    1 hour ago, CrazyIvan2 said:

    * Why would I want to edit gcode?  FreeCAD won't pad disconnected parts of a sketch without them being on some kind of support, because they produce disconnected solids.  The easiest way forward was to put them on a plinth and then delete the plinth from the gcode.

    Yeah, I %$&^ing hate the single body rule. You can extrude a sketch from the Part workbench, then go to the Draft workbench, downgrade your body (in my case it downgraded into a bunch of faces) and maybe the extruded sketch you just made (you'd have to try it), go back to Part workbench, select all the things, and create a union of them.

     

    Or you could just extrude your other sketch using the Part workbench and export the body and that part separately then just bring them both into Cura.

     

    Also, unless it only takes up like, a single layer, removing an object from the g-code is incredibly hard, especially if it's been combined with other parts in the slicing process.

  • Link to post
    Share on other sites

    Posted · Cura Bug: Layer Numbering
    19 hours ago, Slashee_the_Cow said:

    Also, unless it only takes up like, a single layer, removing an object from the g-code is incredibly hard, especially if it's been combined with other parts in the slicing process.

    Not that hard, once I had identified the relevant layers, because I specifically arranged the supporting plinth to be in layers which were dedicated to the plinth only.

     

    I now realise what I should/could have done is leave the plinth in the print and inset an air gap layer between (although consideration would need to be applied to the slicer settings so that there was actually solid print below and above the post-slicer insertion of the air gap).  The air gap could (maybe?) be achieved simply by modifying the z movement at the start of the layer.

  • Link to post
    Share on other sites

    Posted · Cura Bug: Layer Numbering

    ...however I've just realised there is a problem with absolute z coordinates.

     

    I (accidentally) worked around that, because I orientated my model in Cura with the plinth at the top, so I only had to delete the final layers.  It turns out that was a good choice!

     

    Nonetheless, I see no reason z coordinates could not be dealt with using global edits.

  • Link to post
    Share on other sites

    Posted · Cura Bug: Layer Numbering
    34 minutes ago, CrazyIvan2 said:

    Nonetheless, I see no reason z coordinates could not be dealt with using global edits.

    I'll definitely concede that one. When you're getting rid of entire layers, yes, that's easy, and there's no particularly good reasons I know of not to do it manually (although if it was me, even if I was only going to do it once, I'd probably write a post processor to do it for me, because I'm sure it'll save me time - or more to the point, I'm just that kind of weird).

    It's just removing an object which isn't the only thing on its layer is difficult, even if it's isolated from everything else, because you still need to figure out its coordinates relative to the bed and remove any moves in/to that area without breaking something else in the process.

  • Link to post
    Share on other sites

    Posted · Cura Bug: Layer Numbering
    28 minutes ago, Slashee_the_Cow said:

    I'd probably write a post processor to do it for me

     

    I grew up with BASIC and procedural languages.  Writing add-ons to existing software (such as an extension for Cura) is a step too far for me.  My idea of a "post-processor" is an edit script or perhaps something in AWK... or even a spreadsheet.

     

    32 minutes ago, Slashee_the_Cow said:

    I'm sure it'll save me time

     

    I sure recognise that one!

  • 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

      • Help Us Improve Cura – Join the Ultimaker Research Program
        🚀 Help Shape the Future of Cura and Digital Factory – Join Our Power User Research Program!
        We’re looking for active users of Cura and Digital Factory — across professional and educational use cases — to help us improve the next generation of our tools.
        Our Power User Research Program kicks off with a quick 15-minute interview to learn about your setup and workflows. If selected, you’ll be invited into a small group of users who get early access to features and help us shape the future of 3D printing software.

        🧪 What to Expect:
        A short 15-minute kickoff interview to help us get to know you If selected, bi-monthly research sessions (15–30 minutes) where we’ll test features, review workflows, or gather feedback Occasional invites to try out early prototypes or vote on upcoming improvements
        🎁 What You’ll Get:
         
        Selected participants receive a free 1-year Studio or Classroom license Early access to new features and tools A direct voice in what we build next
        👉 Interested? Please fill out this quick form
        Your feedback helps us make Cura Cloud more powerful, more intuitive, and more aligned with how you actually print and manage your workflow.
        Thanks for being part of the community,

        — The Ultimaker Software Team
        • 0 replies
      • Cura 5.10 stable released!
        The full stable release of Cura 5.10 has arrived, and it brings support for the new Ultimaker S8, as well as new materials and profiles for previously supported UltiMaker printers. Additionally, you can now control your models in Cura using a 3D SpaceMouse and more!
          • Like
        • 18 replies
    ×
    ×
    • Create New...