Jump to content

SamGoldFisher

Member
  • Posts

    12
  • Joined

  • Last visited

Posts posted by SamGoldFisher

  1. 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 😉

     

  2. 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,

     

    • Like 1
  3. Hi, I know it has been a while but I add a similar problem and also a solution:

     

    I tried it the same way as you: providing a json file,the stl and feeding all the parameters in a text. file.

    All the parameters were recovered from a .log file recovered from the log file after a slice with the machine on a file. The thing is I always add something wrong with the parameters at some points and it's hard to debug and understand which fails and why when there is more than 400 parameters.

     

    So I tried another way: feeding the parameters directly in the fdmprinter.def.json

     

    This is a json file! : Get your profile from the log into a dictionnary, parkour your fdmprinter.def.json and change the default value by the one you got from the log.

     

    Thanks to that, the only trouble remaning when you do:

    curaengine slice -j output.def.json -l cube.stl -o output.gcode

    is that you get the error:

    [ERROR] Trying to retrieve setting with no value given: 'machine_extruder_cooling_fan_number'

     

    But you can solve the problem by doing:

    curaengine slice -j output.def.json -s machine_extruder_cooling_fan_number="0" -l cube.stl -o output.gcode

     

    Also the problem may come from I am a beginner at programming but at the end it works ^^.

     

     

    • Like 1
    • Thanks 1
  4. Hi everyone, 

     

    It has been a while but here is the solution I was looking for:

    -the guy that did the auto orientation plugin is Christoph Schranz and the name of the tool is Tweaker 3 (available here). Christoph's tool can be run into command line like this one:

    Tweaker.py -i my_stl.stl -vb

     

    The result of this command line will be an oriented stl file with the suffixe "_tweaked"

    It works like a charm 😉

     

    Enjoy his amazing work if you need it

     

     

    • Thanks 1
  5. 2 minutes ago, ahoeben said:

      

     

    At the risk of sounding agressive: YOU ARE WRONG!

    Euh, no agressivity intended.

     

    Sorry, your GIF is very small (in this forum), and skips over what you do in Cura very quickly.

    It looks like you are using this plugin: https://marketplace.ultimaker.com/app/cura/plugins/nallath/OrientationPlugin

     

    Plugins like this run in Cura, not in CuraEngine. You could look at the source of the plugin and extract what you need to create a rotation matrix to feed into CuraEngine.

     

    Actually the gif was a good try but a bad idea: next time I will give the link to a not referenced video on youtube which will make think simpler.

     

    Extract the matrix from the plugin could be a good idea (thanks 😉 ).

  6. 12 minutes ago, ahoeben said:

    The Mesh Rotation Matrix will let you rotate the mesh. What more do you need?

    Hello,

     

    @ahoeben, I feel a bit of agressivity in your message, am I wrong?

     

    And how does that help if you don't the rotation you need to apply: every geometry is different, the advantages of the auto-orientation plug in is to have a good orientation to 3D print the model. Is it more clear?

     

  7. 21 hours ago, Smithy said:

     

    In my opinion this is not possible. The STL file itself just describes your model, ok with orientation but not where it is placed on the build plate. The definition if it is centered or not is done by Cura during slicing and "saved" in the gcode. So there is no way to save it back to the STL, also not in Cura itself. You can save it as 3mf or gcode, but not as STL with the information you want.

     

    Maybe I am wrong and there is a solution, but I don't think so.

     

    Hello,

     

    I add another look about using cura in command line.

    Cura can be executed with command line with the following syntax (as example):

    curaengine slice -j my_printer.def.json -o test.gcode -l cube_v3.stl

     

    here:

    • my_printer.def.json:    is the definition of the printer. It does use another file: my_extruder.def.json which is the definition of the extruder
    • test.gcode:    it's the output of the slicing
    • cube_v3.stl:    it's the file to be sliced

    What I do remark, it's that at the end of the definition file of the 3D printer, there is a section about centering the part (in the attached file). The first try didn't ended well but it will be the subject of another topic.

     

    It doesn't solve the orientation problem but it might solve the positionning problem using only command line ;-). I will go a bit further in this direction.

     

    For the orientation problem. It might be easier to execute a script in a CAD software rather than in Cura, and then use the oriented stl to do the slicing...

     

    If someone have informations that I don't have or any idea it will be more than welcome 😉

     

     

     

    Capture.PNG

  8. 35 minutes ago, Smithy said:

    Ok, I was not aware that this is possible to save it back to STL.

    Keep in mind that Cura as application is more than the command line tool. So the Cura GUI uses the engine (cmd tool) to slice the file. So the question is which part is responsible to place the part on the center of the bed. The GUI or the engine. If it is the GUI or a plugin, then this functionality is not available in the command line tool.

     

    But I am just guessing, maybe I am wrong....

    Actually what you say make perfect sense.

    I think that if it work the way you say, I would have to create a tool within the GUI to run the known function (center and optimize the orientation and export).

     

    PS: I did illustrate the previous talk about exporting back into a stl and the auto-orientation plugin into this little gif 😉

    Hnet-image.gif

  9. 1 hour ago, Smithy said:

     

    In my opinion this is not possible. The STL file itself just describes your model, ok with orientation but not where it is placed on the build plate. The definition if it is centered or not is done by Cura during slicing and "saved" in the gcode. So there is no way to save it back to the STL, also not in Cura itself. You can save it as 3mf or gcode, but not as STL with the information you want.

     

    Maybe I am wrong and there is a solution, but I don't think so.

     

    Hello @Smithy,

    Actually when you open a file in Cura, it does take the stl file and center it in the middle of the bed. From that I assume it as this capability.

    For the orientation, the plug in auto-orientation can also work automatically when you import an stl file. 

    Once done, you can save your positionned and oriented stl back to an stl. 

     

    You can try it with a simple cube that is firstly not oriented with Automatic orientation activated. You will see it getting a good orientation. Then you can save it back as an stl.

     

    So now that we know we can do it, is it possible to make it using command line?

  10. Of course @maht:

    -let say you have lots of 3D printer and lots of parts to print. All your printer have ejection system so each 3D printer can print continuously one part after another.

    In order to print all your parts, you need to know which parts need to be print with which machine.

    In order to do that, you need to slice all files and attribute them to a machine in order to be 3D printed.

    Then, every printer print is queue of parts in order to realize the whole production.

     

    I feel like I am not good at explaining. In the attached file I did an illustration that may help.

     

    To put it another way: you want to slice a bunch of parts, one at a time,  automatically and you want to use the front end of cura to realize the positionning and the automatic orientation of each parts. Can you do it in command line using Cura.

    intro.pdf

  11. Hello,

     

    I would like to automate the production of 3D printed part.

    Cura could be useful for few reasons: -when you open a file with cura, it automatically center and orient the part on the bed

     

    Here is the command I use:

    cura cube. stl

     

    But then I don't know and didn't find any resources to save this file back to a .stl, which will be positionned and ready to be sliced with a good position and orientation.

     

    Is is possible to do that:

    open a file, center it, orienting the .stl and save it bakc to an .stl file?

     

    I did have a look to few posts about command line using Cura (here for example) but I didn't found what I was looking for

     

    Let me know if you have any idea 😉

     

     

×
×
  • Create New...