Conversation
BFW-8775
|
Before I can comment I need to understand what are these uuid and uuid derivation for various fields for. I read the explanation that some fields have a uuid counterpart and if not one can be derived, but I couldn't see an explanation of use cases for those UUID's. Can you explain or point me to some explanation that I may have missed? |
This is to be able to uniquely identify various entities in the tag everywhere. We are working on a material database (see #70) and we want to make sure that everyone can cross-link their OpenPrintTags with the data in the database, and in a decentralized way (that's why the hash-based UUIDv5, so that you could for example have a local fork of the DB where you add some filaments, but when you publish your filaments to the upstream, they all will keep the same IDs, plus if someone else adds the filaments before you, they would have the same UUIDs). |
|
At this point, I'm really considering adding just |
|
Not sure I fully understand the uuid, but I get it's for some referencing using uid's instead of the entire string. What I don't understand even with that is why is it ok to have
I don't really understand how this help you with uuid vs. just adding an extra color_name field, but also don't have any issues with this approach, just a bit unusual to reference positions in this type of specifications, probably prone to errors on manufacturers side. Going with that approach, since there is no specified order of information for It is also potentially possible to add subtype using this same approach (to know what type of PLA for example) the same way, but another alternative, at least for me given the |
This PR attempts to address #80.
However, having now implemented this, I am actually quite unhappy how it ended up:
material_nameto be equal to both abbreviation andmaterial_type- for exmplePETG Jet Blackwould get split intomaterial_name = PETGandcolor_name = Jet Black. This I attempted to "fix" by adding the ability to default thematerial_nameto the value ofmaterial_abbreviationif not present.material_abbreviationcan default tomaterial_typeis not present, which results in this two-level dependency chain.material_nameis used for the UUID derivation, so this severely complicates the implementation of the UUID derivation mechanism and makes it prone to errorscolor_namefield which now needs to be considered as well.material_namecan possibly be derived frommaterial_type, which is an enum, it could now happen that the UUID derivation fails in case the library is not up to date and does not yet support thematerial_typevalue a tag contains.So, actually, quite sad about this.
The only "possible" alternative I see to this would be to have three separate fields that should approximately match
material_extended_name = material_name + color_name, but:color_namecould never rely on the color being actually there (because the manufacturer could have decided to enter just thematerial_extended_name)material_extended_namenot being present, which would hamper the UUID deduction.BFW-8775