WildRikku / OctoPrint-SpoolManager

Plugin for managing spools and all their usage metadata
GNU Affero General Public License v3.0
7 stars 0 forks source link

Multi-color spools #19

Open andrewroth opened 3 days ago

andrewroth commented 3 days ago

Hi, has there been any discussion on adding support for multi-color filaments? For two-colors, I would envision a line diagonally in the color square, with half one color and half the other. Could do similar for tri-colour. UI would have to be updated to support selecting a second and possibly third color. I would consider implementing it, though I don't want to commit 100% yet.

WildRikku commented 2 days ago

There has been no such discussion to my knowledge, no, and there are currently no plans for an implementation. I personally don't use such spools. Do they have a defined length per color? Would you simply like to have a multi-color square or also actual functionality?

andrewroth commented 2 days ago

I had in mind solely multi-color square, no other functionality. Though it would be handy to have a true boolean or field for which kind of filament. I would categorize it as dual-color, tri-colour, or rainbow. Rainbow does have color per length, but it's not important to know the exact distance, just that it's rainbow. In fact, just a preset "rainbow icon" would be sufficient for me to know visually it's a rainbow. Maybe a dark and light version, as they seem to come in dark and light rainbows versions.

For dual/tri-colour filament, it's merged right into the filament and is uniformly merged for the whole spool. Ex:

image

In those cases, depending what angle you look at the filament, you see a different color. Having the box divided into two or three parts and you choose the color you want in each is what I had in mind.

I will also add, these filaments come in silk and regular matte PLA. There's already a PLA_silk Material type, and it could visually just throw a vertical light reflection down the icon. Ex. image.

I think that could be done with a png with transparency so it can apply to any filament color box. It would be very nice to visually see which filaments are silk or not when I go to choose which one to print. There's even some ex. green that can be a solid matte green, or green silk, and you have to rely on reading the name currently. Not such a bad thing, but a visual indication would be even better.

WildRikku commented 1 day ago

Alright, thanks for the details. I agree that having a split color box would be neat with up to three or even four colours and a "rainbow" option. It could be done by having a "add color" button which splits the color field into the next amount (so, in two when clicked first, in three the next time). It's not that easy though because it requires changes to the database so those colors can be stored, too (the database stores hexadecimal color values). Also the dropdown needs to be able to handle those multi-colors.

The rainbow could be a specially treated value in the dropdown which turns the color field into a CSS gradient or an icon.

If you want to make a pull request, I'd be happy to help. I am currently busy with the external database support and some bugs (and the part of my life that is not volunteering), but if you provided a UI implementation, I could take care of how to store the data in the database.