Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    [F.R.] Auto Define M557 Mesh Bounds from GCODE

    General Discussion
    mesh probe probing auto automatic m557
    3
    5
    342
    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.
    • CCS86
      CCS86 last edited by

      Hi guys, I think this would be a very useful feature:

      Rather than arbitrarily probing the entire bed, it makes more sense to probe only the area used during the first layer of the print. You could increase the mesh density and still save time with this approach.

      If the M557 code itself could have a parameter added to trigger automatic mesh bound generation. This would make the process seamless across any slicer (perhaps with different layer labeling).

      Essentially, it would have to read through the current gcode file between:

      ;LAYER:0
      

      and

      ;LAYER:1
      

      to parse minimum and maximum values for X and Y, then use these values (maybe with a "padding" value to expand this rectangle) to define the mesh bounds.

      1 Reply Last reply Reply Quote 0
      • Luke'sLaboratory
        Luke'sLaboratory last edited by

        To be completely honest, this seems like something that should be added slicer side -

        I definitely reassign the mesh parameters on a per-print basis, and could easily be added to a post-processing script in common slicers (hasn't been done, you're right) but seems far better in the slicer environment.

        Luke
        http://lukeslab.online

        CCS86 1 Reply Last reply Reply Quote 0
        • gtj0
          gtj0 last edited by

          Actually, something along these lines was discussed a while back when RRF3 and the DuetSoftwareFramework were being planned. The idea was that the DSF could call filters to calculate stuff like this. The original premise was calculating the bounds of a print so a large bed with multiple heat zones would only need to have the zones turned on that were needed for a specific print.

          We're not quite there yet.

          1 Reply Last reply Reply Quote 0
          • CCS86
            CCS86 @Luke'sLaboratory last edited by CCS86

            @Luke-sLaboratory said in [F.R.] Auto Define M557 Mesh Bounds from GCODE:

            To be completely honest, this seems like something that should be added slicer side -

            I definitely reassign the mesh parameters on a per-print basis, and could easily be added to a post-processing script in common slicers (hasn't been done, you're right) but seems far better in the slicer environment.

            Where it should be done is subjective. It certainly could be done either way.

            To me it makes more sense to be written once in the firmware, rather than written over and over, for each individual slicer.

            But, in my opinion, pressure advance should be written in the slicer instead.

            @gtj0 said in [F.R.] Auto Define M557 Mesh Bounds from GCODE:

            Actually, something along these lines was discussed a while back when RRF3 and the DuetSoftwareFramework were being planned. The idea was that the DSF could call filters to calculate stuff like this. The original premise was calculating the bounds of a print so a large bed with multiple heat zones would only need to have the zones turned on that were needed for a specific print.

            We're not quite there yet.

            Glad to hear it is something that has been discussed before.

            I'm a much better mechanical designer than I am a software dev. One of my interns wrote a program for me in C++ to parse gcode (from 4/5 axis millturn CNC machines that I program) and spit out min and max values for each axis. I could donate that source code if it would be a helpful framework and there is interest from the Duet devs to add this feature. @dc42, any interest?

            1 Reply Last reply Reply Quote 0
            • CCS86
              CCS86 last edited by

              If anyone is interested, my friend and I developed a Cura post processing script.

              You pass it a single parameter (mesh spacing), and it parses the first layer gcode for min/max X and Y coordinates, and then replaces the M557 line in your start gcode.

              LevelingMeshOptimizer.py.txt

              Just remove the .txt, and drop it here: C:\Program Files\Ultimaker Cura 4.5.0\plugins\PostProcessingPlugin\scripts\

              You must have a static mesh leveling command in your start gcode, like: M557 X0:200 Y0:200 S20

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