RE: E value Calculation of the G code in Prusa Slicer
ah, very interesting and useful! thank you very much @misan
Currently, im working with this font, because of its spacefilling quality:
https://www.fontspace.com/absinthelyric-print-font-f30853
i'll let you know, when trying out your tool
RE: E value Calculation of the G code in Prusa Slicer
Yes!
If I understand correctly, what you want to do might work properly!
The difference between prusaslicer and my customized Gcode generator was very small. (maybe in some cases, this might become big)
I'm pretty sure your Gcode also works if you calculate correctly (the equation posted here is right)
Thanks
RE:
@sanglae-kim: I have followed your numeric example and found a few problems:
>>> h**2/4*math.pi+w*(w-h) 0.13818583470577037
You were missing PI when calculating the section of the extruded path.
If you calculate the total length needed for the 80.078 mm path at 0.3 mm height and 0.45 mm width you get
def whatL(h,w,K): return (4*K*h*w+(pi-4)*K*h**2)/(pi*D**2) >>> whatL(0.3,0.45,80.074) 3.8512856322385485
Which seems quite close to the E3.85132 in the second marked line. Maybe the small difference is due to the integer raster mentioned above.
OTOH, extruder axis may be set to absolute or relative values independently of XYZ axis mode.
I guess in this case it is set to relative(M83, something you can check at the beginning of the Gcode file) rather than absolute as you were assuming (otherwise there would be a significant calculation difference).
RE: E value Calculation of the G code in Prusa Slicer
@misan
@sanglae-kim
we should include in the equation the extrusion multiplier because when this is not equal to 1 will give different results for E
@sanglae-kim: I have followed your numeric example and found a few problems:
>>> h**2/4*math.pi+w*(w-h) 0.13818583470577037You were missing PI when calculating the section of the extruded path.
If you calculate the total length needed for the 80.078 mm path at 0.3 mm height and 0.45 mm width you get
def whatL(h,w,K): return (4*K*h*w+(pi-4)*K*h**2)/(pi*D**2) >>> whatL(0.3,0.45,80.074) 3.8512856322385485Which seems quite close to the E3.85132 in the second marked line. Maybe the small difference is due to the integer raster mentioned above.
OTOH, extruder axis may be set to absolute or relative values independently of XYZ axis mode.
I guess in this case it is set to relative(M83, something you can check at the beginning of the Gcode file) rather than absolute as you were assuming (otherwise there would be a significant calculation difference).