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.8 Stable released 🎉
        In the Cura 5.8 stable release, everyone can now tune their Z seams to look better than ever. Method series users get access to new material profiles, and the base Method model now has a printer profile, meaning the whole Method series is now supported in Cura!
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...