What is the link with using command line?
How is this related to running a script to slice different files one after another?
What is the link with using command line?
How is this related to running a script to slice different files one after another?
Perhaps I have misunderstood what you mean. Are you able to explain in more detail how and why you'd like to do it this way?
1 hour ago, SamGoldFisher said:Is is possible to do that:
open a file, center it, orienting the .stl and save it bakc to an .stl file?
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.
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.
Edited by SamGoldFisher1 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?
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....
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 😉
Thanks for the gif, good to know that it works.
BTW nice and funny avatar 😃
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:
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 😉
The Mesh Rotation Matrix will let you rotate the mesh. What more do you need?
Hello,
I'm absolutly not sure of that but using -s option ? like :
-s mesh_rotation_matrix="[[1,0,0], [0,1,0], [0,0,1]]"
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?
5 minutes ago, SamGoldFisher said:I feel a bit of agressivity in your message, am I wrong?
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.
Edited by ahoeben2 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 😉 ).
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
Recommended Posts
Guest maht
Sounds like a 3mf project file would achieve this.
Link to post
Share on other sites