Documentation ¶
Index ¶
Constants ¶
const Namespace = "http://schemas.microsoft.com/3dmanufacturing/production/2015/06"
Namespace is the canonical name of this extension.
Variables ¶
var ( ErrUUID = errors.New("UUID MUST be any of the four UUID variants described in IETF RFC 4122") ErrProdRefInNonRoot = errors.New("non-root model file components MUST only reference objects in the same model file") )
Functions ¶
func SetMissingUUIDs ¶
SetMissingUUIDs traverse all the model tree setting all missing UUID attributes.
Types ¶
type BuildAttr ¶
type BuildAttr struct {
UUID string
}
BuildAttr provides a UUID in the root model file build element to ensure that a 3MF package can be tracked across uses by various consumers.
func GetBuildAttr ¶
func (*BuildAttr) Marshal3MF ¶ added in v0.24.0
Marshal3MF encodes the resource attributes.
type ComponentAttr ¶
ObjectAttr provides a UUID in the component element for traceability across 3MF packages.
func GetComponentAttr ¶
func GetComponentAttr(comp *go3mf.Component) *ComponentAttr
func (*ComponentAttr) Marshal3MF ¶ added in v0.24.0
func (u *ComponentAttr) Marshal3MF(_ spec.Encoder, start *xml.StartElement) error
Marshal3MF encodes the resource attributes.
func (ComponentAttr) Namespace ¶ added in v0.24.0
func (ComponentAttr) Namespace() string
func (*ComponentAttr) ObjectPath ¶
func (p *ComponentAttr) ObjectPath() string
ObjectPath returns the Path extension attribute.
func (*ComponentAttr) Unmarshal3MFAttr ¶ added in v0.24.0
func (u *ComponentAttr) Unmarshal3MFAttr(a spec.XMLAttr) error
type ItemAttr ¶
ItemAttr provides a UUID in the item element to ensure that each object can be reliably tracked.
func GetItemAttr ¶
func (*ItemAttr) Marshal3MF ¶ added in v0.24.0
Marshal3MF encodes the resource attributes.
func (*ItemAttr) ObjectPath ¶
ObjectPath returns the Path extension attribute.
type ObjectAttr ¶
type ObjectAttr struct {
UUID string
}
ObjectAttr provides a UUID in the item element for traceability across 3MF packages.
func GetObjectAttr ¶
func GetObjectAttr(obj *go3mf.Object) *ObjectAttr
func (*ObjectAttr) Marshal3MF ¶ added in v0.24.0
func (u *ObjectAttr) Marshal3MF(_ spec.Encoder, start *xml.StartElement) error
Marshal3MF encodes the resource attributes.
func (ObjectAttr) Namespace ¶ added in v0.24.0
func (ObjectAttr) Namespace() string
func (*ObjectAttr) Unmarshal3MFAttr ¶ added in v0.24.0
func (u *ObjectAttr) Unmarshal3MFAttr(a spec.XMLAttr) error
type Spec ¶
type Spec struct{}
func (Spec) NewAttrGroup ¶ added in v0.24.0
func (Spec) NewElementDecoder ¶ added in v0.24.0
func (Spec) NewElementDecoder(xml.Name) spec.GetterElementDecoder