Jump to content

How to get the generated g-code file while designing plugin


starlee0514
Go to solution Solved by GregValiant,

Recommended Posts

Posted · How to get the generated g-code file while designing plugin

I've just write a python script that can modify g-code file and add functional text. To simplify the whole workflow, I'd want to turn it into a cura plugin and modify the generated g-code file at instance. Is there any resource to learn? THX

  • Link to post
    Share on other sites

    Posted · How to get the generated g-code file while designing plugin

    There are "Plugins" that are integrated into Cura and can affect the slicing and/or what goes on in the front end.  "Mesh Tools" would be an example of one of those.  They are generally available in the MarketPlace and need to be installed.

     

    There are "Post Processors" that are simpler scripts that alter the gcode after slicing.  They are selected from "Extensions | Post Processing | Modify Gcode" menu on an "as needed" basis.  PauseAtHeight.py would be an example of one of those.

     

    I guess the question becomes; at what point in the process would you need your changes to be made?

  • Link to post
    Share on other sites

    Posted (edited) · How to get the generated g-code file while designing plugin

    Thanks for your reply, the script function is to add M118 command after every ";LAYER:" command. Since the command context would be different due to different layer, the add g-code at every layer isn't suitable.

    Edited by starlee0514
  • Link to post
    Share on other sites

    • Solution
    Posted · How to get the generated g-code file while designing plugin

    "Display Info on LCD" will be included in the next release of Cura.  Adding the M118 line as:

    ;LAYER:0
    M106 S0
    M117 1/37 | ET 2h 6m
    M118 1/37 | ET 2h 6m

    Is one of the things it will do.

     

    Unzip the file and place the "DisplayInfoOnLCD.py" file into your Configuration Folder and the "scripts" sub-folder.  It will be available with the other post processors.

     

    DisplayInfoOnLCD.zip

    • Like 1
    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 Cura 5.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...