UltiMaker uses functional, analytical and tracking cookies. Tracking cookies enhance your experience on our website and may also collect your personal data outside of Ultimaker websites. If you agree with the use of tracking cookies, click “I agree, continue browsing”. You can withdraw your consent at any time. If you do not consent with the use of tracking cookies, click “Refuse”. You can find more information about cookies on our Privacy and Cookie Policy page.
Multithreading and Multi processing for python script in Cura
Posted
· Multithreading and Multi processing for python script in Cura
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 :
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 :
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)
Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more.
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.
Recommended Posts
VictorMic 0
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 :
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 :
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
Link to post
Share on other sites