Open v2thegreat opened 1 week ago
This is certainly interesting! However how do you deal with the reality that most models can only really be oriented in a handful of ways to optimise for 3D printing, due to the presence of overhangs and needed supports? For example in your picture above, the optimised object, while having less filament swaps, it also is pretty much unprintable due to the almost non existent contact patch with the bed.
As with all engineering, there are probably tradeoffs to different approaches. Given your experience, let me know what makes the most sense. I'm just proposing these off the cuff.
Most of these approaches require input from the user, and they're not perfect on their own. However, this is something new and would probably be iterated upon a few times with the different approaches anyway. Given that, the least risky option (in terms of print failures would be
Is there an existing issue for this feature request?
Is your feature request related to a problem?
When I was on Reddit, I found this post on filament waste, and it got me thinking: If the print was rotated differently, then the number of filament swaps could have been reduced, saving a ton of purging and time.
Which printers will be beneficial to this feature?
All
Describe the solution you'd like
Auto rotating the model in such a way that it can find the best position to minimize filament swaps.
Describe alternatives you've considered
Additional context
I made a 2D prototype in Python to see if this idea has any merit. You can find the full notebook here.
The idea that I had to test this out was given an image/model/projection, I want to find the best rotation (orientation) that minimizes the number of colors in a layer, minimizing the filament swaps that need to happen.
For my prototype, I took a brute-force approach simply rotating the image until I found one that minimized the number of swaps. You could further optimized this by using a solver or some other form of simulated annealing or just some better math since in 3D space, we'd be dealing with 90 * 90 = 8100 degrees that would need to be tested. This might be overengineering on my part since I'm using python and most slicer software seems to be made using C++.
I used a scoring function as the average number of colors across all layers, and tried to minimize that.
Based on my testing, I think this appraoch can work quite nicely. Here are some graphs to back me up:
Image with random spots of different colors
Random Swipes
Stich (since he started it all)
Sorry for my messy work, it's thanksgiving here in Canada and I have a few things to take care of. You can find my exploratory notebook here!
I would've done this in 3D, but I couldn't find a way to extract color information from the 3MFs I got from makerworld (since that's the main usecase). If someone knows how to access 3D models with color so I can continue to prototype (preferably in Python), please let me know! I'm also not very familiar with slicer programming in general, so I might've made assumptions here that were wrong.