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

    3D GCode Viewer integrated with DWC

    Scheduled Pinned Locked Moved
    Duet Web Control wishlist
    42
    284
    30.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.
    • PCRundefined
      PCR
      last edited by PCR

      In a thread someone said something about that.

      Edit: https://forum.duet3d.com/topic/18313/live-gcode-view

      Sindariusundefined 1 Reply Last reply Reply Quote 0
      • PCRundefined
        PCR
        last edited by

        @Sindarius Works great! Thank you for that

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

          @PCR It's possible/probable they are developing their own 3d viewer for the DWC. The drive for my original development was that I needed the ability to see the model but also be able to see a color mixing approximation based on color mixing gcode on my M3D Crane Quad mixing head. I also use it when I have a print that just has several tools for my set of extruders, so it should work great for something like a tool changer. Not sure what they have worked on but I am sure it'll be good.

          1c958a3a-cb89-48a4-a016-801fd5299e0b-image.png

          by simply changing the colors loaded into the extruder I get a nice approximation of what the gradients / colors will look like.

          c5d89267-4ab0-48cd-aa77-7dfef5b893cb-image.png

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

            Did some poking around at the 3.2 development baseline and it looks like they are using this package for their upcoming viewer.

            https://gcode-preview.web.app/

            e7ebbac7-3614-4ff8-8c20-139db2d9edf1-image.png

            1 Reply Last reply Reply Quote 2
            • PCRundefined
              PCR
              last edited by

              @Sindarius The SBC Version do not work ;( it "hangs" at downloading Gcode

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

                @PCR I don’t have a duet 3 nor a pi setup to test. Is there any message in the console? I wonder if it is the issue where you had to upload the web client twice for it to take.

                1 Reply Last reply Reply Quote 0
                • PCRundefined
                  PCR
                  last edited by

                  @Sindarius i think i found the problem.
                  The SBC Version want to download the file via the
                  GET http://192.168.178.36/rr_download?name=0:/gcodes/lpc_adapter_case_bottom_0.2mm_PLA_MK3S_2h6m.gcode
                  command.
                  7e0700e5-a73b-4dcb-a55b-36d39a219c8c-grafik.png
                  For the Duet SBC it should be

                  GET http://192.168.178.36/machine/file/0:/gcodes/lpc_adapter_case_bottom_0.2mm_PLA_MK3S_2h6m.gcode

                  In the browser it will download the file via the last command
                  358503a7-c2c0-4c1e-9b0f-dbe4f6f0934c-grafik.png

                  More Info here : https://github.com/Duet3D/DuetSoftwareFramework#get-machinefilefilename

                  Sindariusundefined 1 Reply Last reply Reply Quote 1
                  • smoki3undefined
                    smoki3
                    last edited by smoki3

                    @Sindarius

                    Very cool. I like the multi color implementation. Looks better than the visualizer on 3.2

                    So would be cool if this will also be available as an Plug In for 3.2. On my 3.2 build from yesterday, christian got the plugin system to work.

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

                      @PCR Thanks for looking into this. I will start looking at what it takes to make sure that the URL is correct for the SBC version. Hopefully I will have some time today/tomorrow to make the changes to it.

                      1 Reply Last reply Reply Quote 0
                      • PCRundefined
                        PCR
                        last edited by

                        Thank you! honestly like your ones more than the one from 3.2

                        1 Reply Last reply Reply Quote 0
                        • PCRundefined
                          PCR
                          last edited by

                          made this change to the fork of you!

                          https://github.com/P-C-R/DuetWebControl/commit/32c2e5279333cae02d4a80a39c5828be06b4ef5d

                          it works now on the SBC. But i cannot say it its "enough"

                          0 P-C-R committed to P-C-R/DuetWebControl
                          Update viewer.js
                          Sindariusundefined 2 Replies Last reply Reply Quote 1
                          • Sindariusundefined
                            Sindarius @PCR
                            last edited by

                            @PCR That'll work for the SBC but then it will break the SD. I am looking at a way to detect if the DWC is SBC or SD and use that as a parameter in the viewer so both will work.

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

                              @PCR

                              If you could give this a shot and let me know. I added some code that will hopefully help determine if the DWC is SBC or SD and set an appropriate parameter for the viewer.

                              https://github.com/Sindarius/DuetWebControl/releases/tag/3.1.1-SBCFix

                              1 Reply Last reply Reply Quote 0
                              • PCRundefined
                                PCR
                                last edited by

                                @Sindarius

                                fa464acb-8d40-4431-9def-f2c5c5b92c9d-grafik.png

                                not working;(

                                1 Reply Last reply Reply Quote 0
                                • PCRundefined
                                  PCR
                                  last edited by

                                   def __init__(self,base_url):
                                          self._base_url = base_url
                                          try:
                                              URL=(f'{self._base_url}'+'/rr_status?type=1')
                                              r = self.requests.get(URL,timeout=(2,60))
                                              j = self.json.loads(r.text)
                                              _=j['coords']
                                              self.pt = 2
                                              return
                                          except:
                                              try:
                                                  URL=(f'{self._base_url}'+'/machine/status')
                                                  r = self.requests.get(URL,timeout=(2,60))
                                                  j = self.json.loads(r.text)
                                                  _=j['result']
                                                  self.pt = 3
                                                  return
                                              except:
                                                  print(self._base_url," does not appear to be a RRF2 or RRF3 printer", file=self.sys.stderr)
                                                  return 
                                  

                                  This was the logic @Danal code. RIP

                                  Sindariusundefined 2 Replies Last reply Reply Quote 1
                                  • Sindariusundefined
                                    Sindarius @PCR
                                    last edited by

                                    @PCR I was trying to avoid having to query both paths but that may be unavoidable for now.

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

                                      @PCR https://github.com/Sindarius/DuetWebControl/releases/tag/3.1.1-SBCFixV2

                                      Give this one a go if you get a chance.

                                      1 Reply Last reply Reply Quote 0
                                      • danym21undefined
                                        danym21
                                        last edited by

                                        @Sindarius
                                        like I said in github it is working with the FixV2 on my SBC for me.
                                        many thx for the great work.

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

                                          @danym21 I saw your message, thanks for the feedback and I am glad that it going for you guys πŸ™‚

                                          1 Reply Last reply Reply Quote 0
                                          • PCRundefined
                                            PCR
                                            last edited by

                                            Works perfectly πŸ˜‰ now as a Plugin in 3.2 ;)))

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