Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Fix to show correct filament usage in DWC for slic3r gcode

    Scheduled Pinned Locked Moved
    Duet Web Control wishlist
    7
    12
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • keyz182undefined
      keyz182
      last edited by

      Looks like you'd need to add [, m, and ] to the strchr maybe?

      1 Reply Last reply Reply Quote 0
      • Scachiundefined
        Scachi @jv43
        last edited by Scachi

        @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;
        }
        
        1 Reply Last reply Reply Quote 0
        • gnydickundefined
          gnydick
          last edited by

          I always thought it just counted the extrusions it made. It's always worked fine for me.

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            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.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            whosrdaddyundefined jv43undefined 2 Replies Last reply Reply Quote 0
            • whosrdaddyundefined
              whosrdaddy @dc42
              last edited by

              @dc42 : why not make it configurable? that way the user can adapt if the slicer decides to change it format...

              1 Reply Last reply Reply Quote 0
              • mloidlundefined
                mloidl
                last edited by

                @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

                1 Reply Last reply Reply Quote 0
                • jv43undefined
                  jv43 @dc42
                  last edited by jv43

                  @dc42

                  sample gcode prenerated by PrusaSlicer 2.0.0

                  https://gofile.io/?c=MUaRnC

                  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

                  dc42undefined 1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators @jv43
                    last edited by

                    @jv43 said in Fix to show correct filament usage in DWC for slic3r gcode:

                    @dc42

                    sample gcode prenerated by PrusaSlicer 2.0.0

                    https://gofile.io/?c=MUaRnC

                    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.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    jv43undefined 1 Reply Last reply Reply Quote 0
                    • jv43undefined
                      jv43 @dc42
                      last edited by

                      @dc42
                      Awesome!
                      I'll test it once you release 2.03RC3

                      1 Reply Last reply Reply Quote 0
                      • gnydickundefined
                        gnydick
                        last edited by

                        I can confirm after switching to the PrusaSlicer 2.0 from 1.41.3, I'm having the same problems now. Happy to help with more gcode files if you need, @dc42 , @jv43

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA