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

    Top-down gCode viewer (WIP)

    Scheduled Pinned Locked Moved
    Plugins for DWC and DSF
    3
    8
    323
    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.
    • oozeBotundefined
      oozeBot
      last edited by oozeBot

      I decided to finally take the time to learn how to create plugins within the framework and thought this would be a good challenge for a first project. Yes, it's really being designed for use within our machines, but we'll likely release a "lite" version (if there is enough interest) as an external plugins outside of the "full" version that's baked into our framework. The only caveat is that this is tied to an SBC implementation (which all our machines use), so converting it to stand-alone might be further than we will want to take it.

      We already have @Sindarius excellent gCode viewer - and this is not to take away from that!

      A few key features that have been implemented so far:

      • Segmentation based gCode rendering (it splits each G1/G2/G3 into microsegments that are rendered at a precise delay so the overall move completes at the exact time expected by the associated feedrate)
      • Actual extrusion width instead of approximated (still working on perfecting this)
      • Feature type color rendering
      • Loads local files, files saved within DWC, and can sync with the current job
      • Tons of memory optimizations to keep resource utilization as small as possible
      • Play, Pause, Speed controls, and Forward / Reverse functionality

      I'm all ears for feedback on this. It is just a side-project I thought of early last week. However, I've already grown quite fond of zoning out while watching it. 🙂

      Here are some videos and a screenshot of where I currently am with it.

      gCode Plugin - recording 1.mp4
      gCode Plugin - recording 2.mp4

      Screenshot 2025-05-04 211629.png

      MJLewundefined Sindariusundefined 2 Replies Last reply Reply Quote 9
      • MJLewundefined
        MJLew @oozeBot
        last edited by

        @oozeBot Wow! That's really good. My gcode files are mostly written by my own software and can't reliably be displayed by the gcode viewer of PrusaSlicer and so I use the online ncviewer.com. The display of your viewer is superior even if it is only top-down view.

        Can it work on a computer instead of the SBC implementation with a Duet?

        Some other feedback: it's not clear from the videos if a user can scrub through to a selected layer. That would be very helpful if I was to use it because most of my problems happen at layer changes.

        oozeBotundefined 1 Reply Last reply Reply Quote 0
        • oozeBotundefined
          oozeBot @MJLew
          last edited by oozeBot

          I had a bit of time to work on this some more and have began adding in object cancellation. Here is a screenshot and a quick video of it loading various files in my test deck.

          Screenshot 2025-05-07 140307.png

          Recording 2025-05-07 140227.mp4

          @MJLew - without an attached SBC, it would still be able to load a local file from your computer for rendering, but that is about all it could do. Do you mean scrub through the gcodes like this? Recording 2025-05-07 141611.mp4

          PM me if you'd like me to try one of your files.

          1 Reply Last reply Reply Quote 1
          • Sindariusundefined
            Sindarius @oozeBot
            last edited by

            @oozeBot This is looking amazing! Great job!! Always room for more viewers 🙂

            1 Reply Last reply Reply Quote 1
            • oozeBotundefined
              oozeBot
              last edited by

              I had some free time this week and added a "GCode Navigator" to scrub the job file. Screenshot and quick video of how you can scroll to move through the file using it.

              b4388f01-c3a9-46c3-b560-393b6d15cd91-image.png

              Recording 2025-05-16 184122.mp4

              MJLewundefined 1 Reply Last reply Reply Quote 1
              • MJLewundefined
                MJLew @oozeBot
                last edited by

                @oozeBot Looks great. And useful!

                Did you have a go at the gcode file that I sent you in chat?

                oozeBotundefined 1 Reply Last reply Reply Quote 0
                • oozeBotundefined
                  oozeBot @MJLew
                  last edited by

                  @MJLew yes, I did. I need to go back to it and find time rework the way your code handles z as that tripped up my processor, but I don't believe it will be a huge change. It also made me realize the codebase doesn't currently handle vase mode. I'll tackle both soon.

                  MJLewundefined 1 Reply Last reply Reply Quote 0
                  • MJLewundefined
                    MJLew @oozeBot
                    last edited by

                    @oozeBot Thank you, oozeBot. Yes, my explicit Z values are different to the typical slicer output, but they make it easier for me to see what is going on in the gcode. I treat the whole 'layer' idea a bit more loosely than a slicer would...

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