Jump to content

Suggestion for possible slicing optimization


dgnuff
Go to solution Solved by Slashee_the_Cow,

Recommended Posts

Posted · Suggestion for possible slicing optimization

This suggestion is more at the level of "it might be interesting to investigate this" rather than a real suggestion for a change that should be implemented.

 

The section I'm looking is the pathing, and I'll start with the observation that solving for the optimal head route when printing a layer is a variation on the classic "Travelling salesman" problem, and is therefore NP complete, or in layman's terms it's insanely difficult to get the absolute best solution.

 

My thoughts on how you route are based on watching the head moving as it's printing models, so I may not have it quite right anyway.  That said, my best estimate of the algorithm is that you first separate the layer into contiguous "segments" that can be printed without needing to stop extrusion.

Now that you have these segments, you print the first, and then look for the nearest end of a segment that hasn't been printed, travel there, and then print that segment.  Then just repeat that process till the layer is finished.  Assuming we agree that the optimal solution is NP complete, going to the nearest available end looks like a reasonable optimization to reduce travel time.

My suggestion for investigation is to slightly modify that selection, and not simply chose the nearest end, but instead do the following.  For each unprinted segment, take two distances, those being the distance from the current head position to both ends of the segment, and instead evaluate either the product of those distances or the sum of them.  And then take the lowest product/sum as the selection criteria.
 

Here's my reasoning. Something I see occasionally is that it'll be printing a bunch of small close together segments, and it'll finish a few of them, but then select a segment that ends far away and so it moves elsewhere on the layer, leaving those few unprinted segments that it has to later back track to, and print.  By using the product/sum algorithm, the intention is to make it favor "local" segments that will tend to keep the head in the current locality, so it'll finish in that area completely before taking the long path elsewhere on the model.

  • Link to post
    Share on other sites

    • Solution
    Posted · Suggestion for possible slicing optimization

    It's worth noting that Cura, by default, almost always prints parts of layers in a certain order (IIRC it's support > walls > skin > infill) because each feature type will have the same flow rate, so obviously that affects where it goes.

     

    You can submit this as a feature request though and see what the developers have to say.

    • Like 1
    Link to post
    Share on other sites

    Posted · Suggestion for possible slicing optimization

    Agreed, I had noticed that it prints in exactly the order you specify.  That's my fault for not explicitly calling it out, but when searching for the next segment, it would only want to consider segments in the part it's working on.  So all the support first, then all the walls, then all the skin segments, and finally all the infill.

     

    That said, thank you for the pointer to the feature request page, I'll give that a try and see what happens.  I'm sure you'll agree that it's no big deal if the developers don't even look at it, but it might be able to help 

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 26 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...