Jump to content

Recommended Posts

Posted · Export all setting parameters for default profiles

When i export predefined printer profile like normal or extra fine, values that are not changed won't be written in the files inside .curaprofile. I'm using CuraEngine and I read setting values and pass them to slicing command. There is "quality_type" parameter but from my understanding, CuraEngine will read default values in fdmprinter.def.json no matter of passed quality. Is there any plugin or workaround that allows me to export all setting parameters in file that I can read and then pass to CuraEngine in a command? 
Thanks

  • Link to post
    Share on other sites

    Posted · Export all setting parameters for default profiles

    @ahoeben might know the answer.  It sounds like you are using linux?

     

    I think there is a whole chain of *.def.json files - kind of like "include" statements in C.  You could write some code to do it but not sure if there is a way in cura to do it.

    • Like 1
    Link to post
    Share on other sites

    Posted · Export all setting parameters for default profiles
    2 hours ago, amrahabibovic said:

    Is there any plugin or workaround that allows me to export all setting parameters in file that I can read and then pass to CuraEngine in a command? 

    Short answer: no, there is not.

     

    Longer answer: it is complicated, especially because settings can have global values, values per extruder, values per model, settings per group of models, etc.

     

    You could have a look how https://github.com/5axes/CuraSettingsWriter collects the setting values.

     

    • Like 2
    Link to post
    Share on other sites

    Posted (edited) · Export all setting parameters for default profiles
    On 12/21/2020 at 3:09 PM, ahoeben said:

    Short answer: no, there is not.

     

    Longer answer: it is complicated, especially because settings can have global values, values per extruder, values per model, settings per group of models, etc.

     

    You could have a look how https://github.com/5axes/CuraSettingsWriter collects the setting values.

     

    Thanks for the answer.


    What about the other way around? Is there a way to find quality profile by the name and read its settings? I've read Cura and CuraEngine docs and looked at the resources (https://github.com/Ultimaker/Cura/tree/master/resources/quality) but I'm not sure how to pair printer with its corresponding quality profile. 

    Is there a script or doc I can have a look at? My idea is to make my own quality files with all parameters I will pass to CuraEngine so I need to know which printer uses which cfg file in resources.
     

    Edited by amrahabibovic
    typos
  • Link to post
    Share on other sites

    Posted · Export all setting parameters for default profiles

    Curious about this too. Seems @SamGoldFisher in

    has a possibly reliable way.

     

    As I'm still learning about the UM2+ Connect and still trying to ssh to it, I still don't have a straightforward to directly feed it gcode but I'm also curious about the most efficient and reliable way to go from Cura settings to CuraEngine for automation via CLI or programming APIs.

    • Like 1
    Link to post
    Share on other sites

    Posted · Export all setting parameters for default profiles
    On 12/31/2020 at 1:48 PM, utopiah said:

    still don't have a straightforward to directly feed it gcode

    Yeah the "connect" is kind of bare bones.  All the other Ultimaker printers let you feed them bare gcodes (UM2 series, UM2plus series, Um3, S3, S5), but not the UM2+ connect.

    • Like 1
    Link to post
    Share on other sites

    Posted · Export all setting parameters for default profiles
    On 12/31/2020 at 7:48 PM, utopiah said:

    Curious about this too. Seems @SamGoldFisher in

    has a possibly reliable way.

     

    As I'm still learning about the UM2+ Connect and still trying to ssh to it, I still don't have a straightforward to directly feed it gcode but I'm also curious about the most efficient and reliable way to go from Cura settings to CuraEngine for automation via CLI or programming APIs.

     

    My current workaround is by using HTML plugin:
    https://marketplace.ultimaker.com/app/cura/plugins/5axes/HTMLCuraSettings

    I export all settings to HTML file then read it in my Python program and pass settings to CuraEngine. I'm still testing this and one of the things that still has to be resolved is material profile. I need diameter and density to calculate material weight and also I need to check material compatibility with printer.

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · Export all setting parameters for default profiles
    On 1/5/2021 at 9:51 AM, amrahabibovic said:

     

    My current workaround is by using HTML plugin:
    https://marketplace.ultimaker.com/app/cura/plugins/5axes/HTMLCuraSettings

    I export all settings to HTML file then read it in my Python program and pass settings to CuraEngine. I'm still testing this and one of the things that still has to be resolved is material profile. I need diameter and density to calculate material weight and also I need to check material compatibility with printer.

    Hi @amrahabibovic,

     

    I struggled a lot on this and maybe together we can find something out 😉

    Thanks @utopiah to ping me on this.

     

    Here are some questions for you, and if I understand your problem I can provide a guideline to help you on this:

    1) Do you want to slice a part with the parameters you have in Cura (the GUI), but you would like to do it with a command line?

    2) Do you want to slice only one part at a time?

    3) Would you like to orientate them in order to have a part well orientate and reduce the printing time?

    If the answer to those 3 questions are yes. Then I can provide a clear solution for you. If not, there is a subtlety I didn't understood.

     

    I don't get your trouble with "material profile". To be honest the only thing that you are interrested in is the temperature of your printhead, your bed, and eventually your chamber (with one or two more things but keep things simple). All those parameters can be given by command line using '-s <parameters_name>=<value>' as stated in the documentation.

     

    Let me know if you want to work on this. It is possible to get all the parameters from the cura log when you slice, then to write them into a .def.json definition, then to slice automatically while giving the best orienation for you part using the amazing Tweaker tool from Christoph Schranz.

     

    Let me know,

     

    Edited by SamGoldFisher
    • Like 1
    Link to post
    Share on other sites

    • 2 weeks later...
    Posted · Export all setting parameters for default profiles
    On 1/11/2021 at 3:47 PM, SamGoldFisher said:

    Hi @amrahabibovic,

     

    I struggled a lot on this and maybe together we can find something out 😉

    Thanks @utopiah to ping me on this.

     

    Here are some questions for you, and if I understand your problem I can provide a guideline to help you on this:

    1) Do you want to slice a part with the parameters you have in Cura (the GUI), but you would like to do it with a command line?

    2) Do you want to slice only one part at a time?

    3) Would you like to orientate them in order to have a part well orientate and reduce the printing time?

    If the answer to those 3 questions are yes. Then I can provide a clear solution for you. If not, there is a subtlety I didn't understood.

     

    I don't get your trouble with "material profile". To be honest the only thing that you are interrested in is the temperature of your printhead, your bed, and eventually your chamber (with one or two more things but keep things simple). All those parameters can be given by command line using '-s <parameters_name>=<value>' as stated in the documentation.

     

    Let me know if you want to work on this. It is possible to get all the parameters from the cura log when you slice, then to write them into a .def.json definition, then to slice automatically while giving the best orienation for you part using the amazing Tweaker tool from Christoph Schranz.

     

    Let me know,

     


    Hey thanks for the response :)


    I'm working on the API that'll receive all required settings for slicing. There's Python program and CuraEngine running in the background. 

    The answer is yes to all of those questions if I understand correctly :) I will be using Cura GUI for exporting settings, but not for selected individual model.


    I'm using formula (pi * (radius)^2 * extruded length * density)  for calculating material weight. The diameter is exported in html file as well so that's sorted out. The only parameter missing is material density.

    I'll look into Tweaker tool as well and see if I could use it for my problem.

     

    I don't know if I overlooked something, so let me know. Any help would be appreciated!

     

  • Link to post
    Share on other sites

    Posted (edited) · Export all setting parameters for default profiles
    On 1/19/2021 at 4:18 PM, amrahabibovic said:


    Hey thanks for the response 🙂


    I'm working on the API that'll receive all required settings for slicing. There's Python program and CuraEngine running in the background. 

    The answer is yes to all of those questions if I understand correctly 🙂I will be using Cura GUI for exporting settings, but not for selected individual model.


    I'm using formula (pi * (radius)^2 * extruded length * density)  for calculating material weight. The diameter is exported in html file as well so that's sorted out. The only parameter missing is material density.

    I'll look into Tweaker tool as well and see if I could use it for my problem.

     

    I don't know if I overlooked something, so let me know. Any help would be appreciated!

     

    Is the calculation is made regarding the extruded length available in the .gcode file?

    For the density, I advise you to choose 1.24g/cm3 which is 1.24 x 10-3 g/mm3

    To make it even more easy (you probably already did that), you can sse it this way:

    m = V * rho

    equivalent to

    m = S * l * rho = l * K

     

    m, being the mass (in grams)

    V, being the volum (in mm3)

    l, being the length of the filament (in mm)

    rho, being the density (in g/mm3)

    K, being the linear mass of your filament (in g/mm)

     

    Then you have:

    K = (pi * d^2 /4) * rho

    because: pi is pi, d=1.75 (or 2.85), rho=1.24 x 10-3 g/mm3^, you deduce:

    K = 0.0029825495255018097 g/mm

    More or less equivalent to:

    K = 2982 x 10-6 g/mm

     

    This way it's easy to just recover the length of the filament and multiply it by K to have the weight in kilograms.

     

    Don't hesitate if you have a problem with whichs package to use with python. Don't hesitate to highlight if something above is not understandable (or wrong!)

     

    Let us know 😉

     

    Edited by SamGoldFisher
    False mathematical expressions in the expression of the volumic mass in g/mm^3
  • 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.9 stable released!
        Here comes Cura 5.9 and in this stable release we have lots of material and printer profiles for UltiMaker printers, including the newly released Sketch Sprint. Additionally, scarf seams have been introduced alongside even more print settings and improvements.  Check out the rest of this article to find out the details on all of that and more
          • Like
        • 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
          • Heart
          • Thanks
          • Like
        • 4 replies
    ×
    ×
    • Create New...