Jump to content

VictorMic

Member
  • Posts

    7
  • Joined

  • Last visited

Personal Information

  • 3D printer
    Ultimaker S5

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

VictorMic's Achievements

0

Reputation

  1. So the goal of my company is to create a new way to create industrial metal pieces by using 3d printing firstly to create the piece in plastic and with this plastic piece create a mold in which aluminium is poured and melt the plastic (so we need a 3d printing with the lowest density, so all the plastic will be burn by the aluminium. I am currently creating a post processing python script for Cura, of which the goal is to increment the E value of the gcode to compensate for the loss of materials, that occur when the extruder of the 3d printer is moving without printing. We need to compensate these loss because otherwise it create holes in the printing. But the size of the pieces are great (millions of gcodes lines), so to be able to modify the gcode in a correct amount of time I used the Multiprocessing of python. I had to work on windows so to use multiprocessing i need to have this line : if __name__ == '__main__': # MultiProcessing with Pool() as p: resultat = p.map(traitement_gcode_lineaire,liste_traitement) if len(resultat)!=0 : for result in resultat : fichier += result When launch by myself (like in VS code) without Cura all is good. But the issue here is that it can't enter the loop because __name__ will never be equal to '__main__', but it always equal to : 'PostProcessingPlugin.PostProcessingPlugin.ModificationGcodeMultiProcessing' where 'ModificationGcodeMultiProcessing' is the name of my postprocessing script and i never found any other script that was using multiprocessing so i was wandering if anybody has any clue for me. I don t have any error message but at the end 'Fichier' (which should contain the gcode that i modify) is empty. I attach my code. But the issue is located in the function improve_extrusion (the other work perfectly) ModificationGcodeMultiProcessing.zip
  2. wrong link : https://community.ultimaker.com/topic/44004-multithreading-and-multi-processing-for-python-script-in-cura/
  3. Thank you for the answer, i didn t before sending my fisrt message that this thread was dead since 7 years, but pls don t be condescending : _"The "# Multiprocessing" is just a comment and does nothing" i write for you just to be sure. yes i know how to comment on python don t worry _"if the script is run outside of Cura. That is what that line "if __name__ == '__main__':" does." I know that like i mentionned but the problem is that on windows i didn't fin any means to do without this "if", because your changement will just create an infinite loop _"Note that I changed the indentation of those two lines. This is important in Python" No i didn t know ! _i have already create another topic : https://community.ultimaker.com/topic/40911-post-processing-script-logs/
  4. hello, Thank you for your answer. So the goal of my company is to create a new way to create industrial metal pieces by using 3d printing firstly to create the piece in plastic and with this plastic piece create a mold in which aluminium is poured and melt the plastic (so we need a 3d printing with the lowest density, so all the plastic will be burn by the aluminium. I am currently creating a post processing python script for Cura, of which the goal is to increment the E value of the gcode to compensate for the loss of materials, that occur when the extruder of the 3d printer is moving without printing. We need to compensate these loss because otherwise it create holes in the printing. But the size of the pieces are great (millions of gcodes lines), so to be able to modify the gcode in a correct amount of time I used the Multiprocessing of python. I had to work on windows so to use multiprocessing i need to have this line : if __name__ == '__main__': # MultiProcessing with Pool() as p: resultat = p.map(traitement_gcode_lineaire,liste_traitement) if len(resultat)!=0 : for result in resultat : fichier += result When launch by myself (like in VS code) without Cura all is good. But the issue here is that it can't enter the loop because __name__ will never be equal to '__main__', but it always equal to : 'PostProcessingPlugin.PostProcessingPlugin.ModificationGcodeMultiProcessing' where 'ModificationGcodeMultiProcessing' is the name of my postprocessing script and i never found any other script that was using multiprocessing so i was wandering if anybody has any clue for me. "Do you get specific error messages" I don t have any error message but at the end 'Fichier' (which should contain the gcode that i modify) is empty. I attach my code. But the issue is located in the function improve_extrusion (the other work perfectly) ModificationGcodeMultiProcessing.zip
  5. Have been able to do multi threading in a post procesing script in Cura ? I try myself and it always won't work
  6. Hello, I am currently developing a python script to increase E value directly in the Gcode, so I have to work on millions of lines. So i decide to add multiprocessing or multithreading to improve the time of execution. When I launch my program without multiprocessing on cura all is working, but i can't do multiprocessing/multithreading on Cura, it always return me empty list. Have you any advise ?
×
×
  • Create New...