Draft: Introduce color_name
#108
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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