Open whosawhatsis opened 10 years ago
This also effects the line width in the gcode preview.
That number is the diameter the filament should have such that 1 mm filament corresponds to 1 mm ^3 material. pi r^2 * 1 = 1 r = sqrt( 1 / pi ) = .56 diameter = 2 * r = 1.128
This could also be solved in the frontend; we could hide the setting and set it to the correct value in the frontend when Volumetric gcode is selected. As such the rendering wouldn't have to be changed.
I'd rather you didn't hide the setting. I use it to set the filament diameter in gcode using M200 D{filament_diameter}. The gcode preview renderer just needs to ignore the value in that field when in that mode, just like the slicer does.
The slicer doesn't ignore the value. The value is the value that needs to be entered in order for a slicer which is based on a round diameter to produce volumetric output, which is a cubic approach. Why would you use the filament diameter if the firmware is volumetric? The firmware is the valid place where you should then enter the filament diameter.
In volumetric mode, the slicer produces the same output regardless of what value you have in the filament diameter field, so it is ignoring that value. The firmware still needs to know that value. The UM2 stores that value in EEPROM, but mainline Marlin does not, and you have to set the value using M200. I do that using the {filament_diameter} variable in my start code so that I still have the option to change the value in the interface at slicing time. The problem here is that the gcode preview is applying that value to its calculations as if the slicer had also done so (for millimeter extrusion mode), but it didn't.
I'm no pro on the frontend, but I know the backend uses the filament flow diameter. Perhaps the frontend disables user interactivity and sets the value to 1128 by itself.
I don't know how it is implemented in the new Cura and so we should wait and see if the problem persists in the new Cura.
@BagelOrb the old engine ignores the diameter in volumatric mode. The new engine does not. (which is why you had to set the diameter to 1.128mm)
@daid: So why did you change that?
Was refactoring code for the improved engine, got and this check got lost somewhere on the way.
When using the Reprap (Volumetric) gcode flavor, the filament diameter fields are still shown. They are ignored for slicing purposes, but are still used for calculating filament usage, which leads to wildly inaccurate values being reported for filament volume used and price unless you put 1.12837916709551 into that field.