Fix to show correct filament usage in DWC for slic3r gcode
-
Looks like you'd need to add
[
,m
, and]
to thestrchr
maybe? -
@jv43 I use a perl script, windows 10, you need to adjust the paths to match your structure.
This is replacing the string correctly, but I haven't tried if this will really fix it for dwc.The newest prusa slicer hasn't the perl bundled anymore..I use the perl5.24.0.exe from previous version
Slic3rPE-1.41.3+win64-full-201902111723
PrusaSlicer - print settings - output :
D:\3Dprint\filause.bat;
The content of the filause.bat file:
D:\ProgrammePortable\Slic3rPE-1.41.3+win64-full-201902111723\perl5.24.0.exe d:\3dprint\filause.pl %*
The content of the filause.pl file:
use strict; use warnings; $^I = '.bak'; # create a copy of the file # read stdin and any/all files passed as parameters, one line at a time while (<>) { # shorten string to display creation time of file on dwc # s/PrusaSlicer/PS/; # filament used [mm] = s/; filament used \[mm\](.*)/; filament used$1/; print; }
-
I always thought it just counted the extrusions it made. It's always worked fine for me.
-
Please make this GCode file available to me via Dropbox or another file sharing site. I can put a fix for this in the next 2.03RC. Unfortunately, some slicer developers often change the metadata format, so it's a moving target.
-
@dc42 : why not make it configurable? that way the user can adapt if the slicer decides to change it format...
-
@dc42
I've sliced a marvin using Slic3rPE 1.41.3 and PrusaSlicer 2.0.0
The 2 GCodes can be downloaded from https://www.dropbox.com/s/3o7nibahbyuaixn/Marvin_GCode.zip?dl=0 -
sample gcode prenerated by PrusaSlicer 2.0.0
filament usage parameter is located at the beginning of the metadata at the end of the file, starting at line 5685 of the file linked above
-
@jv43 said in Fix to show correct filament usage in DWC for slic3r gcode:
sample gcode prenerated by PrusaSlicer 2.0.0
filament usage parameter is located at the beginning of the metadata at the end of the file, starting at line 5685 of the file linked above
Thanks. I've implemented a change in my latest 2.03 source code and I will test it using that file.
-
@dc42
Awesome!
I'll test it once you release 2.03RC3 -