openprinttag

package module
v0.0.0-...-e7c0501 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 21 Imported by: 0

README

Open Print Tag for Golang

This is a pure golang based implementation of the Open Print Tag standard initiated by Prusa Research, as documented at https://openprinttag.org/ .

Intent

The design will encode/decode open print tags in accordance with the published specification above, and tries to get as close as possible to the exact encodings used in the python examples from the primary project repository.

Provision is made for:

  1. A fully featured golang module that can be used programatically for the generation, modification and interpretation of open print tags.
  2. A binary that can be used for these same functions

Code generation is heavily used to generate the specific encoders and decoders, allowing the library to adhere ridgidly and automatically to the published data formats.

License

Licensed under the MIT license

MIT License

Copyright (c) 2026 Christopher J Bearman

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.

GO Version

This module supports go1.21+.

MAC users should be aware of issues that may result in the following linker error:

dyld[3723]: missing LC_UUID load command

If you encounter this issue, please switch to go1.24 or higher to resolve.

Using as a golang module

go get github.com/cjbearman/openprinttag

Documentation

Refer to https://pkg.go.dev/github.com/cjbearman/openprinttag for API documentation.

General Usage

The API for the openprintag module provides a fluent methodology for creating, decoding, modifying and outputting tags.

Make sure and import the module:

import "github.com/cjbearman/openprinttag"
Create a new blank tag
	tag := openprinttag.NewOpenPrintTag().
        WithAuxRegionSize(32).
        WithSize(304)

The newly created tag variable represents the open print tag and provides methods for accessing the three tag regions, encoding the tag and so forth.

Full example of creating a tag
	tag := openprinttag.NewOpenPrintTag().
		WithAuxRegionSize(32).
		WithSize(304)

	tag.MainRegion().
		SetBrandName("Awesome Filaments").
		SetMaterialName("Fancy PLA Yellow").
		SetPrimaryColor(openprinttag.MustNewColor("#FFFF00")).
		SetMaterialClass(openprinttag.MaterialClassFFF).
		SetMaterialType(openprinttag.MaterialTypePLA)
	
	tagData, err:= tag.Encode()

N.B. Each region provides three functions for each possible parameter. A "Set" function is used to set the value of the parameter. A "Get" function is used to retrieve the value of the parameter, and includes a second return value indicating whether the parameter was present. A "Clear" function can be used to erase the current content of the parameter.

Example for reading an existing tag
func readTag(r io.Reader) *openprinttag.OpenPrintTag {

	tagBytes, err := io.ReadAll(r)
	if err != nil {
		panic(err)
	}

	tag, err := openprinttag.Decode(tagBytes)
	if err != nil {
		panic("failed to read tag")
	}

	if brandName, found := tag.MainRegion().GetBrandName(); found {
		fmt.Printf("This tag is from brand: %s\n", brandName)
	} else {
		fmt.Printf("No brand name found in this tag")
	}

	return tag
}

This example implements a function to read a tag from a reader, print out the manufacturer information if present, and return the loaded tag to the caller.

UUID encoding

Four functions are provided to encode brand, material, package and instance UUIDs according to specification:

func BrandUUID(brandName string) uuid.UUID
func MaterialUUID(materialName string, brandUUID uuid.UUID) uuid.UUID
func MaterialPackageUUID(gtin string, brandUUID uuid.UUID) uuid.UUID
func MaterialPackageInstanceUUID(NFCTagUid []byte) (uuid.UUID, error)

Command line tool

The optional "optag" binary is provided as an example, as well as a useful tool for creating and modifying tags. Additionally, "tagtool" is provided for reading/writing a variety of ISO15693 tags (details below).

Installation:
go install github.com/cjbearman/openprinttag
General Operation

The optag tool follows a three stage process:

  1. Initialize a blank tag, or, load an existing tag from binary data
  2. Modify the tag by applying data to it from a YAML data file
  3. Encode the tag and output it either as a binary tag, or a YAML document

Various options control this process.

Example: Initialize a new blank tag
$ optag -init 304 -aux-size 12
.. binary data output (not shown)
Example: Load a tag from a file and decode/debug in YAML format

This example loads an existing (binary) tag from a file, and outputs it's data and statistics.

$ optag -load ../../test_outputs/TestStats.tag -yaml -all 
regions:
    meta:
        payload_offset: 0
        absolute_offset: 42
        size: 4
        used_size: 4
    main:
        payload_offset: 4
        absolute_offset: 46
        size: 222
        used_size: 119
    aux:
        payload_offset: 226
        absolute_offset: 268
        size: 35
        used_size: 1
root:
    data_size: 304
    payload_size: 261
    overhead: 43
    payload_used_size: 124
    total_used_size: 167
data:
    meta:
        aux_region_offset: 226
    main:
        instance_uuid: 473bb8cd-e129-45b8-9fcf-da1c3add9c47
        brand_specific_material_id: "1"
        material_class: FFF
        material_type: PLA
        material_name: PLA Galaxy Black
        brand_name: Prusament
        manufactured_date: 1739371290
        nominal_netto_full_weight: 1000
        actual_netto_full_weight: 1012
        empty_container_weight: 100
        primary_color: '#3d3e3d'
        transmission_distance: 0.199951171875
        tags:
            - glitter
        min_print_temperature: 205
        max_print_temperature: 220
        preheat_temperature: 170
        min_bed_temperature: 40
        max_bed_temperature: 60
        max_chamber_temperature: 40
        chamber_temperature: 20
        container_width: 75
    aux: {}
validate:
    warnings:
        - field Gtin (gtin/4) is recommended
        - field Density (density/29) is recommended
    errors: []
opt_check:
    warnings: []
    errors: []
    notes: []
uuids:
    brand_uuid: ae5ff34e-298e-50c9-8f77-92a97fb30b09
    material_uuid: 6e774110-9aa4-5ab2-a269-456918dad9b1
    package_uuid: null
    instance_uuid: 473bb8cd-e129-45b8-9fcf-da1c3add9c47
Example: Initialize a blank tag and import some fields

The YAML structure used for field declaration is the same as provided by the reference implementation at https://openprinttag.org/.

$ cat some_fields.yaml
data:
    meta:
        aux_region_offset: 226
    main:
        instance_uuid: 473bb8cd-e129-45b8-9fcf-da1c3add9c47
        brand_specific_material_id: "1"
        material_class: FFF
        material_type: PLA
        material_name: PLA Galaxy Black
        brand_name: Prusament
        tags:
            - glitter


$ optag -init 304 -aux-size 32 -data some_fields.yaml -yaml     
data:
    meta: {}
    main:
        instance_uuid: 473bb8cd-e129-45b8-9fcf-da1c3add9c47
        brand_specific_material_id: "1"
        material_class: FFF
        material_type: PLA
        material_name: PLA Galaxy Black
        brand_name: Prusament
        tags:
            - glitter
    aux: {}

N.B. Omitting the -yaml option would have output the binary form of the tag

Writing an actual tag

You can use the tagtool command included in thie distribution to write tags using an ACS ACR-1552-U USB reader/writer. Tag types supported are Icode SLIX/SLIX2, ST25DV04, ST25DV16, ST25DV64.

See https://github.com/cjbearman/openprinttag/cmd/tagtool/README.md for more information.

Example, using an Icode Slix2 tag (316 bytes memory, 312 used)

optag -init 312 -aux-size 32 -data some_fields.yaml | tagtool -w -
Reading back the tag

Example of reading the slix2 tag created in the above example:

tagtool -r - | optag -load - -yaml -all
.. fields are display in YAML
Notes

The opttag utility can also be used with pipes. We could, for example, pipe in an existing tag, add some fields and output the resulting tag. When loading an existing tag from standard input, use "-load -"

cat existing_tag.bin | optag -load - -data addfields.yaml > new_tag.bin
All Options

The usage message can be obtained by using the -h option:

Usage of optag:
  -all
    	Output all possible YAML information, requires -yaml
  -aux-size int
    	Set size of aux section
  -base-64
    	Output tag in base64 format, -out required
  -block-size int
    	Set block size
  -data string
    	Import YAML encoded data and apply to tag
  -discard-aux
    	Discard the AUX region
  -hex
    	Output tag in hex format, -out required
  -hex-dump
    	Output tag in hex dump format, -out required
  -init int
    	Initialize a new tag with the provided size
  -load string
    	Loads an existing open print tag from a file (or specify "-" to load from STDIN)
  -meta-size int
    	Set size of meta section
  -opt-check
    	Run opt-check, requires -yaml
  -out string
    	Outputs the completed tag to a file (or specify "-" to output to STDOUT)
  -regions
    	Output region information, requires -yaml
  -root
    	Output root information, requires -yaml
  -set-uri string
    	Set URI
  -soft
    	When importing data to a tag, do not overwrite fields already set in the tag
  -uri
    	Output URI information, requires -yaml
  -uuids
    	Output defined/calculated UUIDs, require -yaml
  -validate
    	Validate required/recommended fields, requires -yaml
  -yaml
    	output as YAML instead of binary tag

Development

This library is designed to automatically generate much of it's own code from the reference implementation at https://github.com/prusa3d/OpenPrintTag. To this end, this reference repository is included herein as a git submodule at the source_repo path.

To checkout with submodule

go clone --recurse-submodules git@github.com:cjbearman/openprinttag.git

To update this project to a later (future) version of the reference:

  1. Update the submodule
  2. Regenerate the auto-generated code files using go generate as follows:
go generate ./...

The code generation process is driven by the codegen and config packages. The codegen package first uses the config package to load the YAML files describing the open print tag data formats. Once these are read and processed, the codegen package uses it to generate code files in the root directory. Code files are generated for each open print tag region and each enumerated type.

Auto-generated files all containg the following comment:

// ** THIS FILE IS AUTO-GENERATED, DO NOT MODIFY **

Should you update to a new version of the reference (source_repo) repository and run auto-generation, there is a possibility that changes to the data files will cause compilation issues in other (non-generated) files. Changes made to expected things, such as the introduction of new fields, deprecation of old fields, introduction of new enumerations and so forth should be handled gracefully, however, there is always the prospect that some change to the reference implementation may need some adjustments in the config loader or code generator packages. It is more likely that updates to the reference implementation and subsequent regeneration of code will require tweaks in the unit tests to bring them into compliance with those changes.

To install binary tools from local clone:

go install ./...

Tools are installed to your local GOPATH bin directory, enusre this is in your path.

Automated Tests

Use standard golang unit testing procedures:

go test -v ./...

Some of the tests will write binary and YAML tag data to the test_outputs directory. These outputs can be used for manual testing and comparison against equivalents produced by reference implementation.

Integration Tests

The integration_tests directory contains some tests to create the same tags using the reference python code and this module and compare the binary outputs, reporting any discrepancies as failures.

This is somewhat tentative as there are many reasons why we would generate slightly different binary representations (field order and so forth), so failures here after updating the reference architecture are highly likely and not necessarily indicative of a problem.

Development Scripts

The scripts directory contain a few shell scripts that may be useful when developing on Mac/Linux platforms (sorry I don't do Windows).

scripts/build_all.sh

Runs code generation, rebuilds all binaries and creates new development docker container.

scripts/docs.sh

Launches a local doc server on port 8080

scripts/pyvirtual.sh

Creates a python virtual environment under (project root)/.venv and initializes it with all dependencies needed by the (python based) source_repo. Run this script using:

source scripts/pyvirtual.sh

to activate the environment.

This simply produces an isolated environment for running the reference scripts, which is useful when you need to compare the output of this module with output produced by the reference impelmentation.

Docker development container

The docker_test directory contains a docker build and helper scripts for running the reference scripts from source_repo via docker, avoiding the need to mess around with virtual environments locally. The docker container is used by the integration tests.

Documentation

Overview

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

MIT License

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.

Index

Constants

This section is empty.

Variables

View Source
var MaterialCertificationsMap = map[uint64]string{
	0: "ul_2818",
	1: "ul_94_v0",
	2: "ul_2904",
}
View Source
var MaterialClassMap = map[uint64]string{
	0: "FFF",
	1: "SLA",
}
View Source
var MaterialTypeMap = map[uint64]string{
	0:  "PLA",
	1:  "PETG",
	2:  "TPU",
	3:  "ABS",
	4:  "ASA",
	5:  "PC",
	6:  "PCTG",
	7:  "PP",
	8:  "PA6",
	9:  "PA11",
	10: "PA12",
	42: "PA612",
	11: "PA66",
	12: "CPE",
	13: "TPE",
	14: "HIPS",
	15: "PHA",
	16: "PET",
	17: "PEI",
	18: "PBT",
	19: "PVB",
	20: "PVA",
	21: "PEKK",
	22: "PEEK",
	23: "BVOH",
	24: "TPC",
	25: "PPS",
	26: "PPSU",
	27: "PVC",
	28: "PEBA",
	29: "PVDF",
	30: "PPA",
	31: "PCL",
	32: "PES",
	33: "PMMA",
	34: "POM",
	35: "PPE",
	36: "PS",
	37: "PSU",
	38: "TPI",
	39: "SBS",
	40: "OBC",
	41: "EVA",
}
View Source
var RecoverAssertions = true

RecoverAssertions may be set to false for debugging which allow assertions to propagate as panics during encode and decode operations

View Source
var TagMap = map[uint64]string{
	0:  "filtration_recommended",
	1:  "biocompatible",
	61: "home_compostable",
	62: "industrially_compostable",
	63: "bio_based",
	2:  "antibacterial",
	3:  "air_filtering",
	4:  "abrasive",
	5:  "foaming",
	67: "castable",
	6:  "self_extinguishing",
	7:  "paramagnetic",
	8:  "radiation_shielding",
	9:  "high_temperature",
	71: "high_speed",
	10: "esd_safe",
	11: "conductive",
	70: "emi_shielding",
	12: "blend",
	13: "water_soluble",
	14: "ipa_soluble",
	15: "limonene_soluble",
	64: "low_outgassing",
	16: "matte",
	17: "silk",
	19: "translucent",
	20: "transparent",
	65: "without_pigments",
	21: "iridescent",
	22: "pearlescent",
	23: "glitter",
	24: "glow_in_the_dark",
	25: "neon",
	26: "illuminescent_color_change",
	27: "temperature_color_change",
	28: "gradual_color_change",
	29: "coextruded",
	30: "contains_carbon",
	31: "contains_carbon_fiber",
	32: "contains_carbon_nano_tubes",
	72: "contains_graphene",
	33: "contains_glass",
	34: "contains_glass_fiber",
	35: "contains_kevlar",
	68: "contains_ptfe",
	36: "contains_stone",
	37: "contains_magnetite",
	38: "contains_organic_material",
	39: "contains_cork",
	40: "contains_wax",
	41: "contains_wood",
	66: "contains_algae",
	42: "contains_bamboo",
	43: "contains_pine",
	44: "contains_ceramic",
	45: "contains_boron_carbide",
	46: "contains_metal",
	47: "contains_bronze",
	48: "contains_iron",
	49: "contains_steel",
	50: "contains_silver",
	51: "contains_copper",
	52: "contains_aluminium",
	53: "contains_brass",
	54: "contains_tungsten",
	55: "imitates_wood",
	56: "imitates_metal",
	57: "imitates_marble",
	58: "imitates_stone",
	59: "lithophane",
	60: "recycled",
	69: "limited_edition",
}
View Source
var WriteProtectionMap = map[uint64]string{
	0: "no",
	1: "irreversible",
	2: "protect_page_unlockable",
}

Functions

func BrandUUID

func BrandUUID(brandName string) uuid.UUID

BrandUUID returns a properly formed brand UUID for the given brand name

func MaterialPackageInstanceUUID

func MaterialPackageInstanceUUID(NFCTagUid []byte) (uuid.UUID, error)

MaterialPackageInstanceUUID returns a properly formed instance UUID from the NFC tag UID. Errors are generated if the NFC Tag UID is not proper by spec (8 bytes starting 0x0e)

func MaterialPackageUUID

func MaterialPackageUUID(gtin string, brandUUID uuid.UUID) uuid.UUID

MaterialPackageUUID returns a properly formed package ID from the gtin. The associated brand UUID must also be passed

func MaterialUUID

func MaterialUUID(materialName string, brandUUID uuid.UUID) uuid.UUID

MaterialUUID returns a properly formed material UUID for the given material name. The associated brand UUID must also be passed

Types

type AssertionError

type AssertionError struct {
	// contains filtered or unexported fields
}

func (AssertionError) Error

func (a AssertionError) Error() string

type AuxRegion

type AuxRegion struct {
	// contains filtered or unexported fields
}

func (*AuxRegion) ClearConsumedWeight

func (s *AuxRegion) ClearConsumedWeight() *AuxRegion

ClearConsumedWeight Clears the value of consumed_weight (0)

func (*AuxRegion) ClearGeneralPurposeRangeUser

func (s *AuxRegion) ClearGeneralPurposeRangeUser() *AuxRegion

ClearGeneralPurposeRangeUser Clears the value of general_purpose_range_user (2)

func (*AuxRegion) ClearLastStirTime

func (s *AuxRegion) ClearLastStirTime() *AuxRegion

ClearLastStirTime Clears the value of last_stir_time (3)

func (*AuxRegion) ClearPurchaseCurrency

func (s *AuxRegion) ClearPurchaseCurrency() *AuxRegion

ClearPurchaseCurrency Clears the value of purchase_currency (7)

func (*AuxRegion) ClearPurchasePrice

func (s *AuxRegion) ClearPurchasePrice() *AuxRegion

ClearPurchasePrice Clears the value of purchase_price (6)

func (*AuxRegion) ClearPurchaseTime

func (s *AuxRegion) ClearPurchaseTime() *AuxRegion

ClearPurchaseTime Clears the value of purchase_time (5)

func (*AuxRegion) ClearStorageLocation

func (s *AuxRegion) ClearStorageLocation() *AuxRegion

ClearStorageLocation Clears the value of storage_location (4)

func (*AuxRegion) ClearWorkgroup

func (s *AuxRegion) ClearWorkgroup() *AuxRegion

ClearWorkgroup Clears the value of workgroup (1)

func (*AuxRegion) GetConsumedWeight

func (s *AuxRegion) GetConsumedWeight() (float64, bool)

GetConsumedWeight Gets the value of consumed_weight (0)

func (*AuxRegion) GetGeneralPurposeRangeUser

func (s *AuxRegion) GetGeneralPurposeRangeUser() (string, bool)

GetGeneralPurposeRangeUser Gets the value of general_purpose_range_user (2)

func (*AuxRegion) GetLastStirTime

func (s *AuxRegion) GetLastStirTime() (time.Time, bool)

GetLastStirTime Gets the value of last_stir_time (3)

func (*AuxRegion) GetPurchaseCurrency

func (s *AuxRegion) GetPurchaseCurrency() (string, bool)

GetPurchaseCurrency Gets the value of purchase_currency (7)

func (*AuxRegion) GetPurchasePrice

func (s *AuxRegion) GetPurchasePrice() (float64, bool)

GetPurchasePrice Gets the value of purchase_price (6)

func (*AuxRegion) GetPurchaseTime

func (s *AuxRegion) GetPurchaseTime() (time.Time, bool)

GetPurchaseTime Gets the value of purchase_time (5)

func (*AuxRegion) GetStorageLocation

func (s *AuxRegion) GetStorageLocation() (string, bool)

GetStorageLocation Gets the value of storage_location (4)

func (*AuxRegion) GetUnknownFields

func (s *AuxRegion) GetUnknownFields() map[any]any

GetUnknownFields returns a map of all unknown fields For the aux region, this will also include all vendor specific fields

func (*AuxRegion) GetVendorSpecificField

func (s *AuxRegion) GetVendorSpecificField(key uint32) any

GetVendorSpecificFieldKey will return any value found in the tag with the specified key The value is returned as an any type and must be cast (with checking) for use. Returns nil if no such key exists

func (*AuxRegion) GetWorkgroup

func (s *AuxRegion) GetWorkgroup() (string, bool)

GetWorkgroup Gets the value of workgroup (1)

func (AuxRegion) RegionOptions

func (s AuxRegion) RegionOptions() *RegionOptions

RegionOptions accesses encoding options for this region

func (*AuxRegion) SetConsumedWeight

func (s *AuxRegion) SetConsumedWeight(value float64) *AuxRegion

SetConsumedWeight Sets the value of consumed_weight (0)

func (*AuxRegion) SetGeneralPurposeRangeUser

func (s *AuxRegion) SetGeneralPurposeRangeUser(value string) *AuxRegion

SetGeneralPurposeRangeUser Sets the value of general_purpose_range_user (2)

func (*AuxRegion) SetLastStirTime

func (s *AuxRegion) SetLastStirTime(value time.Time) *AuxRegion

SetLastStirTime Sets the value of last_stir_time (3)

func (*AuxRegion) SetPurchaseCurrency

func (s *AuxRegion) SetPurchaseCurrency(value string) *AuxRegion

SetPurchaseCurrency Sets the value of purchase_currency (7)

func (*AuxRegion) SetPurchasePrice

func (s *AuxRegion) SetPurchasePrice(value float64) *AuxRegion

SetPurchasePrice Sets the value of purchase_price (6)

func (*AuxRegion) SetPurchaseTime

func (s *AuxRegion) SetPurchaseTime(value time.Time) *AuxRegion

SetPurchaseTime Sets the value of purchase_time (5)

func (*AuxRegion) SetStorageLocation

func (s *AuxRegion) SetStorageLocation(value string) *AuxRegion

SetStorageLocation Sets the value of storage_location (4)

func (*AuxRegion) SetVendorSpecificField

func (s *AuxRegion) SetVendorSpecificField(key uint32, value any) *AuxRegion

SetVendorSpecificField sets a vendor specific field The value must be encodable in the cbor payload per specification however this is not enforced, which could cause to encoding failure if proper type (string, []byte, int, float) is not used

func (*AuxRegion) SetWorkgroup

func (s *AuxRegion) SetWorkgroup(value string) *AuxRegion

SetWorkgroup Sets the value of workgroup (1)

type CBORContainerType

type CBORContainerType int

CBORContainerType is an encode option that is used to specify definite or indefinite container usage

const (
	// CBORContainerTypeDefinite will result in containers in the region
	// being encoided in definite form
	CBORContainerTypeDefinite CBORContainerType = iota
	// CBORContainerTypeIndefinite will result in containers in the region
	// being encoided in indefinite form
	CBORContainerTypeIndefinite
	// CBORContainerTypeAuto will utilize indefinite containers unless the
	// container is empty, in which case it optimizes to definite for one byte
	// saving
	CBORContainerTypeAuto
)

type ColorLab

type ColorLab [3]float32

func NewColorLab

func NewColorLab(l, a, b float32) ColorLab

NewColorLab will generate a ColorLab value from a string in the form of: #LLaaBB or LLaaBB

func (ColorLab) String

func (c ColorLab) String() string

func (ColorLab) Value

func (c ColorLab) Value() (l, a, b float32)

type ColorRGBA

type ColorRGBA []byte

ColorRGBA represents an RGB (optional A) color and should always be 3 or 4 bytes

func MustNewColor

func MustNewColor(str string) ColorRGBA

MustNewColor creates a new color, and panics in the case of an error

func NewColor

func NewColor(str string) (ColorRGBA, error)

NewColor will generate a ColorRGBA value from a string in the form of: #RRGGBB or #RRGGBBAA or RRGGBB or RRGGBBAA

func (ColorRGBA) MarshalYAML

func (c ColorRGBA) MarshalYAML() (any, error)

MarshalYAML converts ColorRGBA to #RRGGBB(AA) string representation

func (ColorRGBA) String

func (c ColorRGBA) String() string

func (*ColorRGBA) UnmarshalYAML

func (c *ColorRGBA) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML converts YAML form of ColorRBGA back to object

type EncodeDecodeOption

type EncodeDecodeOption int

EncodeDecode option provides options related to binary encoding and decoding

const (
	// WithoutCapabilityContainer instructs the encoder/decoder to encode/decode
	// without the NFC-V capability container, which is useful when writing/reading
	// tags to non-compliant earlier NFC versions
	WithoutCapabilityContainer EncodeDecodeOption = iota
)

type FloatMaxPrecision

type FloatMaxPrecision int

FloatMaxPrecision is an encode option that controls the maximum precision of floating point numbers within a region

const (
	// FloatMaxPrecision64 sets the maximum allowable encoded
	// floating point number representation
	// to 64 bits (high precision)
	FloatMaxPrecision64 FloatMaxPrecision = iota

	// FloatMaxPrecision32 sets the maximum allowable encoded
	// floating point number representation
	// to 32 bits (medium precision, usually fine)
	FloatMaxPrecision32

	// FloatMaxPrecision16 sets the maximum allowable
	// encoded floating point number representation
	// to 16 bits (low precision, very compact but less precise)
	FloatMaxPrecision16
)

type MainRegion

type MainRegion struct {
	// contains filtered or unexported fields
}

func (*MainRegion) ClearActualFullLength

func (s *MainRegion) ClearActualFullLength() *MainRegion

ClearActualFullLength Clears the value of actual_full_length (54)

func (*MainRegion) ClearActualNettoFullWeight

func (s *MainRegion) ClearActualNettoFullWeight() *MainRegion

ClearActualNettoFullWeight Clears the value of actual_netto_full_weight (17)

func (*MainRegion) ClearBrandName

func (s *MainRegion) ClearBrandName() *MainRegion

ClearBrandName Clears the value of brand_name (11) Brand of the material.

func (*MainRegion) ClearBrandSpecificInstanceId

func (s *MainRegion) ClearBrandSpecificInstanceId() *MainRegion

ClearBrandSpecificInstanceId Clears the value of brand_specific_instance_id (5)

func (*MainRegion) ClearBrandSpecificMaterialId

func (s *MainRegion) ClearBrandSpecificMaterialId() *MainRegion

ClearBrandSpecificMaterialId Clears the value of brand_specific_material_id (7)

func (*MainRegion) ClearBrandSpecificPackageId

func (s *MainRegion) ClearBrandSpecificPackageId() *MainRegion

ClearBrandSpecificPackageId Clears the value of brand_specific_package_id (6)

func (*MainRegion) ClearBrandUuid

func (s *MainRegion) ClearBrandUuid() *MainRegion

ClearBrandUuid Clears the value of brand_uuid (3)

func (*MainRegion) ClearCertifications

func (s *MainRegion) ClearCertifications() *MainRegion

ClearCertifications Clears the value of certifications (56) Certifications the material has.

func (*MainRegion) ClearChamberTemperature

func (s *MainRegion) ClearChamberTemperature() *MainRegion

ClearChamberTemperature Clears the value of chamber_temperature (41)

func (*MainRegion) ClearContainerHoleDiameter

func (s *MainRegion) ClearContainerHoleDiameter() *MainRegion

ClearContainerHoleDiameter Clears the value of container_hole_diameter (45)

func (*MainRegion) ClearContainerInnerDiameter

func (s *MainRegion) ClearContainerInnerDiameter() *MainRegion

ClearContainerInnerDiameter Clears the value of container_inner_diameter (44)

func (*MainRegion) ClearContainerOuterDiameter

func (s *MainRegion) ClearContainerOuterDiameter() *MainRegion

ClearContainerOuterDiameter Clears the value of container_outer_diameter (43)

func (*MainRegion) ClearContainerVolumetricCapacity

func (s *MainRegion) ClearContainerVolumetricCapacity() *MainRegion

ClearContainerVolumetricCapacity Clears the value of container_volumetric_capacity (50) Maximum amount of material the container can hold.

func (*MainRegion) ClearContainerWidth

func (s *MainRegion) ClearContainerWidth() *MainRegion

ClearContainerWidth Clears the value of container_width (42)

func (*MainRegion) ClearCountryOfOrigin

func (s *MainRegion) ClearCountryOfOrigin() *MainRegion

ClearCountryOfOrigin Clears the value of country_of_origin (55) 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).

func (*MainRegion) ClearCureWavelength

func (s *MainRegion) ClearCureWavelength() *MainRegion

ClearCureWavelength Clears the value of cure_wavelength (51)

func (*MainRegion) ClearDensity

func (s *MainRegion) ClearDensity() *MainRegion

ClearDensity Clears the value of density (29) Density of the material.

func (*MainRegion) ClearDryingTemperature

func (s *MainRegion) ClearDryingTemperature() *MainRegion

ClearDryingTemperature Clears the value of drying_temperature (57)

func (*MainRegion) ClearDryingTime

func (s *MainRegion) ClearDryingTime() *MainRegion

ClearDryingTime Clears the value of drying_time (58)

func (*MainRegion) ClearEmptyContainerWeight

func (s *MainRegion) ClearEmptyContainerWeight() *MainRegion

ClearEmptyContainerWeight Clears the value of empty_container_weight (18) Weight of the empty container.

func (*MainRegion) ClearExpirationDate

func (s *MainRegion) ClearExpirationDate() *MainRegion

ClearExpirationDate Clears the value of expiration_date (15)

func (*MainRegion) ClearFilamentDiameter

func (s *MainRegion) ClearFilamentDiameter() *MainRegion

ClearFilamentDiameter Clears the value of filament_diameter (30)

func (*MainRegion) ClearGtin

func (s *MainRegion) ClearGtin() *MainRegion

ClearGtin Clears the value of gtin (4) Global Trade Item Number.

func (*MainRegion) ClearInstanceUuid

func (s *MainRegion) ClearInstanceUuid() *MainRegion

ClearInstanceUuid Clears the value of instance_uuid (0)

func (*MainRegion) ClearManufacturedDate

func (s *MainRegion) ClearManufacturedDate() *MainRegion

ClearManufacturedDate Clears the value of manufactured_date (14)

func (*MainRegion) ClearMaterialAbbreviation

func (s *MainRegion) ClearMaterialAbbreviation() *MainRegion

ClearMaterialAbbreviation Clears the value of material_abbreviation (52)

func (*MainRegion) ClearMaterialClass

func (s *MainRegion) ClearMaterialClass() *MainRegion

ClearMaterialClass Clears the value of material_class (8)

func (*MainRegion) ClearMaterialName

func (s *MainRegion) ClearMaterialName() *MainRegion

ClearMaterialName Clears the value of material_name (10)

func (*MainRegion) ClearMaterialType

func (s *MainRegion) ClearMaterialType() *MainRegion

ClearMaterialType Clears the value of material_type (9)

func (*MainRegion) ClearMaterialUuid

func (s *MainRegion) ClearMaterialUuid() *MainRegion

ClearMaterialUuid Clears the value of material_uuid (2)

func (*MainRegion) ClearMaxBedTemperature

func (s *MainRegion) ClearMaxBedTemperature() *MainRegion

ClearMaxBedTemperature Clears the value of max_bed_temperature (38)

func (*MainRegion) ClearMaxChamberTemperature

func (s *MainRegion) ClearMaxChamberTemperature() *MainRegion

ClearMaxChamberTemperature Clears the value of max_chamber_temperature (40)

func (*MainRegion) ClearMaxPrintTemperature

func (s *MainRegion) ClearMaxPrintTemperature() *MainRegion

ClearMaxPrintTemperature Clears the value of max_print_temperature (35)

func (*MainRegion) ClearMinBedTemperature

func (s *MainRegion) ClearMinBedTemperature() *MainRegion

ClearMinBedTemperature Clears the value of min_bed_temperature (37)

func (*MainRegion) ClearMinChamberTemperature

func (s *MainRegion) ClearMinChamberTemperature() *MainRegion

ClearMinChamberTemperature Clears the value of min_chamber_temperature (39)

func (*MainRegion) ClearMinNozzleDiameter

func (s *MainRegion) ClearMinNozzleDiameter() *MainRegion

ClearMinNozzleDiameter Clears the value of min_nozzle_diameter (33)

func (*MainRegion) ClearMinPrintTemperature

func (s *MainRegion) ClearMinPrintTemperature() *MainRegion

ClearMinPrintTemperature Clears the value of min_print_temperature (34)

func (*MainRegion) ClearNominalFullLength

func (s *MainRegion) ClearNominalFullLength() *MainRegion

ClearNominalFullLength Clears the value of nominal_full_length (53)

func (*MainRegion) ClearNominalNettoFullWeight

func (s *MainRegion) ClearNominalNettoFullWeight() *MainRegion

ClearNominalNettoFullWeight Clears the value of nominal_netto_full_weight (16)

func (*MainRegion) ClearPackageUuid

func (s *MainRegion) ClearPackageUuid() *MainRegion

ClearPackageUuid Clears the value of package_uuid (1)

func (*MainRegion) ClearPreheatTemperature

func (s *MainRegion) ClearPreheatTemperature() *MainRegion

ClearPreheatTemperature Clears the value of preheat_temperature (36)

func (*MainRegion) ClearPrimaryColor

func (s *MainRegion) ClearPrimaryColor() *MainRegion

ClearPrimaryColor Clears the value of primary_color (19)

func (*MainRegion) ClearPrimaryColorLab

func (s *MainRegion) ClearPrimaryColorLab() *MainRegion

ClearPrimaryColorLab Clears the value of primary_color_lab (59)

func (*MainRegion) ClearPrimaryColorRal

func (s *MainRegion) ClearPrimaryColorRal() *MainRegion

ClearPrimaryColorRal Clears the value of primary_color_ral (60)

func (*MainRegion) ClearSecondaryColor0

func (s *MainRegion) ClearSecondaryColor0() *MainRegion

ClearSecondaryColor0 Clears the value of secondary_color_0 (20)

func (*MainRegion) ClearSecondaryColor1

func (s *MainRegion) ClearSecondaryColor1() *MainRegion

ClearSecondaryColor1 Clears the value of secondary_color_1 (21) See `secondary_color_0`.

func (*MainRegion) ClearSecondaryColor2

func (s *MainRegion) ClearSecondaryColor2() *MainRegion

ClearSecondaryColor2 Clears the value of secondary_color_2 (22) See `secondary_color_0`.

func (*MainRegion) ClearSecondaryColor3

func (s *MainRegion) ClearSecondaryColor3() *MainRegion

ClearSecondaryColor3 Clears the value of secondary_color_3 (23) See `secondary_color_0`.

func (*MainRegion) ClearSecondaryColor4

func (s *MainRegion) ClearSecondaryColor4() *MainRegion

ClearSecondaryColor4 Clears the value of secondary_color_4 (24) See `secondary_color_0`.

func (*MainRegion) ClearShoreHardnessA

func (s *MainRegion) ClearShoreHardnessA() *MainRegion

ClearShoreHardnessA Clears the value of shore_hardness_a (31)

func (*MainRegion) ClearShoreHardnessD

func (s *MainRegion) ClearShoreHardnessD() *MainRegion

ClearShoreHardnessD Clears the value of shore_hardness_d (32)

func (*MainRegion) ClearTags

func (s *MainRegion) ClearTags() *MainRegion

ClearTags Clears the value of tags (28) Properties of the material. Can have multiple tags at once.

func (*MainRegion) ClearTransmissionDistance

func (s *MainRegion) ClearTransmissionDistance() *MainRegion

ClearTransmissionDistance Clears the value of transmission_distance (27)

func (*MainRegion) ClearViscosity18C

func (s *MainRegion) ClearViscosity18C() *MainRegion

ClearViscosity18C Clears the value of viscosity_18c (46) Viscosity of the material at 18 °C.

func (*MainRegion) ClearViscosity25C

func (s *MainRegion) ClearViscosity25C() *MainRegion

ClearViscosity25C Clears the value of viscosity_25c (47) Viscosity of the material at 25 °C.

func (*MainRegion) ClearViscosity40C

func (s *MainRegion) ClearViscosity40C() *MainRegion

ClearViscosity40C Clears the value of viscosity_40c (48) Viscosity of the material at 40 °C.

func (*MainRegion) ClearViscosity60C

func (s *MainRegion) ClearViscosity60C() *MainRegion

ClearViscosity60C Clears the value of viscosity_60c (49) Viscosity of the material at 60 °C.

func (*MainRegion) ClearWriteProtection

func (s *MainRegion) ClearWriteProtection() *MainRegion

ClearWriteProtection Clears the value of write_protection (13)

func (*MainRegion) GetActualFullLength

func (s *MainRegion) GetActualFullLength() (float64, bool)

GetActualFullLength Gets the value of actual_full_length (54)

func (*MainRegion) GetActualNettoFullWeight

func (s *MainRegion) GetActualNettoFullWeight() (float64, bool)

GetActualNettoFullWeight Gets the value of actual_netto_full_weight (17)

func (*MainRegion) GetBrandName

func (s *MainRegion) GetBrandName() (string, bool)

GetBrandName Gets the value of brand_name (11) Brand of the material.

func (*MainRegion) GetBrandSpecificInstanceId

func (s *MainRegion) GetBrandSpecificInstanceId() (string, bool)

GetBrandSpecificInstanceId Gets the value of brand_specific_instance_id (5)

func (*MainRegion) GetBrandSpecificMaterialId

func (s *MainRegion) GetBrandSpecificMaterialId() (string, bool)

GetBrandSpecificMaterialId Gets the value of brand_specific_material_id (7)

func (*MainRegion) GetBrandSpecificPackageId

func (s *MainRegion) GetBrandSpecificPackageId() (string, bool)

GetBrandSpecificPackageId Gets the value of brand_specific_package_id (6)

func (*MainRegion) GetBrandUuid

func (s *MainRegion) GetBrandUuid() (uuid.UUID, bool)

GetBrandUuid Gets the value of brand_uuid (3)

func (*MainRegion) GetCertifications

func (s *MainRegion) GetCertifications() ([]MaterialCertifications, bool)

GetCertifications Gets the value of certifications (56) Certifications the material has.

func (*MainRegion) GetChamberTemperature

func (s *MainRegion) GetChamberTemperature() (int, bool)

GetChamberTemperature Gets the value of chamber_temperature (41)

func (*MainRegion) GetContainerHoleDiameter

func (s *MainRegion) GetContainerHoleDiameter() (int, bool)

GetContainerHoleDiameter Gets the value of container_hole_diameter (45)

func (*MainRegion) GetContainerInnerDiameter

func (s *MainRegion) GetContainerInnerDiameter() (int, bool)

GetContainerInnerDiameter Gets the value of container_inner_diameter (44)

func (*MainRegion) GetContainerOuterDiameter

func (s *MainRegion) GetContainerOuterDiameter() (int, bool)

GetContainerOuterDiameter Gets the value of container_outer_diameter (43)

func (*MainRegion) GetContainerVolumetricCapacity

func (s *MainRegion) GetContainerVolumetricCapacity() (float64, bool)

GetContainerVolumetricCapacity Gets the value of container_volumetric_capacity (50) Maximum amount of material the container can hold.

func (*MainRegion) GetContainerWidth

func (s *MainRegion) GetContainerWidth() (int, bool)

GetContainerWidth Gets the value of container_width (42)

func (*MainRegion) GetCountryOfOrigin

func (s *MainRegion) GetCountryOfOrigin() (string, bool)

GetCountryOfOrigin Gets the value of country_of_origin (55) 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).

func (*MainRegion) GetCureWavelength

func (s *MainRegion) GetCureWavelength() (int, bool)

GetCureWavelength Gets the value of cure_wavelength (51)

func (*MainRegion) GetDensity

func (s *MainRegion) GetDensity() (float64, bool)

GetDensity Gets the value of density (29) Density of the material.

func (*MainRegion) GetDryingTemperature

func (s *MainRegion) GetDryingTemperature() (int, bool)

GetDryingTemperature Gets the value of drying_temperature (57)

func (*MainRegion) GetDryingTime

func (s *MainRegion) GetDryingTime() (int, bool)

GetDryingTime Gets the value of drying_time (58)

func (*MainRegion) GetEmptyContainerWeight

func (s *MainRegion) GetEmptyContainerWeight() (float64, bool)

GetEmptyContainerWeight Gets the value of empty_container_weight (18) Weight of the empty container.

func (*MainRegion) GetExpirationDate

func (s *MainRegion) GetExpirationDate() (time.Time, bool)

GetExpirationDate Gets the value of expiration_date (15)

func (*MainRegion) GetFilamentDiameter

func (s *MainRegion) GetFilamentDiameter() (float64, bool)

GetFilamentDiameter Gets the value of filament_diameter (30)

func (*MainRegion) GetGtin

func (s *MainRegion) GetGtin() (uint64, bool)

GetGtin Gets the value of gtin (4) Global Trade Item Number.

func (*MainRegion) GetInstanceUuid

func (s *MainRegion) GetInstanceUuid() (uuid.UUID, bool)

GetInstanceUuid Gets the value of instance_uuid (0)

func (*MainRegion) GetManufacturedDate

func (s *MainRegion) GetManufacturedDate() (time.Time, bool)

GetManufacturedDate Gets the value of manufactured_date (14)

func (*MainRegion) GetMaterialAbbreviation

func (s *MainRegion) GetMaterialAbbreviation() (string, bool)

GetMaterialAbbreviation Gets the value of material_abbreviation (52)

func (*MainRegion) GetMaterialClass

func (s *MainRegion) GetMaterialClass() (MaterialClass, bool)

GetMaterialClass Gets the value of material_class (8)

func (*MainRegion) GetMaterialName

func (s *MainRegion) GetMaterialName() (string, bool)

GetMaterialName Gets the value of material_name (10)

func (*MainRegion) GetMaterialType

func (s *MainRegion) GetMaterialType() (MaterialType, bool)

GetMaterialType Gets the value of material_type (9)

func (*MainRegion) GetMaterialUuid

func (s *MainRegion) GetMaterialUuid() (uuid.UUID, bool)

GetMaterialUuid Gets the value of material_uuid (2)

func (*MainRegion) GetMaxBedTemperature

func (s *MainRegion) GetMaxBedTemperature() (int, bool)

GetMaxBedTemperature Gets the value of max_bed_temperature (38)

func (*MainRegion) GetMaxChamberTemperature

func (s *MainRegion) GetMaxChamberTemperature() (int, bool)

GetMaxChamberTemperature Gets the value of max_chamber_temperature (40)

func (*MainRegion) GetMaxPrintTemperature

func (s *MainRegion) GetMaxPrintTemperature() (int, bool)

GetMaxPrintTemperature Gets the value of max_print_temperature (35)

func (*MainRegion) GetMinBedTemperature

func (s *MainRegion) GetMinBedTemperature() (int, bool)

GetMinBedTemperature Gets the value of min_bed_temperature (37)

func (*MainRegion) GetMinChamberTemperature

func (s *MainRegion) GetMinChamberTemperature() (int, bool)

GetMinChamberTemperature Gets the value of min_chamber_temperature (39)

func (*MainRegion) GetMinNozzleDiameter

func (s *MainRegion) GetMinNozzleDiameter() (float64, bool)

GetMinNozzleDiameter Gets the value of min_nozzle_diameter (33)

func (*MainRegion) GetMinPrintTemperature

func (s *MainRegion) GetMinPrintTemperature() (int, bool)

GetMinPrintTemperature Gets the value of min_print_temperature (34)

func (*MainRegion) GetNominalFullLength

func (s *MainRegion) GetNominalFullLength() (float64, bool)

GetNominalFullLength Gets the value of nominal_full_length (53)

func (*MainRegion) GetNominalNettoFullWeight

func (s *MainRegion) GetNominalNettoFullWeight() (float64, bool)

GetNominalNettoFullWeight Gets the value of nominal_netto_full_weight (16)

func (*MainRegion) GetPackageUuid

func (s *MainRegion) GetPackageUuid() (uuid.UUID, bool)

GetPackageUuid Gets the value of package_uuid (1)

func (*MainRegion) GetPreheatTemperature

func (s *MainRegion) GetPreheatTemperature() (int, bool)

GetPreheatTemperature Gets the value of preheat_temperature (36)

func (*MainRegion) GetPrimaryColor

func (s *MainRegion) GetPrimaryColor() (ColorRGBA, bool)

GetPrimaryColor Gets the value of primary_color (19)

func (*MainRegion) GetPrimaryColorLab

func (s *MainRegion) GetPrimaryColorLab() (ColorLab, bool)

GetPrimaryColorLab Gets the value of primary_color_lab (59)

func (*MainRegion) GetPrimaryColorRal

func (s *MainRegion) GetPrimaryColorRal() (string, bool)

GetPrimaryColorRal Gets the value of primary_color_ral (60)

func (*MainRegion) GetSecondaryColor0

func (s *MainRegion) GetSecondaryColor0() (ColorRGBA, bool)

GetSecondaryColor0 Gets the value of secondary_color_0 (20)

func (*MainRegion) GetSecondaryColor1

func (s *MainRegion) GetSecondaryColor1() (ColorRGBA, bool)

GetSecondaryColor1 Gets the value of secondary_color_1 (21) See `secondary_color_0`.

func (*MainRegion) GetSecondaryColor2

func (s *MainRegion) GetSecondaryColor2() (ColorRGBA, bool)

GetSecondaryColor2 Gets the value of secondary_color_2 (22) See `secondary_color_0`.

func (*MainRegion) GetSecondaryColor3

func (s *MainRegion) GetSecondaryColor3() (ColorRGBA, bool)

GetSecondaryColor3 Gets the value of secondary_color_3 (23) See `secondary_color_0`.

func (*MainRegion) GetSecondaryColor4

func (s *MainRegion) GetSecondaryColor4() (ColorRGBA, bool)

GetSecondaryColor4 Gets the value of secondary_color_4 (24) See `secondary_color_0`.

func (*MainRegion) GetShoreHardnessA

func (s *MainRegion) GetShoreHardnessA() (int, bool)

GetShoreHardnessA Gets the value of shore_hardness_a (31)

func (*MainRegion) GetShoreHardnessD

func (s *MainRegion) GetShoreHardnessD() (int, bool)

GetShoreHardnessD Gets the value of shore_hardness_d (32)

func (*MainRegion) GetTags

func (s *MainRegion) GetTags() ([]Tag, bool)

GetTags Gets the value of tags (28) Properties of the material. Can have multiple tags at once.

func (*MainRegion) GetTransmissionDistance

func (s *MainRegion) GetTransmissionDistance() (float64, bool)

GetTransmissionDistance Gets the value of transmission_distance (27)

func (*MainRegion) GetUnknownFields

func (s *MainRegion) GetUnknownFields() map[any]any

GetUnknownFields returns a map of all unknown fields For the aux region, this will also include all vendor specific fields

func (*MainRegion) GetViscosity18C

func (s *MainRegion) GetViscosity18C() (float64, bool)

GetViscosity18C Gets the value of viscosity_18c (46) Viscosity of the material at 18 °C.

func (*MainRegion) GetViscosity25C

func (s *MainRegion) GetViscosity25C() (float64, bool)

GetViscosity25C Gets the value of viscosity_25c (47) Viscosity of the material at 25 °C.

func (*MainRegion) GetViscosity40C

func (s *MainRegion) GetViscosity40C() (float64, bool)

GetViscosity40C Gets the value of viscosity_40c (48) Viscosity of the material at 40 °C.

func (*MainRegion) GetViscosity60C

func (s *MainRegion) GetViscosity60C() (float64, bool)

GetViscosity60C Gets the value of viscosity_60c (49) Viscosity of the material at 60 °C.

func (*MainRegion) GetWriteProtection

func (s *MainRegion) GetWriteProtection() (WriteProtection, bool)

GetWriteProtection Gets the value of write_protection (13)

func (MainRegion) RegionOptions

func (s MainRegion) RegionOptions() *RegionOptions

RegionOptions accesses encoding options for this region

func (*MainRegion) SetActualFullLength

func (s *MainRegion) SetActualFullLength(value float64) *MainRegion

SetActualFullLength Sets the value of actual_full_length (54)

func (*MainRegion) SetActualNettoFullWeight

func (s *MainRegion) SetActualNettoFullWeight(value float64) *MainRegion

SetActualNettoFullWeight Sets the value of actual_netto_full_weight (17)

func (*MainRegion) SetBrandName

func (s *MainRegion) SetBrandName(value string) *MainRegion

SetBrandName Sets the value of brand_name (11) Brand of the material.

func (*MainRegion) SetBrandSpecificInstanceId

func (s *MainRegion) SetBrandSpecificInstanceId(value string) *MainRegion

SetBrandSpecificInstanceId Sets the value of brand_specific_instance_id (5)

func (*MainRegion) SetBrandSpecificMaterialId

func (s *MainRegion) SetBrandSpecificMaterialId(value string) *MainRegion

SetBrandSpecificMaterialId Sets the value of brand_specific_material_id (7)

func (*MainRegion) SetBrandSpecificPackageId

func (s *MainRegion) SetBrandSpecificPackageId(value string) *MainRegion

SetBrandSpecificPackageId Sets the value of brand_specific_package_id (6)

func (*MainRegion) SetBrandUuid

func (s *MainRegion) SetBrandUuid(value uuid.UUID) *MainRegion

SetBrandUuid Sets the value of brand_uuid (3)

func (*MainRegion) SetCertifications

func (s *MainRegion) SetCertifications(value []MaterialCertifications) *MainRegion

SetCertifications Sets the value of certifications (56) Certifications the material has.

func (*MainRegion) SetChamberTemperature

func (s *MainRegion) SetChamberTemperature(value int) *MainRegion

SetChamberTemperature Sets the value of chamber_temperature (41)

func (*MainRegion) SetContainerHoleDiameter

func (s *MainRegion) SetContainerHoleDiameter(value int) *MainRegion

SetContainerHoleDiameter Sets the value of container_hole_diameter (45)

func (*MainRegion) SetContainerInnerDiameter

func (s *MainRegion) SetContainerInnerDiameter(value int) *MainRegion

SetContainerInnerDiameter Sets the value of container_inner_diameter (44)

func (*MainRegion) SetContainerOuterDiameter

func (s *MainRegion) SetContainerOuterDiameter(value int) *MainRegion

SetContainerOuterDiameter Sets the value of container_outer_diameter (43)

func (*MainRegion) SetContainerVolumetricCapacity

func (s *MainRegion) SetContainerVolumetricCapacity(value float64) *MainRegion

SetContainerVolumetricCapacity Sets the value of container_volumetric_capacity (50) Maximum amount of material the container can hold.

func (*MainRegion) SetContainerWidth

func (s *MainRegion) SetContainerWidth(value int) *MainRegion

SetContainerWidth Sets the value of container_width (42)

func (*MainRegion) SetCountryOfOrigin

func (s *MainRegion) SetCountryOfOrigin(value string) *MainRegion

SetCountryOfOrigin Sets the value of country_of_origin (55) 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).

func (*MainRegion) SetCureWavelength

func (s *MainRegion) SetCureWavelength(value int) *MainRegion

SetCureWavelength Sets the value of cure_wavelength (51)

func (*MainRegion) SetDensity

func (s *MainRegion) SetDensity(value float64) *MainRegion

SetDensity Sets the value of density (29) Density of the material.

func (*MainRegion) SetDryingTemperature

func (s *MainRegion) SetDryingTemperature(value int) *MainRegion

SetDryingTemperature Sets the value of drying_temperature (57)

func (*MainRegion) SetDryingTime

func (s *MainRegion) SetDryingTime(value int) *MainRegion

SetDryingTime Sets the value of drying_time (58)

func (*MainRegion) SetEmptyContainerWeight

func (s *MainRegion) SetEmptyContainerWeight(value float64) *MainRegion

SetEmptyContainerWeight Sets the value of empty_container_weight (18) Weight of the empty container.

func (*MainRegion) SetExpirationDate

func (s *MainRegion) SetExpirationDate(value time.Time) *MainRegion

SetExpirationDate Sets the value of expiration_date (15)

func (*MainRegion) SetFilamentDiameter

func (s *MainRegion) SetFilamentDiameter(value float64) *MainRegion

SetFilamentDiameter Sets the value of filament_diameter (30)

func (*MainRegion) SetGtin

func (s *MainRegion) SetGtin(value uint64) *MainRegion

SetGtin Sets the value of gtin (4) Global Trade Item Number.

func (*MainRegion) SetInstanceUuid

func (s *MainRegion) SetInstanceUuid(value uuid.UUID) *MainRegion

SetInstanceUuid Sets the value of instance_uuid (0)

func (*MainRegion) SetManufacturedDate

func (s *MainRegion) SetManufacturedDate(value time.Time) *MainRegion

SetManufacturedDate Sets the value of manufactured_date (14)

func (*MainRegion) SetMaterialAbbreviation

func (s *MainRegion) SetMaterialAbbreviation(value string) *MainRegion

SetMaterialAbbreviation Sets the value of material_abbreviation (52)

func (*MainRegion) SetMaterialClass

func (s *MainRegion) SetMaterialClass(value MaterialClass) *MainRegion

SetMaterialClass Sets the value of material_class (8)

func (*MainRegion) SetMaterialName

func (s *MainRegion) SetMaterialName(value string) *MainRegion

SetMaterialName Sets the value of material_name (10)

func (*MainRegion) SetMaterialType

func (s *MainRegion) SetMaterialType(value MaterialType) *MainRegion

SetMaterialType Sets the value of material_type (9)

func (*MainRegion) SetMaterialUuid

func (s *MainRegion) SetMaterialUuid(value uuid.UUID) *MainRegion

SetMaterialUuid Sets the value of material_uuid (2)

func (*MainRegion) SetMaxBedTemperature

func (s *MainRegion) SetMaxBedTemperature(value int) *MainRegion

SetMaxBedTemperature Sets the value of max_bed_temperature (38)

func (*MainRegion) SetMaxChamberTemperature

func (s *MainRegion) SetMaxChamberTemperature(value int) *MainRegion

SetMaxChamberTemperature Sets the value of max_chamber_temperature (40)

func (*MainRegion) SetMaxPrintTemperature

func (s *MainRegion) SetMaxPrintTemperature(value int) *MainRegion

SetMaxPrintTemperature Sets the value of max_print_temperature (35)

func (*MainRegion) SetMinBedTemperature

func (s *MainRegion) SetMinBedTemperature(value int) *MainRegion

SetMinBedTemperature Sets the value of min_bed_temperature (37)

func (*MainRegion) SetMinChamberTemperature

func (s *MainRegion) SetMinChamberTemperature(value int) *MainRegion

SetMinChamberTemperature Sets the value of min_chamber_temperature (39)

func (*MainRegion) SetMinNozzleDiameter

func (s *MainRegion) SetMinNozzleDiameter(value float64) *MainRegion

SetMinNozzleDiameter Sets the value of min_nozzle_diameter (33)

func (*MainRegion) SetMinPrintTemperature

func (s *MainRegion) SetMinPrintTemperature(value int) *MainRegion

SetMinPrintTemperature Sets the value of min_print_temperature (34)

func (*MainRegion) SetNominalFullLength

func (s *MainRegion) SetNominalFullLength(value float64) *MainRegion

SetNominalFullLength Sets the value of nominal_full_length (53)

func (*MainRegion) SetNominalNettoFullWeight

func (s *MainRegion) SetNominalNettoFullWeight(value float64) *MainRegion

SetNominalNettoFullWeight Sets the value of nominal_netto_full_weight (16)

func (*MainRegion) SetPackageUuid

func (s *MainRegion) SetPackageUuid(value uuid.UUID) *MainRegion

SetPackageUuid Sets the value of package_uuid (1)

func (*MainRegion) SetPreheatTemperature

func (s *MainRegion) SetPreheatTemperature(value int) *MainRegion

SetPreheatTemperature Sets the value of preheat_temperature (36)

func (*MainRegion) SetPrimaryColor

func (s *MainRegion) SetPrimaryColor(value ColorRGBA) *MainRegion

SetPrimaryColor Sets the value of primary_color (19)

func (*MainRegion) SetPrimaryColorLab

func (s *MainRegion) SetPrimaryColorLab(value ColorLab) *MainRegion

SetPrimaryColorLab Sets the value of primary_color_lab (59)

func (*MainRegion) SetPrimaryColorRal

func (s *MainRegion) SetPrimaryColorRal(value string) *MainRegion

SetPrimaryColorRal Sets the value of primary_color_ral (60)

func (*MainRegion) SetSecondaryColor0

func (s *MainRegion) SetSecondaryColor0(value ColorRGBA) *MainRegion

SetSecondaryColor0 Sets the value of secondary_color_0 (20)

func (*MainRegion) SetSecondaryColor1

func (s *MainRegion) SetSecondaryColor1(value ColorRGBA) *MainRegion

SetSecondaryColor1 Sets the value of secondary_color_1 (21) See `secondary_color_0`.

func (*MainRegion) SetSecondaryColor2

func (s *MainRegion) SetSecondaryColor2(value ColorRGBA) *MainRegion

SetSecondaryColor2 Sets the value of secondary_color_2 (22) See `secondary_color_0`.

func (*MainRegion) SetSecondaryColor3

func (s *MainRegion) SetSecondaryColor3(value ColorRGBA) *MainRegion

SetSecondaryColor3 Sets the value of secondary_color_3 (23) See `secondary_color_0`.

func (*MainRegion) SetSecondaryColor4

func (s *MainRegion) SetSecondaryColor4(value ColorRGBA) *MainRegion

SetSecondaryColor4 Sets the value of secondary_color_4 (24) See `secondary_color_0`.

func (*MainRegion) SetShoreHardnessA

func (s *MainRegion) SetShoreHardnessA(value int) *MainRegion

SetShoreHardnessA Sets the value of shore_hardness_a (31)

func (*MainRegion) SetShoreHardnessD

func (s *MainRegion) SetShoreHardnessD(value int) *MainRegion

SetShoreHardnessD Sets the value of shore_hardness_d (32)

func (*MainRegion) SetTags

func (s *MainRegion) SetTags(value []Tag) *MainRegion

SetTags Sets the value of tags (28) Properties of the material. Can have multiple tags at once.

func (*MainRegion) SetTransmissionDistance

func (s *MainRegion) SetTransmissionDistance(value float64) *MainRegion

SetTransmissionDistance Sets the value of transmission_distance (27)

func (*MainRegion) SetViscosity18C

func (s *MainRegion) SetViscosity18C(value float64) *MainRegion

SetViscosity18C Sets the value of viscosity_18c (46) Viscosity of the material at 18 °C.

func (*MainRegion) SetViscosity25C

func (s *MainRegion) SetViscosity25C(value float64) *MainRegion

SetViscosity25C Sets the value of viscosity_25c (47) Viscosity of the material at 25 °C.

func (*MainRegion) SetViscosity40C

func (s *MainRegion) SetViscosity40C(value float64) *MainRegion

SetViscosity40C Sets the value of viscosity_40c (48) Viscosity of the material at 40 °C.

func (*MainRegion) SetViscosity60C

func (s *MainRegion) SetViscosity60C(value float64) *MainRegion

SetViscosity60C Sets the value of viscosity_60c (49) Viscosity of the material at 60 °C.

func (*MainRegion) SetWriteProtection

func (s *MainRegion) SetWriteProtection(value WriteProtection) *MainRegion

SetWriteProtection Sets the value of write_protection (13)

type MaterialCertifications

type MaterialCertifications uint64
const (
	// MaterialCertificationsUl2818
	MaterialCertificationsUl2818 MaterialCertifications = 0

	// MaterialCertificationsUl94V0
	MaterialCertificationsUl94V0 MaterialCertifications = 1

	// MaterialCertificationsUl2904
	// Certifies that a 3D printing filament produces VOC and ultrafine particle emissions below safe thresholds when printed, making it safer for indoor use.
	MaterialCertificationsUl2904 MaterialCertifications = 2
)

func (MaterialCertifications) MarshalYAML

func (e MaterialCertifications) MarshalYAML() (any, error)

func (MaterialCertifications) String

func (e MaterialCertifications) String() string

func (*MaterialCertifications) UnmarshalYAML

func (e *MaterialCertifications) UnmarshalYAML(value *yaml.Node) error

type MaterialClass

type MaterialClass uint64
const (
	// MaterialClassFFF
	// Filament
	MaterialClassFFF MaterialClass = 0

	// MaterialClassSLA
	// Resin
	MaterialClassSLA MaterialClass = 1
)

func (MaterialClass) MarshalYAML

func (e MaterialClass) MarshalYAML() (any, error)

func (MaterialClass) String

func (e MaterialClass) String() string

func (*MaterialClass) UnmarshalYAML

func (e *MaterialClass) UnmarshalYAML(value *yaml.Node) error

type MaterialType

type MaterialType uint64
const (
	// MaterialTypePLA
	// Polylactic Acid
	// Easy-to-print, biodegradable material. Ideal for beginners, prototypes, and models.
	MaterialTypePLA MaterialType = 0

	// MaterialTypePETG
	// Polyethylene Terephthalate Glycol
	// Durable, strong, and temperature-resistant. Great for mechanical parts and functional prints.
	MaterialTypePETG MaterialType = 1

	// MaterialTypeTPU
	// Thermoplastic Polyurethane
	// A flexible, rubber-like material. Used for phone cases, vibration dampeners, and other soft parts.
	MaterialTypeTPU MaterialType = 2

	// MaterialTypeABS
	// Acrylonitrile Butadiene Styrene
	// Strong, durable, and heat-resistant plastic. Used for functional parts like car interiors and LEGOs. Requires a heated bed and enclosure.
	MaterialTypeABS MaterialType = 3

	// MaterialTypeASA
	// Acrylonitrile Styrene Acrylate
	// Similar to ABS but with high UV and weather resistance, making it perfect for outdoor applications.
	MaterialTypeASA MaterialType = 4

	// MaterialTypePC
	// Polycarbonate
	// Extremely strong, impact-resistant, and heat-resistant. Used for demanding engineering applications.
	MaterialTypePC MaterialType = 5

	// MaterialTypePCTG
	// Polycyclohexylenedimethylene Terephthalate Glycol
	// A tougher alternative to PETG with higher impact and chemical resistance.
	MaterialTypePCTG MaterialType = 6

	// MaterialTypePP
	// Polypropylene
	// Lightweight, chemically resistant, and flexible. Used for creating living hinges and durable containers.
	MaterialTypePP MaterialType = 7

	// MaterialTypePA6
	// Polyamide 6
	// A type of Nylon that is tough and wear-resistant but absorbs more moisture than other nylons.
	MaterialTypePA6 MaterialType = 8

	// MaterialTypePA11
	// Polyamide 11
	// A flexible, bio-based Nylon with low moisture absorption and good chemical resistance.
	MaterialTypePA11 MaterialType = 9

	// MaterialTypePA12
	// Polyamide 12
	// The most common Nylon for 3D printing. Strong, tough, with low moisture absorption. Great for functional parts.
	MaterialTypePA12 MaterialType = 10

	// MaterialTypePA612
	// Polyamide 612
	// A semi-flexible Nylon with properties between PA6 and PA12. Offers good toughness and lower moisture absorption than PA6.
	MaterialTypePA612 MaterialType = 42

	// MaterialTypePA66
	// Polyamide 66
	// A stiffer and more heat-resistant Nylon compared to PA6, used for durable mechanical parts.
	MaterialTypePA66 MaterialType = 11

	// MaterialTypeCPE
	// Copolyester
	// A family of strong and dimensionally stable materials (including PETG) known for chemical resistance.
	MaterialTypeCPE MaterialType = 12

	// MaterialTypeTPE
	// Thermoplastic Elastomer
	// A general class of soft, rubbery materials. Softer and more flexible than TPU.
	MaterialTypeTPE MaterialType = 13

	// MaterialTypeHIPS
	// High Impact Polystyrene
	// A lightweight material often used as a dissolvable support material for ABS prints (dissolves in Limonene).
	MaterialTypeHIPS MaterialType = 14

	// MaterialTypePHA
	// Polyhydroxyalkanoate
	// A biodegradable material similar to PLA but with better toughness and flexibility.
	MaterialTypePHA MaterialType = 15

	// MaterialTypePET
	// Polyethylene Terephthalate
	// The same plastic used in water bottles. Strong and food-safe, but less common for printing than PETG.
	MaterialTypePET MaterialType = 16

	// MaterialTypePEI
	// Polyetherimide
	// A high-performance material (also known as Ultem) with excellent thermal and mechanical properties.
	MaterialTypePEI MaterialType = 17

	// MaterialTypePBT
	// Polybutylene Terephthalate
	// An engineering polymer with good heat resistance and electrical insulation properties.
	MaterialTypePBT MaterialType = 18

	// MaterialTypePVB
	// Polyvinyl Butyral
	// Easy to print and can be chemically smoothed with isopropyl alcohol for a glossy finish.
	MaterialTypePVB MaterialType = 19

	// MaterialTypePVA
	// Polyvinyl Alcohol
	// A water-soluble filament used exclusively as a support material for complex prints.
	MaterialTypePVA MaterialType = 20

	// MaterialTypePEKK
	// Polyetherketoneketone
	// An ultra-high-performance polymer with exceptional heat, chemical, and mechanical properties for industrial use.
	MaterialTypePEKK MaterialType = 21

	// MaterialTypePEEK
	// Polyether Ether Ketone
	// An ultra-high-performance polymer with exceptional mechanical, thermal, and chemical resistance. Used in demanding aerospace, medical, and industrial applications.
	MaterialTypePEEK MaterialType = 22

	// MaterialTypeBVOH
	// Butenediol Vinyl Alcohol Copolymer
	// A water-soluble support material that often dissolves faster and is easier to print than PVA.
	MaterialTypeBVOH MaterialType = 23

	// MaterialTypeTPC
	// Thermoplastic Copolyester
	// A flexible, TPE-like material with good thermal and chemical resistance.
	MaterialTypeTPC MaterialType = 24

	// MaterialTypePPS
	// Polyphenylene Sulfide
	// A high-performance polymer known for its thermal stability and chemical resistance, often used in automotive and electronics.
	MaterialTypePPS MaterialType = 25

	// MaterialTypePPSU
	// Polyphenylsulfone
	// A high-performance material with excellent heat and chemical resistance, often used in medical applications.
	MaterialTypePPSU MaterialType = 26

	// MaterialTypePVC
	// Polyvinyl Chloride
	// Strong and durable but rarely used in 3D printing due to the release of toxic fumes.
	MaterialTypePVC MaterialType = 27

	// MaterialTypePEBA
	// Polyether Block Amide
	// A flexible and lightweight TPE known for its excellent energy return, used in sports equipment.
	MaterialTypePEBA MaterialType = 28

	// MaterialTypePVDF
	// Polyvinylidene Fluoride
	// High-performance polymer with excellent resistance to chemicals and UV light.
	MaterialTypePVDF MaterialType = 29

	// MaterialTypePPA
	// Polyphthalamide
	// A high-performance Nylon with superior strength, stiffness, and heat resistance compared to standard Nylons.
	MaterialTypePPA MaterialType = 30

	// MaterialTypePCL
	// Polycaprolactone
	// A biodegradable polyester with a very low melting point (~60 °C), allowing it to be reshaped by hand in hot water.
	MaterialTypePCL MaterialType = 31

	// MaterialTypePES
	// Polyethersulfone
	// A high-temperature, amorphous polymer with good chemical and hydrolytic stability.
	MaterialTypePES MaterialType = 32

	// MaterialTypePMMA
	// Polymethyl Methacrylate
	// A rigid, transparent material also known as acrylic. Offers good optical clarity.
	MaterialTypePMMA MaterialType = 33

	// MaterialTypePOM
	// Polyoxymethylene
	// A low-friction, rigid material also known as Delrin. Excellent for gears, bearings, and moving parts.
	MaterialTypePOM MaterialType = 34

	// MaterialTypePPE
	// Polyphenylene Ether
	// An engineering thermoplastic with good temperature resistance and dimensional stability, often used in blends.
	MaterialTypePPE MaterialType = 35

	// MaterialTypePS
	// Polystyrene
	// A lightweight and brittle material. Not commonly used in its pure form for 3D printing.
	MaterialTypePS MaterialType = 36

	// MaterialTypePSU
	// Polysulfone
	// A high-temperature material with good thermal stability and chemical resistance.
	MaterialTypePSU MaterialType = 37

	// MaterialTypeTPI
	// Thermoplastic Polyimide
	// An ultra-high-performance polymer with one of the highest glass transition temperatures and excellent thermal stability.
	MaterialTypeTPI MaterialType = 38

	// MaterialTypeSBS
	// Styrene-Butadiene-Styrene
	// A flexible, rubber-like material (a type of TPE) known for good durability. It is relatively easy to print for a flexible filament.
	MaterialTypeSBS MaterialType = 39

	// MaterialTypeOBC
	// Olefin Block Copolymer
	// A lightweight flexible material that has good dimensional stability and is weather, UV, and chemical resistant.
	MaterialTypeOBC MaterialType = 40

	// MaterialTypeEVA
	// Ethylene Vinyl Acetate
	// A flexible, soft material with rubber-like properties, known for its toughness and resistance to UV radiation and stress cracking.
	MaterialTypeEVA MaterialType = 41
)

func (MaterialType) MarshalYAML

func (e MaterialType) MarshalYAML() (any, error)

func (MaterialType) String

func (e MaterialType) String() string

func (*MaterialType) UnmarshalYAML

func (e *MaterialType) UnmarshalYAML(value *yaml.Node) error

type MetaRegion

type MetaRegion struct {
	// contains filtered or unexported fields
}

func (*MetaRegion) ClearAuxRegionOffset

func (s *MetaRegion) ClearAuxRegionOffset() *MetaRegion

ClearAuxRegionOffset Clears the value of aux_region_offset (2)

func (*MetaRegion) ClearAuxRegionSize

func (s *MetaRegion) ClearAuxRegionSize() *MetaRegion

ClearAuxRegionSize Clears the value of aux_region_size (3)

func (*MetaRegion) ClearMainRegionOffset

func (s *MetaRegion) ClearMainRegionOffset() *MetaRegion

ClearMainRegionOffset Clears the value of main_region_offset (0)

func (*MetaRegion) ClearMainRegionSize

func (s *MetaRegion) ClearMainRegionSize() *MetaRegion

ClearMainRegionSize Clears the value of main_region_size (1)

func (*MetaRegion) GetAuxRegionOffset

func (s *MetaRegion) GetAuxRegionOffset() (int, bool)

GetAuxRegionOffset Gets the value of aux_region_offset (2)

func (*MetaRegion) GetAuxRegionSize

func (s *MetaRegion) GetAuxRegionSize() (int, bool)

GetAuxRegionSize Gets the value of aux_region_size (3)

func (*MetaRegion) GetMainRegionOffset

func (s *MetaRegion) GetMainRegionOffset() (int, bool)

GetMainRegionOffset Gets the value of main_region_offset (0)

func (*MetaRegion) GetMainRegionSize

func (s *MetaRegion) GetMainRegionSize() (int, bool)

GetMainRegionSize Gets the value of main_region_size (1)

func (*MetaRegion) GetUnknownFields

func (s *MetaRegion) GetUnknownFields() map[any]any

GetUnknownFields returns a map of all unknown fields For the aux region, this will also include all vendor specific fields

func (MetaRegion) RegionOptions

func (s MetaRegion) RegionOptions() *RegionOptions

RegionOptions accesses encoding options for this region

func (*MetaRegion) SetAuxRegionOffset

func (s *MetaRegion) SetAuxRegionOffset(value int) *MetaRegion

SetAuxRegionOffset Sets the value of aux_region_offset (2)

func (*MetaRegion) SetAuxRegionSize

func (s *MetaRegion) SetAuxRegionSize(value int) *MetaRegion

SetAuxRegionSize Sets the value of aux_region_size (3)

func (*MetaRegion) SetMainRegionOffset

func (s *MetaRegion) SetMainRegionOffset(value int) *MetaRegion

SetMainRegionOffset Sets the value of main_region_offset (0)

func (*MetaRegion) SetMainRegionSize

func (s *MetaRegion) SetMainRegionSize(value int) *MetaRegion

SetMainRegionSize Sets the value of main_region_size (1)

type OpenPrintTag

type OpenPrintTag struct {
	// contains filtered or unexported fields
}

OpenPrintTag is the primary type, representing an open print tag with the ability to encode, decode, modify and so forth

func Decode

func Decode(data []byte, opts ...EncodeDecodeOption) (opt *OpenPrintTag, err error)

Decode reads a raw tag binary and returns the OpenPrintTag struct representation

func FromYAML

func FromYAML(yamlData string) (*OpenPrintTag, error)

FromYAML reads a tag from YAML representation

func NewOpenPrintTag

func NewOpenPrintTag() *OpenPrintTag

NewOpenPrintTag creates a new, blank, open print tag

func (*OpenPrintTag) AuxRegion

func (o *OpenPrintTag) AuxRegion() *AuxRegion

Aux region returns the aux region and causes it to be initialized if not already done

func (*OpenPrintTag) Encode

func (o *OpenPrintTag) Encode(opts ...EncodeDecodeOption) (result []byte, err error)

Encode encodes an open print tag into it's binary format Errors returned indicate only a failure to encode the tag, but do not indicate whether or not the tag is valid It is perfectly possible to encode an empty tag without error but for the tag to not be valid (due to missing fields) To check tag validity, use IsValid and OptCheck

func (*OpenPrintTag) GetStats

func (o *OpenPrintTag) GetStats() (*Stats, bool)

GetStats will return the stat data from the last encode operation and true If the tag has not been encoded, it will return nil, false

func (*OpenPrintTag) IsValid

func (o *OpenPrintTag) IsValid() bool

IsValid returns true if the tag has no errors

func (*OpenPrintTag) MainRegion

func (o *OpenPrintTag) MainRegion() *MainRegion

MainRegion returns the main region

func (*OpenPrintTag) Merge

func (o *OpenPrintTag) Merge(other *OpenPrintTag, overwrite bool)

Merge will merge the data from another tag into this tag if overwrite is true, then properties in the source tag will be overwritten by properties set in the source tag, otherwise not

func (*OpenPrintTag) MetaRegion

func (o *OpenPrintTag) MetaRegion() *MetaRegion

MetaRegion returns the meta region

func (*OpenPrintTag) OptCheck

func (o *OpenPrintTag) OptCheck() (errors []string, warnings []string)

OptCheck checks options for warnings and errors in all present regions

func (*OpenPrintTag) RemoveAuxRegion

func (o *OpenPrintTag) RemoveAuxRegion() *OpenPrintTag

RemoveAuxRegion will remove the aux region from the tag

func (*OpenPrintTag) String

func (o *OpenPrintTag) String() string

String gives a string representation of the open print tag which is, in reality, just a full YAML dump

func (*OpenPrintTag) ToYAML

func (o *OpenPrintTag) ToYAML(opts ...YAMLOption) (string, error)

ToYAML returns a YAML representation of the tag with optional options consisting of: IncludeValidation - Includes output from validation IncludeOptCheck - Includes output from opt check IncludeAll - Includes everything

func (*OpenPrintTag) Validate

func (o *OpenPrintTag) Validate() (errors []string, warnings []string)

Validate checks for missing required (error) or recommended (warnings) fields in all regions

func (*OpenPrintTag) WithAuxRegionSize

func (o *OpenPrintTag) WithAuxRegionSize(size int) *OpenPrintTag

WithAuxRegionSize will both trigger the presence of an aux region and set its size

func (*OpenPrintTag) WithBlockSize

func (o *OpenPrintTag) WithBlockSize(blockSize int) *OpenPrintTag

WithBlockSize will set an optional block size (default 4) which can be used to help align the aux region to a block

func (*OpenPrintTag) WithMetaRegionSize

func (o *OpenPrintTag) WithMetaRegionSize(size int) *OpenPrintTag

WithMetaRegionSize sets an optional size for the meta region if not set, the meta region will be encoded at the minimum size possible

func (*OpenPrintTag) WithSize

func (o *OpenPrintTag) WithSize(size int) *OpenPrintTag

WithSize sets the print tag size and must be used when creating a blank tag prior to encoding

func (*OpenPrintTag) WithURIRecord

func (o *OpenPrintTag) WithURIRecord(uri string) *OpenPrintTag

WithURIRecord adds an optional URI record to the tag

type Region

type Region interface {
	GetUnknownFields() map[any]any
	RegionOptions() *RegionOptions
	// contains filtered or unexported methods
}

A Region represents one of the three regions (meta, main, aux) within the open print tag

type RegionOptions

type RegionOptions struct {
	// contains filtered or unexported fields
}

RegionOption contains all options related to the encoding of a tag region

func (*RegionOptions) GetCBORContainerType

func (e *RegionOptions) GetCBORContainerType() CBORContainerType

GetCBORContainerType returns the encoding type for CBOR containers within a region

func (*RegionOptions) GetFloatMaxPrecision

func (e *RegionOptions) GetFloatMaxPrecision() FloatMaxPrecision

GetFloatMaxPrecision returns the maximum floating point precision used when encoding floating point numbers within a region

func (*RegionOptions) SetCBORContainerType

func (e *RegionOptions) SetCBORContainerType(cborContainerType CBORContainerType) *RegionOptions

SetCBORContainerType sets the encoding type for CBOR containers within a region

func (*RegionOptions) SetFloatMaxPrecision

func (e *RegionOptions) SetFloatMaxPrecision(floatMaxPrecision FloatMaxPrecision) *RegionOptions

SetFloatMaxPrecision sets the maximum floating point precision used when encoding floating point numbers within a region

type RegionStat

type RegionStat struct {
	PayloadOffset  int `yaml:"payload_offset"`
	AbsoluteOffset int `yaml:"absolute_offset"`
	Size           int `yaml:"size"`
	UsedSize       int `yaml:"used_size"`
}

type RootStat

type RootStat struct {
	DataSize        int `yaml:"data_size"`
	PayloadSize     int `yaml:"payload_size"`
	Overhead        int `yaml:"overhead"`
	PayloadUsedSize int `yaml:"payload_used_size"`
	TotalUsedSize   int `yaml:"total_used_size"`
}

type Stats

type Stats struct {
	// Root provides information about the root tag
	Root RootStat

	// Meta provides information about the meta region
	Meta RegionStat

	// Main provides information about the main region
	Main RegionStat

	// Aux provides information about the aux region and will be nil
	// if there is no aux region
	Aux *RegionStat
}

type Tag

type Tag uint64
const (
	// TagFiltrationRecommended
	// Releases a higher concentration of unsafe particles/fumes during printing so a HEPA and carbon filter is strongly recommended.
	TagFiltrationRecommended Tag = 0

	// TagBiocompatible
	// Certified biocompatibility (does not cause harmful effects when in contact with the body).
	TagBiocompatible Tag = 1

	// TagHomeCompostable
	// Decomposes into natural elements in a home compost system at ambient temperatures.
	TagHomeCompostable Tag = 61

	// TagIndustriallyCompostable
	// Decomposes into natural elements under specific temperature and microbial conditions in commercial composting facilities.
	TagIndustriallyCompostable Tag = 62

	// TagBioBased
	// Predominantly made from renewable biological resources, like plants.
	TagBioBased Tag = 63

	// TagAntibacterial
	// Has antibacterial properties.
	TagAntibacterial Tag = 2

	// TagAirFiltering
	// Has air filtering properties (absorbs/filters harmful compounds/particles from the air).
	TagAirFiltering Tag = 3

	// TagAbrasive
	// The material is abrasive and requires an abrasive-resistant nozzle.
	TagAbrasive Tag = 4

	// TagFoaming
	// The material increases its volume during extrusion.
	TagFoaming Tag = 5

	// TagCastable
	TagCastable Tag = 67

	// TagSelfExtinguishing
	TagSelfExtinguishing Tag = 6

	// TagParamagnetic
	// The material has paramagnetic properties, meaning that it is (weakly) attracted to magnets.
	TagParamagnetic Tag = 7

	// TagRadiationShielding
	// Has radiation shielding properties.
	TagRadiationShielding Tag = 8

	// TagHighTemperature
	TagHighTemperature Tag = 9

	// TagHighSpeed
	TagHighSpeed Tag = 71

	// TagEsdSafe
	TagEsdSafe Tag = 10

	// TagConductive
	TagConductive Tag = 11

	// TagEmiShielding
	TagEmiShielding Tag = 70

	// TagBlend
	// The material is a blend of multiple polymers or a base polymer with significant additives that alter its properties and may require a specific print profile.
	TagBlend Tag = 12

	// TagWaterSoluble
	// Can be dissolved in water.
	TagWaterSoluble Tag = 13

	// TagIpaSoluble
	// Can be dissolved in IPA (isopropyl alcohol).
	TagIpaSoluble Tag = 14

	// TagLimoneneSoluble
	// Can be dissolved in limonene.
	TagLimoneneSoluble Tag = 15

	// TagLowOutgassing
	// Releases only minimal gas (and vapor) when placed in a vacuum.
	TagLowOutgassing Tag = 64

	// TagMatte
	TagMatte Tag = 16

	// TagSilk
	TagSilk Tag = 17

	// TagTranslucent
	TagTranslucent Tag = 19

	// TagTransparent
	TagTransparent Tag = 20

	// TagWithoutPigments
	TagWithoutPigments Tag = 65

	// TagIridescent
	TagIridescent Tag = 21

	// TagPearlescent
	TagPearlescent Tag = 22

	// TagGlitter
	TagGlitter Tag = 23

	// TagGlowInTheDark
	TagGlowInTheDark Tag = 24

	// TagNeon
	TagNeon Tag = 25

	// TagIlluminescentColorChange
	TagIlluminescentColorChange Tag = 26

	// TagTemperatureColorChange
	TagTemperatureColorChange Tag = 27

	// TagGradualColorChange
	TagGradualColorChange Tag = 28

	// TagCoextruded
	TagCoextruded Tag = 29

	// TagContainsCarbon
	TagContainsCarbon Tag = 30

	// TagContainsCarbonFiber
	TagContainsCarbonFiber Tag = 31

	// TagContainsCarbonNanoTubes
	TagContainsCarbonNanoTubes Tag = 32

	// TagContainsGraphene
	TagContainsGraphene Tag = 72

	// TagContainsGlass
	TagContainsGlass Tag = 33

	// TagContainsGlassFiber
	TagContainsGlassFiber Tag = 34

	// TagContainsKevlar
	TagContainsKevlar Tag = 35

	// TagContainsPtfe
	TagContainsPtfe Tag = 68

	// TagContainsStone
	TagContainsStone Tag = 36

	// TagContainsMagnetite
	TagContainsMagnetite Tag = 37

	// TagContainsOrganicMaterial
	// Contains organic material.
	TagContainsOrganicMaterial Tag = 38

	// TagContainsCork
	// Contains cork.
	TagContainsCork Tag = 39

	// TagContainsWax
	// Contains wax.
	TagContainsWax Tag = 40

	// TagContainsWood
	// Contains wood.
	TagContainsWood Tag = 41

	// TagContainsAlgae
	// Contains algae.
	TagContainsAlgae Tag = 66

	// TagContainsBamboo
	// Contains bamboo.
	TagContainsBamboo Tag = 42

	// TagContainsPine
	// Contains pine.
	TagContainsPine Tag = 43

	// TagContainsCeramic
	// Contains ceramic.
	TagContainsCeramic Tag = 44

	// TagContainsBoronCarbide
	// Contains boron carbide (useful for radiation shielding).
	TagContainsBoronCarbide Tag = 45

	// TagContainsMetal
	// Contains metal. Specific type of metal contained can be expressed by an other tag.
	TagContainsMetal Tag = 46

	// TagContainsBronze
	// Contains bronze.
	TagContainsBronze Tag = 47

	// TagContainsIron
	// Contains iron.
	TagContainsIron Tag = 48

	// TagContainsSteel
	// Contains steel.
	TagContainsSteel Tag = 49

	// TagContainsSilver
	// Contains silver (useful for antibacterial properties).
	TagContainsSilver Tag = 50

	// TagContainsCopper
	// Contains copper.
	TagContainsCopper Tag = 51

	// TagContainsAluminium
	// Contains aluminium.
	TagContainsAluminium Tag = 52

	// TagContainsBrass
	// Contains brass.
	TagContainsBrass Tag = 53

	// TagContainsTungsten
	// Contains Tungsten (useful for radiation shielding).
	TagContainsTungsten Tag = 54

	// TagImitatesWood
	// Imitates wood.
	TagImitatesWood Tag = 55

	// TagImitatesMetal
	// Imitates metal.
	TagImitatesMetal Tag = 56

	// TagImitatesMarble
	// Imitates marble.
	TagImitatesMarble Tag = 57

	// TagImitatesStone
	// Imitates stone.
	TagImitatesStone Tag = 58

	// TagLithophane
	// Specifically designed for lithophaning.
	TagLithophane Tag = 59

	// TagRecycled
	// Part of the material is recycled.
	TagRecycled Tag = 60

	// TagLimitedEdition
	// The material is a limited edition run.
	TagLimitedEdition Tag = 69
)

func (Tag) MarshalYAML

func (e Tag) MarshalYAML() (any, error)

func (Tag) String

func (e Tag) String() string

func (*Tag) UnmarshalYAML

func (e *Tag) UnmarshalYAML(value *yaml.Node) error

type WriteProtection

type WriteProtection uint64
const (
	// WriteProtectionNo
	// The tag is not write protected.
	WriteProtectionNo WriteProtection = 0

	// WriteProtectionIrreversible
	// The tag is irreversibly protected against writing.
	WriteProtectionIrreversible WriteProtection = 1

	// WriteProtectionProtectPageUnlockable
	// The tag is write-protected using the `PROTECT PAGE` command (SLIX2-specific) and is unlockable with a password that is located somewhere on the container.
	WriteProtectionProtectPageUnlockable WriteProtection = 2
)

func (WriteProtection) MarshalYAML

func (e WriteProtection) MarshalYAML() (any, error)

func (WriteProtection) String

func (e WriteProtection) String() string

func (*WriteProtection) UnmarshalYAML

func (e *WriteProtection) UnmarshalYAML(value *yaml.Node) error

type YAMLOption

type YAMLOption int
const (
	IncludeOptCheck YAMLOption = iota
	IncludeValidation
	IncludeRootStats
	IncludeRegionStats
	IncludeURI
	IncludeUUIDs
	IncludeAll
)

type YamlEncoder

type YamlEncoder struct {
	Regions   *regionStats `yaml:"regions,omitempty"`
	Root      *RootStat    `yaml:"root,omitempty"`
	Data      data         `yaml:"data"`
	UriRecord *string      `yaml:"uri,omitempty"`
	Validate  *validate    `yaml:"validate,omitempty"`
	OptCheck  *optcheck    `yaml:"opt_check,omitempty"`
	UUIDS     *uuids       `yaml:"uuids,omitempty"`
}

yamlJsonEncoder provides an encoder/decoder for our open print tag

Directories

Path Synopsis
cmd
optag command
MIT License
MIT License
tagtool/tagtool command
MIT License
MIT License
tagtool/vtag
MIT License
MIT License
internal
codegen command
MIT License
MIT License
codegen/generators
MIT License
MIT License
config
MIT License
MIT License
MIT License
MIT License

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL