Jump to content

How to access printer settings from Cura post-processing plugin?


Sporech

Recommended Posts

Posted · How to access printer settings from Cura post-processing plugin?

Hi All,

 

There are a few properties of the printer setup and slicer settings which I need to access from my post-processing plugin, such as nozzle diameter, line width etc.

Can these be accessed from the post-processing script environment?

 

Many thanks

  • Link to post
    Share on other sites

    Posted · How to access printer settings from Cura post-processing plugin?
    24 minutes ago, Sporech said:

    Hi All,

     

    There are a few properties of the printer setup and slicer settings which I need to access from my post-processing plugin, such as nozzle diameter, line width etc.

    Can these be accessed from the post-processing script environment?

     

    Many thanks

    Yep. The strech post processing script does something like that https://github.com/Ultimaker/Cura/blob/master/plugins/PostProcessingPlugin/scripts/Stretch.py#L519

    There are probably more scripts that do it as well.

  • Link to post
    Share on other sites

    Posted · How to access printer settings from Cura post-processing plugin?

    I believe you can query all those settings from the Global Container Stack.  Here's some code I've used to get the layer height setting:

     

    from UM.Application import Application
    ...
    layerHeight = Application.getInstance().getGlobalContainerStack().getProperty("layer_height", "value")

     

    It looks like "line_width" and "machine_nozzle_size"should also be an available settings. 

     

    I'm not sure where to find a definite listing of the setting names, but I was able to find these by looking through this file here: https://github.com/Ultimaker/Cura/blob/master/resources/definitions/fdmprinter.def.json

     

    But, that was just sort of a wag.

     

    Good luck!

    • Like 1
    Link to post
    Share on other sites

    Posted · How to access printer settings from Cura post-processing plugin?
    1 hour ago, bradk3 said:

    I believe you can query all those settings from the Global Container Stack. 

    Layer height is a global setting, and can be queried from the global container stack; other settings, such as the line width, can be different per extruder, so you have to get them from the extruder stack.

     

     

    from cura.Settings.ExtruderManager import ExtruderManager
    ...
    extruders = ExtruderManager.getInstance().getActiveExtruderStacks()
    line_width= extruders[0].getProperty("line_width", "value")

     

     

    • Like 2
    Link to post
    Share on other sites

    • 1 year later...
    Posted · How to access printer settings from Cura post-processing plugin?

    @ahoeben

     

    Hi, how to query a user-defined setting?

     

            retraction_amount = Application.getInstance().getGlobalContainerStack().getProperty(
                "retraction_amount", "value"
            )

     

    The above code gives me the 'default' value, not the updated value, which I changed in Cura, and I was wondering how to access the InstanceStack (?), where user-defined settings are kept.

     

    Thanks in advance!

  • Link to post
    Share on other sites

    Posted · How to access printer settings from Cura post-processing plugin?

    Retraction amount is a per-extruder setting, and must be queried from the current extruder stack

     

     

    from cura.Settings.ExtruderManager import ExtruderManager
    ...
    extruders = ExtruderManager.getInstance().getActiveExtruderStacks()
    line_width= extruders[0].getProperty("retraction_amount", "value")
  • Link to post
    Share on other sites

    Posted · How to access printer settings from Cura post-processing plugin?

    Thanks a lot!🙂

  • 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

      • 🎄✨ Thingiverse Tree Ornament Challenge! ✨🎄
        We've been running a Tree Ornament Challenge with a chance to win an UltiMaker S3 or colorFabb filament.
        Design a 3D printable tree ornament and join our festive challenge on Thingiverse. 🎁✨


        📆 Submission Deadline: December 22
        🏷️Tag your designs with Holidays2023

        Click here to join and check out the over 300 other amazing designs

        How to Enter
        Design an Ornament
        Create a 3D printable tree ornament that captures the magic of the winter season. Think snowflakes, sleighs, reindeer, cozy mittens, or anything that embodies the joy of the holidays. Upload to Thingiverse
        Share your masterpiece on Thingiverse and add the tag Holidays2023. Don't forget to include a captivating description and images that showcase your design from different angles. Submit by December 22
        All entries must be submitted by December 22nd to be eligible for consideration.
          Entering a new design
         
        Entering an existing design
         
         
        Winning designs should:
        Be original Creations
        Your designs should be original works, avoiding the use of others' intellectual property without permission. Include STL Files
        Each submission must include at least one STL file for 3D printing. Showcase a Completed Print
        Provide at least one photograph featuring a completed print of your design. Include Documentation
        Share the creative journey! Include documentation of your design process, giving us a peek behind the scenes. For example, show a screenshot of the model in your design program. Use the Tag Holidays2023.
        Use this tag to ensure your entry is counted in the Tree Ornament Challenge. Be submitted after October 1st, 2023
        Ensure your design was uploaded to Thingiverse after October 1st, 2023. Adhere to Submission Guidelines and Terms of Service
        Make sure your submission aligns with our guidelines and Thingiverse's Terms of Service.  
        Good luck 🎉
        • 0 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
      • Ultimaker Cura 5.6 stable released
        Cura now supports Method series printers!
         
        A year after the merger of Ultimaker and MakerBotQQ, we have unlocked the ability for users of our Method series printers to slice files using UltiMaker Cura. As of this release, users can find profiles for our Method and Method XL printers, as well as material profiles for ABS-R, ABS-CF, and RapidRinse. Meaning it’s now possible to use either Cura or the existing cloud-slicing software CloudPrint when printing with these printers or materials
        • 11 replies
    ×
    ×
    • Create New...