Jump to content

Path optimization


QweRty

Recommended Posts

Posted · Path optimization

I have a model with a column sticking out of it, I want to print 12 of them at a time arranged like that:
image.thumb.jpeg.5ecf4d06727d8be3b7f64a07f250564a.jpeg

With the assumption that putting columns close to each other would save some printing time as the printing head wouldn't need to travel between them as much.

Cura 5.8.0 comes up with the following printing order:
image.thumb.jpeg.9d4d9f5867901a588b864189dfec2ac6.jpeg

Which obviously can be done faster just by going in circles between clusters of columns. Why does it do that? How do I make it do better?

  • Link to post
    Share on other sites

    Posted · Path optimization

    There are 2 modes for the setting "print sequence": "one at a time" and "all at once".  Cura recently added a feature that lets you choose the print order but only in "one at a time" mode so this doesn't help you at all.  Your model can't be printed in one at a time mode as it's too tall and even if it were shorter you'd have to space the parts much farther apart.

     

    There is an optimization algorithm but as you've discovered it could be better.  I believe the way it works is that once it's done with one tower (aka "island" in the source code) it picks the nearest island from where the head ended on the current island.  This helps so much more than printing in random order.  So there is an optimization algorithm but it's pathetically simple.

     

    Your optimization goal is called "the traveling salesman problem" and is one of the most famous optimization problems in software and something that computer science students study. You only have 12 towers but even in this example there are 12! or 479 million possible orders to print the islands on layers with towers.  479 million is small enough that a computer could certainly calculate every possible route in a few seconds but if you go to 15 towers it's now too large a number to do in a reasonable time.  And that's just "island order".  There are other optimizations within each island and from one layer to the next.  So it's usually not possible to find the best solution but the optimization algorithm could certainly be improved!  A lot!  For example it should at least try 1000 different random possibilities and pick the fastest!  But there are 100s of known algorithms that can improve over what it does now.

     

    I'm sure someone on the Cura team did some analysis and realized that doing a better optimization sequence would only improve printing time of most models by say 10% but I don't know.

  • Link to post
    Share on other sites

    Posted · Path optimization

    There seem to exist TSP solutions (https://en.wikipedia.org/wiki/Held–Karp_algorithm) that are better than O(n!), provided we have enough memory.

     

    However, after fiddling with it for a while, I'm not sure what happens is related to solving it. In my particular case, we start with 12 islands and keep those 12 islands until the end, but at the beginning those islands are really close to each other, so the order doesn't matter much and any semi-reasonable walk order will be OK, it changes, however, when we start printing columns. Issue is, Cura doesn't seem to re-evaluate island visiting order when conditions change. Whatever order it came up with when putting the first layer it continues using till the very end.

  • 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!
        • 3 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...