The cura engine can transform stl models to G-code. Thats the main function of it all
Depending on the branch that you use, the model is either excepted through pipes, or via a (local) socket. It will use those to return any G-Code it computes. The socket or pipe is also used to recieve settings.
The engine does not transfer anything to the device. That is the task of the GUI. The engine only accepts models & settings and only returns a set of g-codes.
All the documentation out there is on the github page or inside Daid's head (and a tiny bit in mine, as it's not my project).
Your best bet would be to hack into the Cura python code, rip out the graphical stuff and use that to call the engine with the settings & model(s). Cura (Python part) can then send it to the printer.
Dear Nallath,
thanks for your reply, actually after creating this topic ,I start examining the cureEngine and found out that it will only fulfill my first need (Gcode) !
then I saw in a video(ultimaker-evening video) ,that david said the Cura estimation is not precise he said and I quote "this guess can be off by 20% ",So I write a program that reads a Gcode (that CuraEngine creates) and return some useful parameter such as
- exact head movement during the print
- total layers of the object
- 2d plots of head movement in each layer
here is a sample of head movement, it's the first layer of "3D Printable Wrench "
to calculate the price ,I need total time as well, but I have some problem calculating the time :
for example consider these two lines of a Gcode :
G1 F6000 X30.31 Y106.31 E2303.94952
G0 F9000 X30.87 Y106.31
the Gcode says(correct me if I'm wrong) : from point (30.31,106.31) rapidly moves to (30.87,106.31) with the speed of 9000mm per minute, SO
I calculate the Euclidean distance by :
distance=sqrt(((PointA(1)-PointB(1)))^2+((PointA(2)-PointB(2))^2));
which is 0.5600mm for this example ,
for calculating the time I have
this_move_time=this_move_distance/9000;
that gives me 6.2222e-05 min
I do this for all head movement but it seems that it's wrong!
for the previous mentioned model Cura give me 2hours/12 minutes
my code return 1hour/26 minutes
I would really appreciate your feedback and any comments on this subject
Recommended Posts
nallath 1,124
The cura engine can transform stl models to G-code. Thats the main function of it all
Depending on the branch that you use, the model is either excepted through pipes, or via a (local) socket. It will use those to return any G-Code it computes. The socket or pipe is also used to recieve settings.
The engine does not transfer anything to the device. That is the task of the GUI. The engine only accepts models & settings and only returns a set of g-codes.
All the documentation out there is on the github page or inside Daid's head (and a tiny bit in mine, as it's not my project).
Your best bet would be to hack into the Cura python code, rip out the graphical stuff and use that to call the engine with the settings & model(s). Cura (Python part) can then send it to the printer.
Link to post
Share on other sites