Hi, I am wondering does anyone know how to calculate the E value (the amount of extrude from the start to the endpoint ) in the Prusa Slicer? I am trying to test the performance of my adaptive slicing (non-uniform layer height) f0r my research, but not sure how to adjust the G-code ( E ) of Prusa slicer based on my given length and height. Many thanks
I have tried to use the formula below, but it does not match the E of Prusa Slicer.
Hi, I am wondering does anyone know how to calculate the E value (the amount of extrude from the start to the endpoint ) in the Prusa Slicer? I am trying to test the performance of my adaptive slicing (non-uniform layer height) f0r my research, but not sure how to adjust the G-code ( E ) of Prusa slicer based on my given length and height. Many thanks
I have tried to use the formula below, but it does not match the E of Prusa Slicer.
if you want to know how Prusa calculates this in the slicer, you can browse the source code of the slicer:
https://github.com/prusa3d/PrusaSlicer/releases
I you want to calibrate the extruder, look here:
https://mattshub.com/blog/2017/04/19/extruder-calibration
@karl-herbert
Thank you very much.
I'm currently working at same page(Calculating E value in G-code from prusaslicer), but I couldn't find some functions in source files..
Also, I'm not expertise in coding.
The only thing I found was
The related functions and variables which is "m_E(to stack when it's absolute coordinate), dE", etc..
All functions are pointed each other, so that there is no direct calculation formula there..
On the other hand, I also looked a "Flow math" at slic3r. The calculation for my E value isn't correct
I have 2 questions for this.
First, E value calculation, What is wrong with my formula?
(This is some part of G-code from prusaslicer)
; external perimeters extrusion width = 0.45mm
; perimeters extrusion width = 0.45mm
; infill extrusion width = 0.45mm
; solid infill extrusion width = 0.45mm
; top infill extrusion width = 0.40mm
; first layer extrusion width = 0.70mm
(This is somewhere between top, bottom layer, just to avoid compensation for first, last layer)
G1 X115.996 Y179.003 E0.86610
G1 X115.996 Y160.225 E0.90316
G1 X118.961 Y154.015 E0.33096
G1 X120.077 Y151.147 E0.14800
G1 X120.766 Y148.109 E0.14984
G1 X120.996 Y145.038 E0.14811
G1 X120.996 Y64.964 E3.85132
G1 X120.766 Y61.893 E0.14811
G1 X120.077 Y58.855 E0.14983
G1 X118.961 Y55.985 E0.14809
form X120.996 Y145.038 to X120.996 Y64.964, (I made it bold)
extrusion at nozzle
from "Flow math" the width(w) : 0.45, layer height(h) : 0.3
cross section area from nozzle = h*h*0.25+w*(w-h) = 0.11568582
the extrusion length will be 80.074(=145.038-64.964).
total extrusion volume = 9.263426
At the same time, for filament
the 1.75*1.75*PI*0.25=2.4052813(cross section area for filament)
So my conclusion is to 9.263426/2.4052813 = 3.851286
It is not even close to 3.70389(=3.84993-0.14604)
It seems I'm missing something, for sure.
Second,
Some parts of G-code has same value of E or even minus or less then before, even they are still extruding
Is there any method that I'm missing..?
Giving any small hint would be thankful..
Thanks,
@sanglae-kim
a hint: https://manual.slic3r.org/advanced/flow-math
but you do not tell if Linear Advance if in use, that may affect too.
@misan
So, the E value that I calculated was not wrong!
I'll look for it right away
Thanks for the advice!!
Best regards,
(PS, for those who are struggling with,
the effect of advanced linear - )
@sanglae-kim
By modelling the pressure inside the hot-end, Linear Advance may cause different extrusion values for the same length of the extruded line. So expect some non-obvious differences if you monitor the length of extrusion for a given line length if LA is active.
@misan
Yes, thank you so much for reply.
I'll work on that part, see if LA was the missing point
Thanks a lot!
Best regards,