diff --git a/.github/workflows/gitlab-trigger.yml b/.github/workflows/gitlab-trigger.yml
deleted file mode 100644
index f7cc6e9..0000000
--- a/.github/workflows/gitlab-trigger.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Trigger GitLab Pipeline
-
-on:
- push:
- branches:
- - main
-
-jobs:
- trigger-gitlab-deployment:
- runs-on: ubuntu-latest
- if: github.repository == 'prusa3d/OpenPrintTag'
- steps:
- - name: Send trigger to WebDev GitLab
- run: |
- curl -X POST --fail \
- -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} \
- -F ref=main \
- https://gitlab.com/api/v4/projects/68872123/trigger/pipeline
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7803ed3..eb5d412 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,14 +1,16 @@
-repos:
- - repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v6.0.0
- hooks:
- - id: trailing-whitespace
- - id: end-of-file-fixer
- - id: check-yaml
- - id: check-added-large-files
- exclude: docs_src/media/adhesive_spec.pdf
-
- - repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.14.5
- hooks:
- - id: ruff-format
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v6.0.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: mixed-line-ending
+ args: [--fix=lf]
+ - id: check-yaml
+ - id: check-added-large-files
+ exclude: docs_src/media/adhesive_spec.pdf
+
+ - repo: https://github.com/astral-sh/ruff-pre-commit
+ rev: v0.14.5
+ hooks:
+ - id: ruff-format
diff --git a/LICENSE b/LICENSE
index 6939b50..c363069 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
-Copyright 2025 PRUSA RESEARCH A.S.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
+Copyright 2025 PRUSA RESEARCH A.S.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index cbd820a..caa4d36 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,26 @@
-# OpenPrintTag
-This repository contains specification, documentation and utility scripts for the [OpenPrintTag](https://openprinttag.org) format.
-
-**This is a "raw" repository, you can access the compiled documentation on [specs.openprinttag.org](https://specs.openprinttag.org)**
-
-(or use generate_docs.sh to generate a website into the docs folder)
-
-## Directory structure
-* `data`: Machine-readable specification data (field & enum definitions, ...)
-* `docs_src`: Source code for the [specs.openprinttag.org](https://specs.openprinttag.org) website
-* `tests`: Tests
-* `utils`: Reference implementation for the format in Python
-
-## Generating documentation
-To generate documentation (to the `docs` directory), run:
-```python
-pip3 install -r requirements.txt
-sh generate_docs.sh
-```
-
-Then, to view it, you can:
-```
-cd docs
-python3 -m http.server
-```
-and open your browser on `127.0.0.1:8000`
+# OpenPrintTag
+This repository contains specification, documentation and utility scripts for the [OpenPrintTag](https://openprinttag.org) format.
+
+**This is a "raw" repository, you can access the compiled documentation on [specs.openprinttag.org](https://specs.openprinttag.org)**
+
+(or use generate_docs.sh to generate a website into the docs folder)
+
+## Directory structure
+* `data`: Machine-readable specification data (field & enum definitions, ...)
+* `docs_src`: Source code for the [specs.openprinttag.org](https://specs.openprinttag.org) website
+* `tests`: Tests
+* `utils`: Reference implementation for the format in Python
+
+## Generating documentation
+To generate documentation (to the `docs` directory), run:
+```python
+pip3 install -r requirements.txt
+sh generate_docs.sh
+```
+
+Then, to view it, you can:
+```
+cd docs
+python3 -m http.server
+```
+and open your browser on `127.0.0.1:8000`
diff --git a/data/main_fields.yaml b/data/main_fields.yaml
index 910927f..d2cb8c4 100644
--- a/data/main_fields.yaml
+++ b/data/main_fields.yaml
@@ -1,509 +1,517 @@
-- key: 0
- name: instance_uuid
- type: uuid
- description:
- - Unique identifier of the package instance.
- - If not specified, can be deduced from `brand_uuid` + NFC tag UID.
- - See _UUID_ section for more details.
-
-- key: 1
- name: package_uuid
- type: uuid
- description:
- - Universally unique identifier of the package (product)
- - If not specified, can be deduced from `brand_uuid` + `gtin`.
- - See _UUID_ section for more details.
-
-- key: 2
- name: material_uuid
- type: uuid
- description:
- - Universally unique identifier of the material.
- - If not specified, can be deduced from `brand_uuid` + `material_name`.
- - See _UUID_ section for more details.
-
-- key: 3
- name: brand_uuid
- type: uuid
- description:
- - Universally unique identifier of the brand
- - If not specified, can be deduced from the `brand_name` string.
- - See _UUID_ section for more details.
-
-- key: 4
- name: gtin
- type: number
- required: recommended
- description: Global Trade Item Number.
-
-- key: 5
- name: brand_specific_instance_id
- type: string
- max_length: 16
- description:
- - Brand-specific identifier of the package instance.
- - Not much use cases at this moment, possibly just for URL deduction
-
-- key: 6
- name: brand_specific_package_id
- type: string
- max_length: 16
- description:
- - Brand-specific identifier of the package (product ID).
- - Not much use cases at this moment, possibly just for URL deduction
-
-- key: 7
- name: brand_specific_material_id
- type: string
- max_length: 16
- description:
- - Together with brand uniquely identifies each material.
- - Not much use cases at this moment, possibly just for URL deduction.
-
-- key: 8
- name: material_class
- type: enum
- required: true
- example: FFF
- items_file: material_class_enum.yaml
- display_name_field: description
-
-- key: 9
- name: material_type
- type: enum
- category: fff
- items_file: material_type_enum.yaml
- name_field: abbreviation
- display_name_field: name
- required: recommended
- example: PC
- description:
- - Coarse classification of the material.
- - Useful for determining default parameters for preheat an such that are not explicitly specified in the data.
- - If the material does not match any of the proposed material types, can be left unspecified.
-
-- key: 10
- name: material_name
- type: string
- max_length: 63
- example: PC Blend Carbon Fiber Black
- required: recommended
- description:
- - Brand-specific material display string/identifier.
- - In the UI, brand_name + material_name should be displayed together, for example "Prusament PLA Galaxy Black".
-
-- key: 52
- name: material_abbreviation
- type: string
- max_length: 7
- example: PCCF
- description:
- - Abbreviation of the material name, for UI purposes (footers, dashboards, ...).
- - If not present, the material inherits the abbreviation from the material type.
-
-- key: 11
- name: brand_name
- type: string
- max_length: 31
- required: recommended
- description: Brand of the material.
- example: Prusament
-
-- key: 12
- deprecated: true
-
-- key: 13
- name: write_protection
- type: enum
- items_file: write_protection_enum.yaml
- description:
- - Indicates whether the tag is write protected (everything except aux section, that one should be always writable).
- - See the _Write protection_ section.
-
-- key: 14
- name: manufactured_date
- type: timestamp
- required: recommended
-
-- key: 55
- name: country_of_origin
- type: string
- max_length: 2
- description: Country the [MaterialPackageInstance](terminology) was produced in, encoded as a two-letter code according to [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
-
-- key: 15
- name: expiration_date
- type: timestamp
-
-- key: 16
- name: nominal_netto_full_weight
- required: recommended
- type: number
- unit: g
- example: 1000
- description:
- - Nominal/advertised weight of the full package of the material, excluding the container.
- - The actual netto weight of a specific package instance can slightly differ and is specified by `actual_netto_full_weight`.
-
-- key: 17
- name: actual_netto_full_weight
- required: recommended
- type: number
- unit: g
- example: 1012
- description:
- - Actual weight of the full package of the material of this specific package instance, excluding the weight of the container.
- - Can slightly differ from `nominal_netto_full_weight`.
- - If not present, `nominal_netto_full_weight` SHALL be used as a fallback.
-
-- key: 53
- name: nominal_full_length
- required: recommended
- category: fff
- type: number
- unit: mm
- example: 350000
- description:
- - Nominal/advertised filament length of the full spool.
- - The actual length of a specific package instance can slightly differ and is specified by `actual_full_length`
-
-- key: 54
- name: actual_full_length
- required: recommended
- category: fff
- type: number
- unit: mm
- example: 351000
- description:
- - Actual filament length of the full spool.
- - Can slightly differ from `nominal_full_length`.
- - If not present, `nominal_full_length` SHALL be used as a fallback.
-
-- key: 18
- name: empty_container_weight
- required: recommended
- type: number
- unit: g
- description: Weight of the empty container.
-
-- key: 19
- name: primary_color
- type: color_rgba
- required: recommended
- example: "`\\xff\\x00\\x00\\x7f`"
- description:
- - Primary color of the material in the RGB(A) format, intended for UI purposes.
- - The alpha channel can be left out, in which case the data should have 3 bytes instead of 4 and the color will be considered fully opaque.
- - If a material doesn't have a single primary color (for example rainbow or coextruded filaments), this field can be null.
-
-- key: 59
- name: primary_color_lab
- type: color_lab
- unit: '[L*, a*, b*]'
- example: '[53.24, 111.12, -27.3]'
- description:
- - "Color of a material in the device-independent CIE L*a*b* (CIELAB 1976) color space with reference white D65/2\xB0."
- - If present, the value MUST be obtained by physical spectrometry measurement; it MUST NOT be approximated (for example from RGB).
- - "`L*` is bound to [0, 100], `a*` and `b*` values are dimensionless and are typically between \xB1127, but can theoretically get in the \xB1150 range."
-
-- key: 60
- name: primary_color_ral
- type: string
- unit: RAL code
- max_length: 16
- example: 270 30 20
- description:
- - RAL color identifier, without the "RAL" prefix.
- - The value MUST correspond exactly to an official identifier (see https://www.ral-farben.de/en/all-ral-colours).
- - If present, the physical material MUST match the referenced RAL swatch; it MUST NOT be approximated (for example from RGB/LAB).
- - 'Examples of valid values: `3020`, `9005`, `1023`, `7016`, `270 30 20`, `190 50 35`, `530-1`, `850-M`, `P1 3020`.'
-
-- key: 20
- name: secondary_color_0
- type: color_rgba
- description:
- - One of secondary colors of the material.
- - Data format is the same as for `primary_color`.
-
-- key: 21
- name: secondary_color_1
- type: color_rgba
- description: See `secondary_color_0`.
-
-- key: 22
- name: secondary_color_2
- type: color_rgba
- description: See `secondary_color_0`.
-
-- key: 23
- name: secondary_color_3
- type: color_rgba
- description: See `secondary_color_0`.
-
-- key: 24
- name: secondary_color_4
- type: color_rgba
- description: See `secondary_color_0`.
-
-- key: 25
- deprecated: true
-
-- key: 26
- deprecated: true
-
-- key: 27
- name: transmission_distance
- type: number
- example: 6.6
- unit: HueForge TD
- description:
- - Transmission Distance is a number representing material opacity.
- - Value ranges from 0.1 (least transparent/most opaque) to 100 (most transparent/least opaque).
- - See [Prusa TD values](https://help.prusa3d.com/article/hueforge-filament-transparency-values-and-hexcodes_762314) or [HueForge website](https://shop.thehueforge.com/blogs/news/what-is-hueforge).
-
-- key: 28
- name: tags
- type: enum_array
- max_length: 16
- items_file: tags_enum.yaml
- example: "glitter + dual_color"
- required: recommended
- description: Properties of the material. Can have multiple tags at once.
-
-- key: 56
- name: certifications
- type: enum_array
- max_length: 8
- items_file: material_certifications_enum.yaml
- example: "`ul_2818`"
- description: Certifications the material has.
-
-- key: 29
- name: density
- type: number
- unit: g/cm³ (1 g/cm³ = 0.001 g/mm³ = 1000 kg/m³)
- example: 1.24
- required: recommended
- description: Density of the material.
-
-- key: 30
- name: filament_diameter
- type: number
- unit: mm
- example: 2.75
- category: fff
- description:
- - Diameter of the filament, in mm.
- - If not present, 1.75 mm is assumed.
-
-# Removed 18
-
-# Removed 19
-
-- key: 31
- name: hardness_shore_a
- type: int
- example: 95
- description:
- - Hardness of the material on the Shore A hardness scale (suitable for softer materials).
- - "**Note:** There is no 1:1 mapping between A and D scales, different materials can have different values on one scale even though they are the same on the other."
-
-- key: 32
- name: hardness_shore_d
- type: int
- example: 30
- description:
- - Hardness of the material on the Shore D hardness scale (suitable for harder materials).
- - "**Note:** There is no 1:1 mapping between A and D scales, different materials can have different values on one scale even though they are the same on the other."
-
-- key: 33
- name: min_nozzle_diameter
- type: number
- example: 0.4
- unit: mm
- category: fff
- description:
- - Filaments can contain particles that would clog smaller nozzles.
- - This field specifies minimum nozzle diameter recommended for printing this material.
-
-- key: 34
- name: min_print_temperature
- type: int
- unit: °C
- example: 205
- required: recommended
- category: fff
- description:
- - Minimum recommended nozzle temperature for printing.
- - Also used for loading the filament to the nozzle.
-
-- key: 35
- name: max_print_temperature
- type: int
- unit: °C
- example: 225
- required: recommended
- category: fff
- description:
- - Maximum recommended nozzle temperature for printing.
- - Also used for loading the filament to the nozzle.
-
-- key: 36
- name: preheat_temperature
- type: int
- unit: °C
- example: 170
- category: fff
- required: recommended
- description:
- - Recommended nozzle temperature for preheating/load cell bed leveling.
- - Should be large enough for the material to get soft, but not low enough for it no to drip out of the nozzle.
-
-- key: 37
- name: min_bed_temperature
- type: int
- unit: °C
- example: 60
- category: fff
- required: recommended
- description:
- - Minimum recommended heatbed temperature.
-
-- key: 38
- name: max_bed_temperature
- type: int
- unit: °C
- example: 60
- category: fff
- required: recommended
- description:
- - Maximum recommended heatbed temperature.
-
-- key: 39
- name: min_chamber_temperature
- type: int
- unit: °C
- example: 10
- category: fff
- description:
- - Minimum recommended temperature of the chamber.
-
-- key: 40
- name: max_chamber_temperature
- type: int
- unit: °C
- example: 50
- category: fff
- description:
- - Maximum recommended temperature of the chamber.
-
-- key: 41
- name: chamber_temperature
- type: int
- unit: °C
- example: 20
- category: fff
- description:
- - Ideal chamber temperature for printing.
-
-- key: 42
- name: container_width
- type: int
- unit: mm
- example: 75
- category: fff
- description:
- - Width of the filament spool. Can be useful to know for spool holders, dry boxes and such.
-
-- key: 43
- name: container_outer_diameter
- type: int
- unit: mm
- example: 200
- category: fff
- description:
- - Diameter of the spool. Can be useful to know for spool holders, dry boxes and such.
-
-- key: 44
- name: container_inner_diameter
- type: int
- unit: mm
- example: 100
- category: fff
- description:
- - Diameter of the inner cylinder the filament is spooled once.
- - Equals to the minimum diameter of the filament winding.
-
-- key: 45
- name: container_hole_diameter
- type: int
- unit: mm
- example: 52
- category: fff
- description:
- - Diameter of the center hole of the spool.
-
-- key: 46
- name: viscosity_18c
- type: number
- unit: mPa·s
- description: Viscosity of the material at 18 °C.
- category: sla
-
-- key: 47
- name: viscosity_25c
- type: number
- unit: mPa·s
- description: Viscosity of the material at 25 °C.
- category: sla
- example: 80
-
-- key: 48
- name: viscosity_40c
- type: number
- unit: mPa·s
- description: Viscosity of the material at 40 °C.
- category: sla
-
-- key: 49
- name: viscosity_60c
- type: number
- unit: mPa·s
- description: Viscosity of the material at 60 °C.
- category: sla
-
-- key: 50
- name: container_volumetric_capacity
- type: number
- unit: ml (cm³)
- category: sla
- description: Maximum amount of material the container can hold.
-
-- key: 51
- name: cure_wavelength
- type: int
- unit: nm
- example: 405
- category: sla
- description:
- - Wavelength of the light the material has been designed to be cured with.
-
-- key: 57
- name: drying_temperature
- type: int
- unit: °C
- example: 45
- category: fff
- description:
- - Recommended ambient temperature for drying.
-
-- key: 58
- name: drying_time
- type: int
- unit: min
- example: 480
- category: fff
- description:
- - Recommended drying time (at `drying_temperature`).
-
-# First unused key: 61
+- key: 0
+ name: instance_uuid
+ type: uuid
+ description:
+ - Unique identifier of the package instance.
+ - If not specified, can be deduced from `brand_uuid` + NFC tag UID.
+ - See _UUID_ section for more details.
+
+- key: 1
+ name: package_uuid
+ type: uuid
+ description:
+ - Universally unique identifier of the package (product)
+ - If not specified, can be deduced from `brand_uuid` + `gtin`.
+ - See _UUID_ section for more details.
+
+- key: 2
+ name: material_uuid
+ type: uuid
+ description:
+ - Universally unique identifier of the material.
+ - If not specified, can be deduced from `brand_uuid` + `material_name`.
+ - See _UUID_ section for more details.
+
+- key: 3
+ name: brand_uuid
+ type: uuid
+ description:
+ - Universally unique identifier of the brand
+ - If not specified, can be deduced from the `brand_name` string.
+ - See _UUID_ section for more details.
+
+- key: 4
+ name: gtin
+ type: number
+ required: recommended
+ description: Global Trade Item Number.
+
+- key: 5
+ name: brand_specific_instance_id
+ type: string
+ max_length: 16
+ description:
+ - Brand-specific identifier of the package instance.
+ - Not much use cases at this moment, possibly just for URL deduction
+
+- key: 6
+ name: brand_specific_package_id
+ type: string
+ max_length: 16
+ description:
+ - Brand-specific identifier of the package (product ID).
+ - Not much use cases at this moment, possibly just for URL deduction
+
+- key: 7
+ name: brand_specific_material_id
+ type: string
+ max_length: 16
+ description:
+ - Together with brand uniquely identifies each material.
+ - Not much use cases at this moment, possibly just for URL deduction.
+
+- key: 8
+ name: material_class
+ type: enum
+ required: true
+ example: FFF
+ items_file: material_class_enum.yaml
+ display_name_field: description
+
+- key: 9
+ name: material_type
+ type: enum
+ category: fff
+ items_file: material_type_enum.yaml
+ name_field: abbreviation
+ display_name_field: name
+ required: recommended
+ example: PC
+ description:
+ - Coarse classification of the material.
+ - Useful for determining default parameters for preheat an such that are not explicitly specified in the data.
+ - If the material does not match any of the proposed material types, can be left unspecified.
+
+- key: 10
+ name: material_name
+ type: string
+ max_length: 63
+ example: PC Blend Carbon Fiber Black
+ required: recommended
+ description:
+ - Brand-specific material display string/identifier.
+ - In the UI, brand_name + material_name should be displayed together, for example "Prusament PLA Galaxy Black".
+
+- key: 52
+ name: material_abbreviation
+ type: string
+ max_length: 7
+ example: PCCF
+ description:
+ - Abbreviation of the material name, for UI purposes (footers, dashboards, ...).
+ - If not present, the material inherits the abbreviation from the material type.
+
+- key: 11
+ name: brand_name
+ type: string
+ max_length: 31
+ required: recommended
+ description: Brand of the material.
+ example: Prusament
+
+- key: 12
+ deprecated: true
+
+- key: 13
+ name: write_protection
+ type: enum
+ items_file: write_protection_enum.yaml
+ description:
+ - Indicates whether the tag is write protected (everything except aux section, that one should be always writable).
+ - See the _Write protection_ section.
+
+- key: 14
+ name: manufactured_date
+ type: timestamp
+ required: recommended
+
+- key: 55
+ name: country_of_origin
+ type: string
+ max_length: 2
+ description: Country the [MaterialPackageInstance](terminology) was produced in, encoded as a two-letter code according to [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
+
+- key: 15
+ name: expiration_date
+ type: timestamp
+
+- key: 16
+ name: nominal_netto_full_weight
+ required: recommended
+ type: number
+ unit: g
+ example: 1000
+ description:
+ - Nominal/advertised weight of the full package of the material, excluding the container.
+ - The actual netto weight of a specific package instance can slightly differ and is specified by `actual_netto_full_weight`.
+
+- key: 17
+ name: actual_netto_full_weight
+ required: recommended
+ type: number
+ unit: g
+ example: 1012
+ description:
+ - Actual weight of the full package of the material of this specific package instance, excluding the weight of the container.
+ - Can slightly differ from `nominal_netto_full_weight`.
+ - If not present, `nominal_netto_full_weight` SHALL be used as a fallback.
+
+- key: 53
+ name: nominal_full_length
+ required: recommended
+ category: fff
+ type: number
+ unit: mm
+ example: 350000
+ description:
+ - Nominal/advertised filament length of the full spool.
+ - The actual length of a specific package instance can slightly differ and is specified by `actual_full_length`
+
+- key: 54
+ name: actual_full_length
+ required: recommended
+ category: fff
+ type: number
+ unit: mm
+ example: 351000
+ description:
+ - Actual filament length of the full spool.
+ - Can slightly differ from `nominal_full_length`.
+ - If not present, `nominal_full_length` SHALL be used as a fallback.
+
+- key: 18
+ name: empty_container_weight
+ required: recommended
+ type: number
+ unit: g
+ description: Weight of the empty container.
+
+- key: 19
+ name: primary_color
+ type: color_rgba
+ required: recommended
+ example: "`\\xff\\x00\\x00\\x7f`"
+ description:
+ - Primary color of the material in the RGB(A) format, intended for UI purposes.
+ - The alpha channel can be left out, in which case the data should have 3 bytes instead of 4 and the color will be considered fully opaque.
+ - If a material doesn't have a single primary color (for example rainbow or coextruded filaments), this field can be null.
+
+- key: 59
+ name: primary_color_lab
+ type: color_lab
+ unit: '[L*, a*, b*]'
+ example: '[53.24, 111.12, -27.3]'
+ description:
+ - "Color of a material in the device-independent CIE L*a*b* (CIELAB 1976) color space with reference white D65/2\xB0."
+ - If present, the value MUST be obtained by physical spectrometry measurement; it MUST NOT be approximated (for example from RGB).
+ - "`L*` is bound to [0, 100], `a*` and `b*` values are dimensionless and are typically between \xB1127, but can theoretically get in the \xB1150 range."
+
+- key: 60
+ name: primary_color_ral
+ type: string
+ unit: RAL code
+ max_length: 16
+ example: 270 30 20
+ description:
+ - RAL color identifier, without the "RAL" prefix.
+ - The value MUST correspond exactly to an official identifier (see https://www.ral-farben.de/en/all-ral-colours).
+ - If present, the physical material MUST match the referenced RAL swatch; it MUST NOT be approximated (for example from RGB/LAB).
+ - 'Examples of valid values: `3020`, `9005`, `1023`, `7016`, `270 30 20`, `190 50 35`, `530-1`, `850-M`, `P1 3020`.'
+
+- key: 20
+ name: secondary_color_0
+ type: color_rgba
+ description:
+ - One of secondary colors of the material.
+ - Data format is the same as for `primary_color`.
+
+- key: 21
+ name: secondary_color_1
+ type: color_rgba
+ description: See `secondary_color_0`.
+
+- key: 22
+ name: secondary_color_2
+ type: color_rgba
+ description: See `secondary_color_0`.
+
+- key: 23
+ name: secondary_color_3
+ type: color_rgba
+ description: See `secondary_color_0`.
+
+- key: 24
+ name: secondary_color_4
+ type: color_rgba
+ description: See `secondary_color_0`.
+
+- key: 25
+ deprecated: true
+
+- key: 26
+ deprecated: true
+
+- key: 27
+ name: transmission_distance
+ type: number
+ example: 6.6
+ unit: HueForge TD
+ description:
+ - Transmission Distance is a number representing material opacity.
+ - Value ranges from 0.1 (least transparent/most opaque) to 100 (most transparent/least opaque).
+ - See [Prusa TD values](https://help.prusa3d.com/article/hueforge-filament-transparency-values-and-hexcodes_762314) or [HueForge website](https://shop.thehueforge.com/blogs/news/what-is-hueforge).
+
+- key: 28
+ name: tags
+ type: enum_array
+ max_length: 16
+ items_file: tags_enum.yaml
+ example: "glitter + dual_color"
+ required: recommended
+ description: Properties of the material. Can have multiple tags at once.
+
+- key: 56
+ name: certifications
+ type: enum_array
+ max_length: 8
+ items_file: material_certifications_enum.yaml
+ example: "`ul_2818`"
+ description: Certifications the material has.
+
+- key: 29
+ name: density
+ type: number
+ unit: g/cm³ (1 g/cm³ = 0.001 g/mm³ = 1000 kg/m³)
+ example: 1.24
+ required: recommended
+ description: Density of the material.
+
+# Removed 30 - filament_diameter, which expressed the diameter in mm.
+# Replaced by filament_diameter_v2 (key 61) using µm, to match the architecture
+
+- key: 61
+ name: filament_diameter_v2
+ type: int
+ unit: µm
+ example: 2850
+ category: fff
+ description:
+ - Diameter of the filament, in µm.
+ - If not present, 1750 µm is assumed.
+ - "**Note:** Replaces the removed key 30 (`filament_diameter`), which was in mm."
+
+# Removed 18
+
+# Removed 19
+
+- key: 31
+ name: hardness_shore_a
+ type: int
+ example: 95
+ description:
+ - Hardness of the material on the Shore A hardness scale (suitable for softer materials).
+ - "**Note:** There is no 1:1 mapping between A and D scales, different materials can have different values on one scale even though they are the same on the other."
+
+- key: 32
+ name: hardness_shore_d
+ type: int
+ example: 30
+ description:
+ - Hardness of the material on the Shore D hardness scale (suitable for harder materials).
+ - "**Note:** There is no 1:1 mapping between A and D scales, different materials can have different values on one scale even though they are the same on the other."
+
+# Removed 33 - min_nozzle_diameter, which expressed the diameter in mm.
+# Replaced by min_nozzle_diameter_v2 (key 62) using µm, to match the architecture
+
+- key: 62
+ name: min_nozzle_diameter_v2
+ type: int
+ unit: µm
+ example: 400
+ category: fff
+ description:
+ - Filaments can contain particles that would clog smaller nozzles.
+ - This field specifies minimum nozzle diameter recommended for printing this material, in µm.
+ - "**Note:** Replaces the removed key 33 (`min_nozzle_diameter`), which was in mm."
+
+- key: 34
+ name: min_print_temperature
+ type: int
+ unit: °C
+ example: 205
+ required: recommended
+ category: fff
+ description:
+ - Minimum recommended nozzle temperature for printing.
+ - Also used for loading the filament to the nozzle.
+
+- key: 35
+ name: max_print_temperature
+ type: int
+ unit: °C
+ example: 225
+ required: recommended
+ category: fff
+ description:
+ - Maximum recommended nozzle temperature for printing.
+ - Also used for loading the filament to the nozzle.
+
+- key: 36
+ name: preheat_temperature
+ type: int
+ unit: °C
+ example: 170
+ category: fff
+ required: recommended
+ description:
+ - Recommended nozzle temperature for preheating/load cell bed leveling.
+ - Should be large enough for the material to get soft, but not low enough for it no to drip out of the nozzle.
+
+- key: 37
+ name: min_bed_temperature
+ type: int
+ unit: °C
+ example: 60
+ category: fff
+ required: recommended
+ description:
+ - Minimum recommended heatbed temperature.
+
+- key: 38
+ name: max_bed_temperature
+ type: int
+ unit: °C
+ example: 60
+ category: fff
+ required: recommended
+ description:
+ - Maximum recommended heatbed temperature.
+
+- key: 39
+ name: min_chamber_temperature
+ type: int
+ unit: °C
+ example: 10
+ category: fff
+ description:
+ - Minimum recommended temperature of the chamber.
+
+- key: 40
+ name: max_chamber_temperature
+ type: int
+ unit: °C
+ example: 50
+ category: fff
+ description:
+ - Maximum recommended temperature of the chamber.
+
+- key: 41
+ name: chamber_temperature
+ type: int
+ unit: °C
+ example: 20
+ category: fff
+ description:
+ - Ideal chamber temperature for printing.
+
+- key: 42
+ name: container_width
+ type: int
+ unit: mm
+ example: 75
+ category: fff
+ description:
+ - Width of the filament spool. Can be useful to know for spool holders, dry boxes and such.
+
+- key: 43
+ name: container_outer_diameter
+ type: int
+ unit: mm
+ example: 200
+ category: fff
+ description:
+ - Diameter of the spool. Can be useful to know for spool holders, dry boxes and such.
+
+- key: 44
+ name: container_inner_diameter
+ type: int
+ unit: mm
+ example: 100
+ category: fff
+ description:
+ - Diameter of the inner cylinder the filament is spooled once.
+ - Equals to the minimum diameter of the filament winding.
+
+- key: 45
+ name: container_hole_diameter
+ type: int
+ unit: mm
+ example: 52
+ category: fff
+ description:
+ - Diameter of the center hole of the spool.
+
+- key: 46
+ name: viscosity_18c
+ type: number
+ unit: mPa·s
+ description: Viscosity of the material at 18 °C.
+ category: sla
+
+- key: 47
+ name: viscosity_25c
+ type: number
+ unit: mPa·s
+ description: Viscosity of the material at 25 °C.
+ category: sla
+ example: 80
+
+- key: 48
+ name: viscosity_40c
+ type: number
+ unit: mPa·s
+ description: Viscosity of the material at 40 °C.
+ category: sla
+
+- key: 49
+ name: viscosity_60c
+ type: number
+ unit: mPa·s
+ description: Viscosity of the material at 60 °C.
+ category: sla
+
+- key: 50
+ name: container_volumetric_capacity
+ type: number
+ unit: ml (cm³)
+ category: sla
+ description: Maximum amount of material the container can hold.
+
+- key: 51
+ name: cure_wavelength
+ type: int
+ unit: nm
+ example: 405
+ category: sla
+ description:
+ - Wavelength of the light the material has been designed to be cured with.
+
+- key: 57
+ name: drying_temperature
+ type: int
+ unit: °C
+ example: 45
+ category: fff
+ description:
+ - Recommended ambient temperature for drying.
+
+- key: 58
+ name: drying_time
+ type: int
+ unit: min
+ example: 480
+ category: fff
+ description:
+ - Recommended drying time (at `drying_temperature`).
+
+# First unused key: 63
diff --git a/data/material_class_enum.yaml b/data/material_class_enum.yaml
index 84d37d9..48ab0d7 100644
--- a/data/material_class_enum.yaml
+++ b/data/material_class_enum.yaml
@@ -1,7 +1,7 @@
-- key: 0
- name: FFF
- description: Filament
-
-- key: 1
- name: SLA
- description: Resin
+- key: 0
+ name: FFF
+ description: Filament
+
+- key: 1
+ name: SLA
+ description: Resin
diff --git a/docs_src/README.md b/docs_src/README.md
index 2a7cfe5..a12e128 100644
--- a/docs_src/README.md
+++ b/docs_src/README.md
@@ -1,6 +1,6 @@
# OpenPrintTag Specification
-This website contains specifications for the [OpenPrintTag project](//openprinttag.org). It is automatically generated from the [OpenPrintTag github repository](//github.com/prusa3d/OpenPrintTag).
+This website contains specifications for the [OpenPrintTag project](//openprinttag.org). It is automatically generated from the [OpenPrintTag Specification repository]({{repo}}).
**Please note that the specification is still work in progress.** We are collecting feedback from interested parties and improving things.
@@ -8,7 +8,8 @@ If you are interested in participating in the project, please see [Contributing]
## Quick links
* [OpenPrintTag main website](//openprinttag.org)
-* [Github repository](//github.com/prusa3d/OpenPrintTag)
+* [OpenPrintTag Architecture website]({{arch}})
+* [OpenPrintTag Specification repository]({{repo}})
* [Data format specification](nfc_data_format.md)
* Electrical & hardware specification - will be added soon™
* [Examples](examples.md)
diff --git a/docs_src/_sidebar.md b/docs_src/_sidebar.md
index 379248e..39d33d3 100644
--- a/docs_src/_sidebar.md
+++ b/docs_src/_sidebar.md
@@ -1,10 +1,11 @@
- [Home](/)
- [Terminology](/terminology)
- [Data format](/nfc_data_format)
-- [Material types](/material_types)
+- [FFF material types](/fff_material_types)
- [Material tags](/material_tags)
- [Material certifications](/material_certifications)
- [Technical details](/nfc_technical_details)
- [Physical specification](/physical_spec)
- [Examples](/examples)
+- [Changelog](/changelog)
- [Contributing](/contributing)
diff --git a/docs_src/changelog.md b/docs_src/changelog.md
new file mode 100644
index 0000000..44a7fd5
--- /dev/null
+++ b/docs_src/changelog.md
@@ -0,0 +1,5 @@
+# Changelog
+
+## Not yet released
+1. `filament_diameter` (mm) replaced with `filament_diameter_v2` (µm) to align with the OpenPrintTag architecture
+1. `min_nozzle_diameter` (mm) replaced with `min_nozzle_diameter_v2` (µm) to align with the OpenPrintTag architecture
diff --git a/docs_src/material_types.md b/docs_src/fff_material_types.md
similarity index 64%
rename from docs_src/material_types.md
rename to docs_src/fff_material_types.md
index 46993f5..9fef337 100644
--- a/docs_src/material_types.md
+++ b/docs_src/fff_material_types.md
@@ -1,4 +1,4 @@
-# Material types
+# FFF material types
Material types are a FFF-only mechanism to categorize materials into broad, strictly and universally defined categories. See [Terminology](terminology.md).
-{{ enum_table("material_type_enum", material_type_columns) }}
+{{ enum_table("material_type_enum", fff_material_type_columns) }}
diff --git a/docs_src/generate.py b/docs_src/generate.py
index ed4dfb0..e39f812 100644
--- a/docs_src/generate.py
+++ b/docs_src/generate.py
@@ -59,14 +59,15 @@ def gen_material_tag_table():
r.write("
".join(desc_lines))
r.write("")
- r.write("")
+ r.write("\n\n")
+ r.write(f"*This table was automatically generated from [`tags_enum.yaml`]({vars.repo}/blob/main/data/tags_enum.yaml) and [`tag_categories_enum.yaml`]({vars.repo}/blob/main/data/tag_categories_enum.yaml)*\n\n")
return r.getvalue()
env.globals["material_tag_table"] = gen_material_tag_table
-env.globals["material_type_columns"] = [
+env.globals["fff_material_type_columns"] = [
Column(field="key", title="Key"),
Column(field="abbreviation", title="Name", transform=lambda x: f"`{x}`"),
Column(field="name", title="Full name"),
@@ -83,13 +84,14 @@ def gen_material_tag_table():
gen_doc_file("_navbar")
gen_doc_file("_sidebar")
gen_doc_file("README")
+gen_doc_file("changelog")
gen_doc_file("terminology")
gen_doc_file("nfc_data_format")
gen_doc_file("nfc_technical_details")
gen_doc_file("examples")
gen_doc_file("contributing")
-gen_doc_file("material_types")
+gen_doc_file("fff_material_types")
gen_doc_file("material_tags")
gen_doc_file("material_certifications")
gen_doc_file("physical_spec")
diff --git a/docs_src/generate_common.py b/docs_src/generate_common.py
index 6025b85..a4ee4ea 100644
--- a/docs_src/generate_common.py
+++ b/docs_src/generate_common.py
@@ -121,6 +121,7 @@ def show_file(file, language="yaml"):
# Other variables
env.globals["repo"] = repo
+env.globals["arch"] = arch
# Generate documentation files
diff --git a/docs_src/material_certifications.md b/docs_src/material_certifications.md
index ba86744..503cb0a 100644
--- a/docs_src/material_certifications.md
+++ b/docs_src/material_certifications.md
@@ -1,6 +1,6 @@
# Material certifications
Material certifications allow expressing what certificates a material has.
-The certifications are stored as an enum on the tag to reduce memory usage and promote standard encoding. If there is a certification missing in the enum, please create a PR or file an issue in the [OpenPrintTag repository]({{repo}}).
+The certifications are stored as an enum on the tag to reduce memory usage and promote standard encoding. If there is a certification missing in the enum, please create a PR or file an issue in the [OpenPrintTag Architecture repository](//github.com/OpenPrintTag/openprinttag-architecture).
{{ enum_table("material_certifications_enum", material_certification_columns) }}
diff --git a/docs_src/media/class_diagram.mermaid b/docs_src/media/class_diagram.mermaid
deleted file mode 100644
index 7a8cbc5..0000000
--- a/docs_src/media/class_diagram.mermaid
+++ /dev/null
@@ -1,46 +0,0 @@
-classDiagram
- class MaterialProperties {
- shore_hardneess
- nozzle_print_temperature
- }
- class MaterialType {
-
- }
- class Material {
- properties: MaterialProperties
- type: MaterialType
- brand
- name
- abbreviation
- primary_color
- }
- MaterialType --> Material
- MaterialProperties --> Material
-
- class MaterialContainer {
- inner_diameter
- outer_diameter
- width
- empty_weight
- }
-
- class MaterialPackage {
- material: Material
- container: MaterialContainer
- gtin
- filament_diameter
- nominal_full_weight
- }
- Material --> MaterialPackage
- MaterialContainer --> MaterialPackage
-
- class DynamicData {
- consumed_weight
- }
- class MaterialPackageInstance {
- package: MaterialPackage
- dynamic_data: DynamicData
- actual_full_length
- }
- MaterialPackage --> MaterialPackageInstance
- DynamicData --> MaterialPackageInstance
diff --git a/docs_src/media/class_diagram.svg b/docs_src/media/class_diagram.svg
deleted file mode 100644
index 0121dd3..0000000
--- a/docs_src/media/class_diagram.svg
+++ /dev/null
@@ -1,102 +0,0 @@
-
diff --git a/docs_src/nfc_data_format.md b/docs_src/nfc_data_format.md
index eb8069f..41b8410 100644
--- a/docs_src/nfc_data_format.md
+++ b/docs_src/nfc_data_format.md
@@ -1,220 +1,227 @@
-# NFC Data Format Specification
-
-## 1. Used standards
-- [ISO/IEC 15693-3 (NFC-V)](https://en.wikipedia.org/wiki/ISO/IEC_15693)
-- [NFC Data Exchange Format (NDEF)](https://nfc-forum.org/build/specifications/data-exchange-format-ndef-technical-specification/)
-- [Concise Binary Object Representation (CBOR)](https://cbor.io/)
-
-## 2. General structure
-
| CC record (Capability Container) |
- NDEF TLV | -TLV Terminator | -|||||||
| TLV Header | -|||||||||
| NDEF record | -|||||||||
| NDEF header | -Meta region | -Main region | -Auxiliary region | -||||||
| Meta section | -Main section | -Unused space | -Auxiliary section | -Unused space | -|||||
| CC record (Capability Container) |
+ NDEF TLV | +TLV Terminator | +|||||||
| TLV Header | +|||||||||
| NDEF record | +|||||||||
| NDEF header | +Meta region | +Main region | +Auxiliary region | +||||||
| Meta section | +Main section | +Unused space | +Auxiliary section | +Unused space | +|||||