lib3mf

package module
v0.0.0-...-32918c3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

README

Since Go doesnt have a package manager. This repository is used to maintain and import lib3mf Go bindings in Go environment.

Documentation

Index

Constants

View Source
const (
	PropertyType_NoPropertyType = 0
	PropertyType_BaseMaterial   = 1
	PropertyType_TexCoord       = 2
	PropertyType_Colors         = 3
	PropertyType_Composite      = 4
	PropertyType_Multi          = 5
)
View Source
const (
	SlicesMeshResolution_Fullres = 0
	SlicesMeshResolution_Lowres  = 1
)
View Source
const (
	ModelUnit_MicroMeter = 0
	ModelUnit_MilliMeter = 1
	ModelUnit_CentiMeter = 2
	ModelUnit_Inch       = 3
	ModelUnit_Foot       = 4
	ModelUnit_Meter      = 5
)
View Source
const (
	ObjectType_Other        = 0
	ObjectType_Model        = 1
	ObjectType_Support      = 2
	ObjectType_SolidSupport = 3
)
View Source
const (
	TextureType_Unknown = 0
	TextureType_PNG     = 1
	TextureType_JPEG    = 2
)
View Source
const (
	TextureTileStyle_Wrap        = 0
	TextureTileStyle_Mirror      = 1
	TextureTileStyle_Clamp       = 2
	TextureTileStyle_NoTileStyle = 3
)
View Source
const (
	TextureFilter_Auto    = 0
	TextureFilter_Linear  = 1
	TextureFilter_Nearest = 2
)
View Source
const (
	BeamLatticeCapMode_Sphere     = 0
	BeamLatticeCapMode_HemiSphere = 1
	BeamLatticeCapMode_Butt       = 2
)
View Source
const (
	BeamLatticeClipMode_NoClipMode = 0
	BeamLatticeClipMode_Inside     = 1
	BeamLatticeClipMode_Outside    = 2
)
View Source
const (
	BeamLatticeBallMode_None  = 0
	BeamLatticeBallMode_Mixed = 1
	BeamLatticeBallMode_All   = 2
)
View Source
const (
	ProgressIdentifier_QUERYCANCELED        = 0
	ProgressIdentifier_DONE                 = 1
	ProgressIdentifier_CLEANUP              = 2
	ProgressIdentifier_READSTREAM           = 3
	ProgressIdentifier_EXTRACTOPCPACKAGE    = 4
	ProgressIdentifier_READNONROOTMODELS    = 5
	ProgressIdentifier_READROOTMODEL        = 6
	ProgressIdentifier_READRESOURCES        = 7
	ProgressIdentifier_READMESH             = 8
	ProgressIdentifier_READSLICES           = 9
	ProgressIdentifier_READBUILD            = 10
	ProgressIdentifier_READCUSTOMATTACHMENT = 11
	ProgressIdentifier_READTEXTURETACHMENTS = 12
	ProgressIdentifier_CREATEOPCPACKAGE     = 13
	ProgressIdentifier_WRITEMODELSTOSTREAM  = 14
	ProgressIdentifier_WRITEROOTMODEL       = 15
	ProgressIdentifier_WRITENONROOTMODELS   = 16
	ProgressIdentifier_WRITEATTACHMENTS     = 17
	ProgressIdentifier_WRITECONTENTTYPES    = 18
	ProgressIdentifier_WRITENOBJECTS        = 19
	ProgressIdentifier_WRITENODES           = 20
	ProgressIdentifier_WRITETRIANGLES       = 21
	ProgressIdentifier_WRITESLICES          = 22
	ProgressIdentifier_WRITEKEYSTORE        = 23
)
View Source
const (
	BlendMethod_NoBlendMethod = 0
	BlendMethod_Mix           = 1
	BlendMethod_Multiply      = 2
)
View Source
const (
	MgfAlgorithm_MGF1_SHA1   = 160
	MgfAlgorithm_MGF1_SHA224 = 224
	MgfAlgorithm_MGF1_SHA256 = 256
	MgfAlgorithm_MGF1_SHA384 = 384
	MgfAlgorithm_MGF1_SHA512 = 512
)
View Source
const (
	DigestMethod_SHA1   = 160
	DigestMethod_SHA256 = 256
)
View Source
const (
	Compression_NoCompression = 0
	Compression_Deflate       = 1
)
View Source
const (
	EncryptionAlgorithm_AES256_GCM = 1
)
View Source
const LIB3MF_ERROR_ATTACHMENTNOTFOUND = 121
View Source
const LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE = 2000
View Source
const LIB3MF_ERROR_BUFFERTOOSMALL = 4
View Source
const LIB3MF_ERROR_CALCULATIONABORTED = 10
View Source
const LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT = 7
View Source
const LIB3MF_ERROR_COULDNOTLOADLIBRARY = 6
View Source
const LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT = 141
View Source
const LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE = 130
View Source
const LIB3MF_ERROR_GENERICEXCEPTION = 5
View Source
const LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION = 8
View Source
const LIB3MF_ERROR_INVALIDATTACHMENTSTREAM = 131
View Source
const LIB3MF_ERROR_INVALIDBASEMATERIALGROUP = 111
View Source
const LIB3MF_ERROR_INVALIDBUILDITEM = 110
View Source
const LIB3MF_ERROR_INVALIDCAST = 3
View Source
const LIB3MF_ERROR_INVALIDCOLORGROUP = 114
View Source
const LIB3MF_ERROR_INVALIDCOMPONENT = 109
View Source
const LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT = 108
View Source
const LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS = 116
View Source
const LIB3MF_ERROR_INVALIDKEYSIZE = 3005
View Source
const LIB3MF_ERROR_INVALIDKEYSTORE = 3000
View Source
const LIB3MF_ERROR_INVALIDKEYSTORECONSUMER = 3001
View Source
const LIB3MF_ERROR_INVALIDMESHOBJECT = 107
View Source
const LIB3MF_ERROR_INVALIDMODEL = 105
View Source
const LIB3MF_ERROR_INVALIDMODELRESOURCE = 103
View Source
const LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP = 117
View Source
const LIB3MF_ERROR_INVALIDOBJECT = 106
View Source
const LIB3MF_ERROR_INVALIDPARAM = 2
View Source
const LIB3MF_ERROR_INVALIDPROPERTYCOUNT = 132
View Source
const LIB3MF_ERROR_INVALIDRESOURCE = 142
View Source
const LIB3MF_ERROR_INVALIDRESOURCEINDEX = 120
View Source
const LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE = 112
View Source
const LIB3MF_ERROR_INVALIDTEXTURE2DGROUP = 115
View Source
const LIB3MF_ERROR_INVALIDTEXTURERESOURCE = 113
View Source
const LIB3MF_ERROR_ITERATORINVALIDINDEX = 102
View Source
const LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND = 3002
View Source
const LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND = 3003
View Source
const LIB3MF_ERROR_NOTIMPLEMENTED = 1

Error constants for Lib3MF.

View Source
const LIB3MF_ERROR_READERCLASSUNKNOWN = 100
View Source
const LIB3MF_ERROR_RESOURCENOTFOUND = 104
View Source
const LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED = 3004
View Source
const LIB3MF_ERROR_SHOULDNOTBECALLED = 11
View Source
const LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER = 140
View Source
const LIB3MF_ERROR_WRITERCLASSUNKNOWN = 101
View Source
const (
	WrappingAlgorithm_RSA_OAEP = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessRight

type AccessRight struct {
	Base
}

AccessRight represents a Lib3MF class.

func (AccessRight) GetConsumer

func (inst AccessRight) GetConsumer() (Consumer, error)

GetConsumer gets the consumer associated with this access right.

func (AccessRight) GetDigestMethod

func (inst AccessRight) GetDigestMethod() (DigestMethod, error)

GetDigestMethod gets the digest method assoicated.

func (AccessRight) GetMgfAlgorithm

func (inst AccessRight) GetMgfAlgorithm() (MgfAlgorithm, error)

GetMgfAlgorithm gets the associated mask generation function algorithm.

func (AccessRight) GetWrappingAlgorithm

func (inst AccessRight) GetWrappingAlgorithm() (WrappingAlgorithm, error)

GetWrappingAlgorithm gets the associated encryption algorithm.

type Attachment

type Attachment struct {
	Base
}

Attachment represents a Lib3MF class.

func (Attachment) GetPath

func (inst Attachment) GetPath() (string, error)

GetPath retrieves an attachment's package path. This function will be removed in a later release.

func (Attachment) GetRelationShipType

func (inst Attachment) GetRelationShipType() (string, error)

GetRelationShipType retrieves an attachment's relationship type.

func (Attachment) GetStreamSize

func (inst Attachment) GetStreamSize() (uint64, error)

GetStreamSize retrieves the size of the attachment stream.

func (Attachment) PackagePart

func (inst Attachment) PackagePart() (PackagePart, error)

PackagePart returns the PackagePart that is this attachment.

func (Attachment) ReadFromBuffer

func (inst Attachment) ReadFromBuffer(buffer []uint8) error

ReadFromBuffer reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods).

func (Attachment) ReadFromCallback

func (inst Attachment) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error

ReadFromCallback reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods.

func (Attachment) ReadFromFile

func (inst Attachment) ReadFromFile(fileName string) error

ReadFromFile reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods.

func (Attachment) SetPath

func (inst Attachment) SetPath(path string) error

SetPath sets an attachment's package path. This function will be removed in a later release.

func (Attachment) SetRelationShipType

func (inst Attachment) SetRelationShipType(path string) error

SetRelationShipType sets an attachment's relationship type.

func (Attachment) WriteToBuffer

func (inst Attachment) WriteToBuffer(buffer []uint8) ([]uint8, error)

WriteToBuffer writes out the attachment into a buffer.

func (Attachment) WriteToFile

func (inst Attachment) WriteToFile(fileName string) error

WriteToFile writes out the attachment as file.

type Ball

type Ball struct {
	Index  uint32
	Radius float64
}

Ball represents a Lib3MF struct.

type Base

type Base struct {
	Ref ref // identifies a C value, see ref type
	// contains filtered or unexported fields
}

Base represents a Lib3MF class.

func (Base) ClassTypeId

func (inst Base) ClassTypeId() (uint64, error)

ClassTypeId get Class Type Id.

func (Base) Equal

func (inst Base) Equal(w Base) bool

Equal reports whether inst and w refer to the same C pointer.

func (Base) Release

func (inst Base) Release() error

Release releases the C pointer.

type BaseMaterialGroup

type BaseMaterialGroup struct {
	Resource
}

BaseMaterialGroup represents a Lib3MF class.

func (BaseMaterialGroup) AddMaterial

func (inst BaseMaterialGroup) AddMaterial(name string, displayColor Color) (uint32, error)

AddMaterial adds a new material to the material group.

func (BaseMaterialGroup) GetAllPropertyIDs

func (inst BaseMaterialGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error)

GetAllPropertyIDs returns all the PropertyIDs of all materials in this group.

func (BaseMaterialGroup) GetCount

func (inst BaseMaterialGroup) GetCount() (uint32, error)

GetCount retrieves the count of base materials in the material group.

func (BaseMaterialGroup) GetDisplayColor

func (inst BaseMaterialGroup) GetDisplayColor(propertyID uint32) (Color, error)

GetDisplayColor returns a base material's display color.

func (BaseMaterialGroup) GetName

func (inst BaseMaterialGroup) GetName(propertyID uint32) (string, error)

GetName returns the base material's name.

func (BaseMaterialGroup) RemoveMaterial

func (inst BaseMaterialGroup) RemoveMaterial(propertyID uint32) error

RemoveMaterial removes a material from the material group.

func (BaseMaterialGroup) SetDisplayColor

func (inst BaseMaterialGroup) SetDisplayColor(propertyID uint32, theColor Color) error

SetDisplayColor sets a base material's display color.

func (BaseMaterialGroup) SetName

func (inst BaseMaterialGroup) SetName(propertyID uint32, name string) error

SetName sets a base material's name.

type BaseMaterialGroupIterator

type BaseMaterialGroupIterator struct {
	ResourceIterator
}

BaseMaterialGroupIterator represents a Lib3MF class.

func (BaseMaterialGroupIterator) GetCurrentBaseMaterialGroup

func (inst BaseMaterialGroupIterator) GetCurrentBaseMaterialGroup() (BaseMaterialGroup, error)

GetCurrentBaseMaterialGroup returns the MaterialGroup the iterator points at.

type Beam

type Beam struct {
	Indices  [2]uint32
	Radii    [2]float64
	CapModes [2]BeamLatticeCapMode
}

Beam represents a Lib3MF struct.

type BeamLattice

type BeamLattice struct {
	Base
}

BeamLattice represents a Lib3MF class.

func (BeamLattice) AddBall

func (inst BeamLattice) AddBall(ballInfo Ball) (uint32, error)

AddBall adds a single ball to a mesh object.

func (BeamLattice) AddBeam

func (inst BeamLattice) AddBeam(beamInfo Beam) (uint32, error)

AddBeam adds a single beam to a mesh object.

func (BeamLattice) AddBeamSet

func (inst BeamLattice) AddBeamSet() (BeamSet, error)

AddBeamSet adds an empty beamset to a mesh object.

func (BeamLattice) GetBall

func (inst BeamLattice) GetBall(index uint32) (Ball, error)

GetBall returns index and radius of a single ball of a mesh object.

func (BeamLattice) GetBallCount

func (inst BeamLattice) GetBallCount() (uint32, error)

GetBallCount returns the ball count of a mesh object.

func (BeamLattice) GetBallOptions

func (inst BeamLattice) GetBallOptions() (BeamLatticeBallMode, float64, error)

GetBallOptions returns the ball mode and the default ball radius for the beamlattice of this mesh.

func (BeamLattice) GetBalls

func (inst BeamLattice) GetBalls(ballInfo []Ball) ([]Ball, error)

GetBalls obtains all ball indices and radii of a mesh object.

func (BeamLattice) GetBeam

func (inst BeamLattice) GetBeam(index uint32) (Beam, error)

GetBeam returns indices, radii and capmodes of a single beam of a mesh object.

func (BeamLattice) GetBeamCount

func (inst BeamLattice) GetBeamCount() (uint32, error)

GetBeamCount returns the beam count of a mesh object.

func (BeamLattice) GetBeamSet

func (inst BeamLattice) GetBeamSet(index uint32) (BeamSet, error)

GetBeamSet returns a beamset of a mesh object.

func (BeamLattice) GetBeamSetCount

func (inst BeamLattice) GetBeamSetCount() (uint32, error)

GetBeamSetCount returns the number of beamsets of a mesh object.

func (BeamLattice) GetBeams

func (inst BeamLattice) GetBeams(beamInfo []Beam) ([]Beam, error)

GetBeams obtains all beam indices, radii and capmodes of a mesh object.

func (BeamLattice) GetClipping

func (inst BeamLattice) GetClipping() (BeamLatticeClipMode, uint32, error)

GetClipping returns the clipping mode and the clipping-mesh for the beamlattice of this mesh.

func (BeamLattice) GetMinLength

func (inst BeamLattice) GetMinLength() (float64, error)

GetMinLength returns the minimal length of beams for the beamlattice.

func (BeamLattice) GetRepresentation

func (inst BeamLattice) GetRepresentation() (bool, uint32, error)

GetRepresentation returns the representation-mesh for the beamlattice of this mesh.

func (BeamLattice) SetBall

func (inst BeamLattice) SetBall(index uint32, ballInfo Ball) error

SetBall sets the index and radius of a single ball of a mesh object.

func (BeamLattice) SetBallOptions

func (inst BeamLattice) SetBallOptions(ballMode BeamLatticeBallMode, ballRadius float64) error

SetBallOptions sets the ball mode and thedefault ball radius for the beamlattice.

func (BeamLattice) SetBalls

func (inst BeamLattice) SetBalls(ballInfo []Ball) error

SetBalls sets all ball indices and radii of a mesh object.

func (BeamLattice) SetBeam

func (inst BeamLattice) SetBeam(index uint32, beamInfo Beam) error

SetBeam sets the indices, radii and capmodes of a single beam of a mesh object.

func (BeamLattice) SetBeams

func (inst BeamLattice) SetBeams(beamInfo []Beam) error

SetBeams sets all beam indices, radii and capmodes of a mesh object.

func (BeamLattice) SetClipping

func (inst BeamLattice) SetClipping(clipMode BeamLatticeClipMode, uniqueResourceID uint32) error

SetClipping sets the clipping mode and the clipping-mesh for the beamlattice of this mesh.

func (BeamLattice) SetMinLength

func (inst BeamLattice) SetMinLength(minLength float64) error

SetMinLength sets the minimal length of beams for the beamlattice.

func (BeamLattice) SetRepresentation

func (inst BeamLattice) SetRepresentation(uniqueResourceID uint32) error

SetRepresentation sets the representation-mesh for the beamlattice of this mesh.

type BeamLatticeBallMode

type BeamLatticeBallMode int

BeamLatticeBallMode represents a Lib3MF enum.

type BeamLatticeCapMode

type BeamLatticeCapMode int

BeamLatticeCapMode represents a Lib3MF enum.

type BeamLatticeClipMode

type BeamLatticeClipMode int

BeamLatticeClipMode represents a Lib3MF enum.

type BeamSet

type BeamSet struct {
	Base
}

BeamSet represents a Lib3MF class.

func (BeamSet) GetBallReferenceCount

func (inst BeamSet) GetBallReferenceCount() (uint32, error)

GetBallReferenceCount retrieves the ball reference count of a beamset.

func (BeamSet) GetBallReferences

func (inst BeamSet) GetBallReferences(ballReferences []uint32) ([]uint32, error)

GetBallReferences retrieves the ball references of a beamset.

func (BeamSet) GetIdentifier

func (inst BeamSet) GetIdentifier() (string, error)

GetIdentifier retrieves a beamset's identifier string.

func (BeamSet) GetName

func (inst BeamSet) GetName() (string, error)

GetName retrieves a beamset's name string.

func (BeamSet) GetReferenceCount

func (inst BeamSet) GetReferenceCount() (uint32, error)

GetReferenceCount retrieves the reference count of a beamset.

func (BeamSet) GetReferences

func (inst BeamSet) GetReferences(references []uint32) ([]uint32, error)

GetReferences retrieves the references of a beamset.

func (BeamSet) SetBallReferences

func (inst BeamSet) SetBallReferences(ballReferences []uint32) error

SetBallReferences sets the ball references of a beamset.

func (BeamSet) SetIdentifier

func (inst BeamSet) SetIdentifier(identifier string) error

SetIdentifier sets a beamset's identifier string.

func (BeamSet) SetName

func (inst BeamSet) SetName(name string) error

SetName sets a beamset's name string.

func (BeamSet) SetReferences

func (inst BeamSet) SetReferences(references []uint32) error

SetReferences sets the references of a beamset.

type BlendMethod

type BlendMethod int

BlendMethod represents a Lib3MF enum.

type Box

type Box struct {
	MinCoordinate [3]float32
	MaxCoordinate [3]float32
}

Box represents a Lib3MF struct.

type BuildItem

type BuildItem struct {
	Base
}

BuildItem represents a Lib3MF class.

func (BuildItem) GetMetaDataGroup

func (inst BuildItem) GetMetaDataGroup() (MetaDataGroup, error)

GetMetaDataGroup returns the metadatagroup of this build item.

func (BuildItem) GetObjectResource

func (inst BuildItem) GetObjectResource() (Object, error)

GetObjectResource retrieves the object resource associated to a build item.

func (BuildItem) GetObjectResourceID

func (inst BuildItem) GetObjectResourceID() (uint32, error)

GetObjectResourceID retrieves the object UniqueResourceID associated to a build item.

func (BuildItem) GetObjectTransform

func (inst BuildItem) GetObjectTransform() (Transform, error)

GetObjectTransform retrieves a build item's transformation matrix.

func (BuildItem) GetOutbox

func (inst BuildItem) GetOutbox() (Box, error)

GetOutbox returns the outbox of a build item.

func (BuildItem) GetPartNumber

func (inst BuildItem) GetPartNumber() (string, error)

GetPartNumber retrieves a build item's part number string.

func (BuildItem) GetUUID

func (inst BuildItem) GetUUID() (bool, string, error)

GetUUID returns, whether a build item has a UUID and, if true, the build item's UUID.

func (BuildItem) HasObjectTransform

func (inst BuildItem) HasObjectTransform() (bool, error)

HasObjectTransform checks, if a build item has a non-identity transformation matrix.

func (BuildItem) SetObjectTransform

func (inst BuildItem) SetObjectTransform(transform Transform) error

SetObjectTransform sets a build item's transformation matrix.

func (BuildItem) SetPartNumber

func (inst BuildItem) SetPartNumber(setPartnumber string) error

SetPartNumber sets a build item's part number string.

func (BuildItem) SetUUID

func (inst BuildItem) SetUUID(uUID string) error

SetUUID sets the build item's UUID.

type BuildItemIterator

type BuildItemIterator struct {
	Base
}

BuildItemIterator represents a Lib3MF class.

func (BuildItemIterator) Clone

func (inst BuildItemIterator) Clone() (BuildItemIterator, error)

Clone creates a new build item iterator with the same build item list.

func (BuildItemIterator) Count

func (inst BuildItemIterator) Count() (uint64, error)

Count returns the number of build items the iterator captures.

func (BuildItemIterator) GetCurrent

func (inst BuildItemIterator) GetCurrent() (BuildItem, error)

GetCurrent returns the build item the iterator points at.

func (BuildItemIterator) MoveNext

func (inst BuildItemIterator) MoveNext() (bool, error)

MoveNext iterates to the next build item in the list.

func (BuildItemIterator) MovePrevious

func (inst BuildItemIterator) MovePrevious() (bool, error)

MovePrevious iterates to the previous build item in the list.

type Color

type Color struct {
	Red   uint8
	Green uint8
	Blue  uint8
	Alpha uint8
}

Color represents a Lib3MF struct.

type ColorGroup

type ColorGroup struct {
	Resource
}

ColorGroup represents a Lib3MF class.

func (ColorGroup) AddColor

func (inst ColorGroup) AddColor(theColor Color) (uint32, error)

AddColor adds a new value.

func (ColorGroup) GetAllPropertyIDs

func (inst ColorGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error)

GetAllPropertyIDs returns all the PropertyIDs of all colors within this group.

func (ColorGroup) GetColor

func (inst ColorGroup) GetColor(propertyID uint32) (Color, error)

GetColor sets a color value.

func (ColorGroup) GetCount

func (inst ColorGroup) GetCount() (uint32, error)

GetCount retrieves the count of base materials in this Color Group.

func (ColorGroup) RemoveColor

func (inst ColorGroup) RemoveColor(propertyID uint32) error

RemoveColor removes a color from the color group.

func (ColorGroup) SetColor

func (inst ColorGroup) SetColor(propertyID uint32, theColor Color) error

SetColor sets a color value.

type ColorGroupIterator

type ColorGroupIterator struct {
	ResourceIterator
}

ColorGroupIterator represents a Lib3MF class.

func (ColorGroupIterator) GetCurrentColorGroup

func (inst ColorGroupIterator) GetCurrentColorGroup() (ColorGroup, error)

GetCurrentColorGroup returns the ColorGroup the iterator points at.

type Component

type Component struct {
	Base
}

Component represents a Lib3MF class.

func (Component) GetObjectResource

func (inst Component) GetObjectResource() (Object, error)

GetObjectResource returns the Resource Instance of the component.

func (Component) GetObjectResourceID

func (inst Component) GetObjectResourceID() (uint32, error)

GetObjectResourceID returns the UniqueResourceID of the component.

func (Component) GetTransform

func (inst Component) GetTransform() (Transform, error)

GetTransform returns the transformation matrix of the component.

func (Component) GetUUID

func (inst Component) GetUUID() (bool, string, error)

GetUUID returns, whether a component has a UUID and, if true, the component's UUID.

func (Component) HasTransform

func (inst Component) HasTransform() (bool, error)

HasTransform returns, if the component has a different transformation than the identity matrix.

func (Component) SetTransform

func (inst Component) SetTransform(transform Transform) error

SetTransform sets the transformation matrix of the component.

func (Component) SetUUID

func (inst Component) SetUUID(uUID string) error

SetUUID sets the component's UUID.

type ComponentsObject

type ComponentsObject struct {
	Object
}

ComponentsObject represents a Lib3MF class.

func (ComponentsObject) AddComponent

func (inst ComponentsObject) AddComponent(objectResource Object, transform Transform) (Component, error)

AddComponent adds a new component to a components object.

func (ComponentsObject) GetComponent

func (inst ComponentsObject) GetComponent(index uint32) (Component, error)

GetComponent retrieves a component from a component object.

func (ComponentsObject) GetComponentCount

func (inst ComponentsObject) GetComponentCount() (uint32, error)

GetComponentCount retrieves a component count of a component object.

type ComponentsObjectIterator

type ComponentsObjectIterator struct {
	ResourceIterator
}

ComponentsObjectIterator represents a Lib3MF class.

func (ComponentsObjectIterator) GetCurrentComponentsObject

func (inst ComponentsObjectIterator) GetCurrentComponentsObject() (ComponentsObject, error)

GetCurrentComponentsObject returns the ComponentsObject the iterator points at.

type CompositeConstituent

type CompositeConstituent struct {
	PropertyID  uint32
	MixingRatio float64
}

CompositeConstituent represents a Lib3MF struct.

type CompositeMaterials

type CompositeMaterials struct {
	Resource
}

CompositeMaterials represents a Lib3MF class.

func (CompositeMaterials) AddComposite

func (inst CompositeMaterials) AddComposite(composite []CompositeConstituent) (uint32, error)

AddComposite adds a new Composite-Mixing Values to the CompositeMaterials.

func (CompositeMaterials) GetAllPropertyIDs

func (inst CompositeMaterials) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error)

GetAllPropertyIDs returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials.

func (CompositeMaterials) GetBaseMaterialGroup

func (inst CompositeMaterials) GetBaseMaterialGroup() (BaseMaterialGroup, error)

GetBaseMaterialGroup obtains the BaseMaterialGroup instance of this CompositeMaterials.

func (CompositeMaterials) GetComposite

func (inst CompositeMaterials) GetComposite(propertyID uint32, composite []CompositeConstituent) ([]CompositeConstituent, error)

GetComposite obtains a Composite-Maxing Ratio of this CompositeMaterials.

func (CompositeMaterials) GetCount

func (inst CompositeMaterials) GetCount() (uint32, error)

GetCount retrieves the count of Composite-s in the CompositeMaterials.

func (CompositeMaterials) RemoveComposite

func (inst CompositeMaterials) RemoveComposite(propertyID uint32) error

RemoveComposite removes a Composite-Maxing Ratio from the CompositeMaterials.

type CompositeMaterialsIterator

type CompositeMaterialsIterator struct {
	ResourceIterator
}

CompositeMaterialsIterator represents a Lib3MF class.

func (CompositeMaterialsIterator) GetCurrentCompositeMaterials

func (inst CompositeMaterialsIterator) GetCurrentCompositeMaterials() (CompositeMaterials, error)

GetCurrentCompositeMaterials returns the CompositeMaterials the iterator points at.

type Compression

type Compression int

Compression represents a Lib3MF enum.

type Consumer

type Consumer struct {
	Base
}

Consumer represents a Lib3MF class.

func (Consumer) GetConsumerID

func (inst Consumer) GetConsumerID() (string, error)

GetConsumerID gets the consumerid.

func (Consumer) GetKeyID

func (inst Consumer) GetKeyID() (string, error)

GetKeyID getts the keyid.

func (Consumer) GetKeyValue

func (inst Consumer) GetKeyValue() (string, error)

GetKeyValue gets the keyvalue associated with this consumer.

type ContentEncryptionCallbackFunc

type ContentEncryptionCallbackFunc = func(cEKParams ContentEncryptionParams, input []uint8, output []uint8, userData uintptr, status *uint64)

ContentEncryptionCallbackFunc a callback to encrypt/decrypt content called on each resource encrypted. This might be called several times depending on content size. If Input is not available(either null or size is 0), clients must return the result of authenticated tag generation/validation.

type ContentEncryptionParams

type ContentEncryptionParams struct {
	Base
}

ContentEncryptionParams represents a Lib3MF class.

func (ContentEncryptionParams) GetAdditionalAuthenticationData

func (inst ContentEncryptionParams) GetAdditionalAuthenticationData(byteData []uint8) ([]uint8, error)

GetAdditionalAuthenticationData a handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value.

func (ContentEncryptionParams) GetAuthenticationTag

func (inst ContentEncryptionParams) GetAuthenticationTag(byteData []uint8) ([]uint8, error)

GetAuthenticationTag a handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value.

func (ContentEncryptionParams) GetDescriptor

func (inst ContentEncryptionParams) GetDescriptor() (uint64, error)

GetDescriptor a handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value.

func (ContentEncryptionParams) GetEncryptionAlgorithm

func (inst ContentEncryptionParams) GetEncryptionAlgorithm() (EncryptionAlgorithm, error)

GetEncryptionAlgorithm returns the encryption method to be used in this encryption process.

func (ContentEncryptionParams) GetInitializationVector

func (inst ContentEncryptionParams) GetInitializationVector(byteData []uint8) ([]uint8, error)

GetInitializationVector gets the IV data.

func (ContentEncryptionParams) GetKey

func (inst ContentEncryptionParams) GetKey(byteData []uint8) ([]uint8, error)

GetKey gets the key for the resource associated.

func (ContentEncryptionParams) GetKeyUUID

func (inst ContentEncryptionParams) GetKeyUUID() (string, error)

GetKeyUUID gets the resourcedatagroup keyuuid.

func (ContentEncryptionParams) SetAuthenticationTag

func (inst ContentEncryptionParams) SetAuthenticationTag(byteData []uint8) error

SetAuthenticationTag sets the authentication tag.

type DigestMethod

type DigestMethod int

DigestMethod represents a Lib3MF enum.

type EncryptionAlgorithm

type EncryptionAlgorithm int

EncryptionAlgorithm represents a Lib3MF enum.

type KeyStore

type KeyStore struct {
	Base
}

KeyStore represents a Lib3MF class.

func (KeyStore) AddConsumer

func (inst KeyStore) AddConsumer(consumerID string, keyID string, keyValue string) (Consumer, error)

AddConsumer adds a consumer to the keystore.

func (KeyStore) AddResourceData

func (inst KeyStore) AddResourceData(resourceDataGroup ResourceDataGroup, partPath PackagePart, algorithm EncryptionAlgorithm, compression Compression, additionalAuthenticationData []uint8) (ResourceData, error)

AddResourceData add resourcedata to resourcedatagroup element.

func (KeyStore) AddResourceDataGroup

func (inst KeyStore) AddResourceDataGroup() (ResourceDataGroup, error)

AddResourceDataGroup adds a resource data group into the keystore.

func (KeyStore) FindConsumer

func (inst KeyStore) FindConsumer(consumerID string) (*Consumer, error)

FindConsumer finds a consumer by ID.

func (KeyStore) FindResourceData

func (inst KeyStore) FindResourceData(resourcePath PackagePart) (*ResourceData, error)

FindResourceData finds a resource data on this resource group.

func (KeyStore) FindResourceDataGroup

func (inst KeyStore) FindResourceDataGroup(partPath PackagePart) (*ResourceDataGroup, error)

FindResourceDataGroup finds a resource data group that contains a particular resourcedata.

func (KeyStore) GetConsumer

func (inst KeyStore) GetConsumer(consumerIndex uint64) (Consumer, error)

GetConsumer get a consumer from the keystore.

func (KeyStore) GetConsumerCount

func (inst KeyStore) GetConsumerCount() (uint64, error)

GetConsumerCount gets the number of consumers in the keystore.

func (KeyStore) GetResourceData

func (inst KeyStore) GetResourceData(resourceDataIndex uint64) (ResourceData, error)

GetResourceData gets a resource data.

func (KeyStore) GetResourceDataCount

func (inst KeyStore) GetResourceDataCount() (uint64, error)

GetResourceDataCount gets the number of resource data in the keysore.

func (KeyStore) GetResourceDataGroup

func (inst KeyStore) GetResourceDataGroup(resourceDataIndex uint64) (ResourceDataGroup, error)

GetResourceDataGroup gets a resource data group.

func (KeyStore) GetResourceDataGroupCount

func (inst KeyStore) GetResourceDataGroupCount() (uint64, error)

GetResourceDataGroupCount gets the number of resource data group in the keysore.

func (KeyStore) GetUUID

func (inst KeyStore) GetUUID() (bool, string, error)

GetUUID gets the keystore UUID.

func (KeyStore) RemoveConsumer

func (inst KeyStore) RemoveConsumer(consumer Consumer) error

RemoveConsumer removes a consumer from the keystore.

func (KeyStore) RemoveResourceData

func (inst KeyStore) RemoveResourceData(resourceData ResourceData) error

RemoveResourceData removes a resource data.

func (KeyStore) RemoveResourceDataGroup

func (inst KeyStore) RemoveResourceDataGroup(resourceDataGroup ResourceDataGroup) error

RemoveResourceDataGroup removes a resource data group.

func (KeyStore) SetUUID

func (inst KeyStore) SetUUID(uUID string) error

SetUUID sets the keystore UUID.

type KeyWrappingCallbackFunc

type KeyWrappingCallbackFunc = func(kEKParams AccessRight, inBuffer []uint8, outBuffer []uint8, userData uintptr, status *uint64)

KeyWrappingCallbackFunc a callback used to wrap (encrypt) the content key available in keystore resource group.

type MeshObject

type MeshObject struct {
	Object
}

MeshObject represents a Lib3MF class.

func (MeshObject) AddTriangle

func (inst MeshObject) AddTriangle(indices Triangle) (uint32, error)

AddTriangle adds a single triangle to a mesh object.

func (MeshObject) AddVertex

func (inst MeshObject) AddVertex(coordinates Position) (uint32, error)

AddVertex adds a single vertex to a mesh object.

func (MeshObject) BeamLattice

func (inst MeshObject) BeamLattice() (BeamLattice, error)

BeamLattice retrieves the BeamLattice within this MeshObject.

func (MeshObject) ClearAllProperties

func (inst MeshObject) ClearAllProperties() error

ClearAllProperties clears all properties of this mesh object (triangle and object-level).

func (MeshObject) GetAllTriangleProperties

func (inst MeshObject) GetAllTriangleProperties(propertiesArray []TriangleProperties) ([]TriangleProperties, error)

GetAllTriangleProperties gets the properties of all triangles of a mesh object.

func (MeshObject) GetObjectLevelProperty

func (inst MeshObject) GetObjectLevelProperty() (uint32, uint32, bool, error)

GetObjectLevelProperty gets the property at the object-level of the mesh object.

func (MeshObject) GetTriangle

func (inst MeshObject) GetTriangle(index uint32) (Triangle, error)

GetTriangle returns indices of a single triangle of a mesh object.

func (MeshObject) GetTriangleCount

func (inst MeshObject) GetTriangleCount() (uint32, error)

GetTriangleCount returns the triangle count of a mesh object.

func (MeshObject) GetTriangleIndices

func (inst MeshObject) GetTriangleIndices(indices []Triangle) ([]Triangle, error)

GetTriangleIndices get all triangles of a mesh object.

func (MeshObject) GetTriangleProperties

func (inst MeshObject) GetTriangleProperties(index uint32) (TriangleProperties, error)

GetTriangleProperties gets the properties of a single triangle of a mesh object.

func (MeshObject) GetVertex

func (inst MeshObject) GetVertex(index uint32) (Position, error)

GetVertex returns the vertex count of a mesh object.

func (MeshObject) GetVertexCount

func (inst MeshObject) GetVertexCount() (uint32, error)

GetVertexCount returns the vertex count of a mesh object.

func (MeshObject) GetVertices

func (inst MeshObject) GetVertices(vertices []Position) ([]Position, error)

GetVertices obtains all vertex positions of a mesh object.

func (MeshObject) IsManifoldAndOriented

func (inst MeshObject) IsManifoldAndOriented() (bool, error)

IsManifoldAndOriented retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec.

func (MeshObject) SetAllTriangleProperties

func (inst MeshObject) SetAllTriangleProperties(propertiesArray []TriangleProperties) error

SetAllTriangleProperties sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified.

func (MeshObject) SetGeometry

func (inst MeshObject) SetGeometry(vertices []Position, indices []Triangle) error

SetGeometry set all triangles of a mesh object.

func (MeshObject) SetObjectLevelProperty

func (inst MeshObject) SetObjectLevelProperty(uniqueResourceID uint32, propertyID uint32) error

SetObjectLevelProperty sets the property at the object-level of the mesh object.

func (MeshObject) SetTriangle

func (inst MeshObject) SetTriangle(index uint32, indices Triangle) error

SetTriangle sets the indices of a single triangle of a mesh object.

func (MeshObject) SetTriangleProperties

func (inst MeshObject) SetTriangleProperties(index uint32, properties TriangleProperties) error

SetTriangleProperties sets the properties of a single triangle of a mesh object.

func (MeshObject) SetVertex

func (inst MeshObject) SetVertex(index uint32, coordinates Position) error

SetVertex sets the coordinates of a single vertex of a mesh object.

type MeshObjectIterator

type MeshObjectIterator struct {
	ResourceIterator
}

MeshObjectIterator represents a Lib3MF class.

func (MeshObjectIterator) GetCurrentMeshObject

func (inst MeshObjectIterator) GetCurrentMeshObject() (MeshObject, error)

GetCurrentMeshObject returns the MeshObject the iterator points at.

type MetaData

type MetaData struct {
	Base
}

MetaData represents a Lib3MF class.

func (MetaData) GetKey

func (inst MetaData) GetKey() (string, error)

GetKey returns the (namespace+name) of a metadata.

func (MetaData) GetMustPreserve

func (inst MetaData) GetMustPreserve() (bool, error)

GetMustPreserve returns, whether a metadata must be preserved.

func (MetaData) GetName

func (inst MetaData) GetName() (string, error)

GetName returns the name of a metadata.

func (MetaData) GetNameSpace

func (inst MetaData) GetNameSpace() (string, error)

GetNameSpace returns the namespace URL of the metadata.

func (MetaData) GetType

func (inst MetaData) GetType() (string, error)

GetType returns the type of a metadata.

func (MetaData) GetValue

func (inst MetaData) GetValue() (string, error)

GetValue returns the value of the metadata.

func (MetaData) SetMustPreserve

func (inst MetaData) SetMustPreserve(mustPreserve bool) error

SetMustPreserve sets whether a metadata must be preserved.

func (MetaData) SetName

func (inst MetaData) SetName(name string) error

SetName sets a new name of a metadata.

func (MetaData) SetNameSpace

func (inst MetaData) SetNameSpace(nameSpace string) error

SetNameSpace sets a new namespace URL of the metadata.

func (MetaData) SetType

func (inst MetaData) SetType(_type string) error

SetType sets a new type of a metadata. This must be a simple XML type.

func (MetaData) SetValue

func (inst MetaData) SetValue(value string) error

SetValue sets a new value of the metadata.

type MetaDataGroup

type MetaDataGroup struct {
	Base
}

MetaDataGroup represents a Lib3MF class.

func (MetaDataGroup) AddMetaData

func (inst MetaDataGroup) AddMetaData(nameSpace string, name string, value string, _type string, mustPreserve bool) (MetaData, error)

AddMetaData adds a new metadata to this metadatagroup.

func (MetaDataGroup) GetMetaData

func (inst MetaDataGroup) GetMetaData(index uint32) (MetaData, error)

GetMetaData returns a metadata value within this metadatagroup.

func (MetaDataGroup) GetMetaDataByKey

func (inst MetaDataGroup) GetMetaDataByKey(nameSpace string, name string) (MetaData, error)

GetMetaDataByKey returns a metadata value within this metadatagroup.

func (MetaDataGroup) GetMetaDataCount

func (inst MetaDataGroup) GetMetaDataCount() (uint32, error)

GetMetaDataCount returns the number of metadata in this metadatagroup.

func (MetaDataGroup) RemoveMetaData

func (inst MetaDataGroup) RemoveMetaData(theMetaData MetaData) error

RemoveMetaData removes metadata from the model.

func (MetaDataGroup) RemoveMetaDataByIndex

func (inst MetaDataGroup) RemoveMetaDataByIndex(index uint32) error

RemoveMetaDataByIndex removes metadata by index from the model.

type MgfAlgorithm

type MgfAlgorithm int

MgfAlgorithm represents a Lib3MF enum.

type Model

type Model struct {
	Base
}

Model represents a Lib3MF class.

func (Model) AddAttachment

func (inst Model) AddAttachment(uRI string, relationShipType string) (Attachment, error)

AddAttachment adds an attachment stream to the model. The OPC part will be related to the model stream with a certain relationship type.

func (Model) AddBaseMaterialGroup

func (inst Model) AddBaseMaterialGroup() (BaseMaterialGroup, error)

AddBaseMaterialGroup adds an empty BaseMaterialGroup resource to the model.

func (Model) AddBuildItem

func (inst Model) AddBuildItem(object Object, transform Transform) (BuildItem, error)

AddBuildItem adds a build item to the model.

func (Model) AddColorGroup

func (inst Model) AddColorGroup() (ColorGroup, error)

AddColorGroup adds an empty ColorGroup resource to the model.

func (Model) AddComponentsObject

func (inst Model) AddComponentsObject() (ComponentsObject, error)

AddComponentsObject adds an empty component object to the model.

func (Model) AddCompositeMaterials

func (inst Model) AddCompositeMaterials(baseMaterialGroupInstance BaseMaterialGroup) (CompositeMaterials, error)

AddCompositeMaterials adds an empty CompositeMaterials resource to the model.

func (Model) AddCustomContentType

func (inst Model) AddCustomContentType(extension string, contentType string) error

AddCustomContentType adds a new Content Type to the model.

func (Model) AddMeshObject

func (inst Model) AddMeshObject() (MeshObject, error)

AddMeshObject adds an empty mesh object to the model.

func (Model) AddMultiPropertyGroup

func (inst Model) AddMultiPropertyGroup() (MultiPropertyGroup, error)

AddMultiPropertyGroup adds an empty MultiPropertyGroup resource to the model.

func (Model) AddSliceStack

func (inst Model) AddSliceStack(zBottom float64) (SliceStack, error)

AddSliceStack creates a new model slicestack by its id.

func (Model) AddTexture2DFromAttachment

func (inst Model) AddTexture2DFromAttachment(textureAttachment Attachment) (Texture2D, error)

AddTexture2DFromAttachment adds a texture2d resource to the model. Its path is given by that of an existing attachment.

func (Model) AddTexture2DGroup

func (inst Model) AddTexture2DGroup(texture2DInstance Texture2D) (Texture2DGroup, error)

AddTexture2DGroup adds an empty Texture2DGroup resource to the model.

func (Model) CreatePackageThumbnailAttachment

func (inst Model) CreatePackageThumbnailAttachment() (Attachment, error)

CreatePackageThumbnailAttachment create a new or the existing package thumbnail for the OPC package.

func (Model) FindAttachment

func (inst Model) FindAttachment(uRI string) (Attachment, error)

FindAttachment retrieves an attachment stream object from the model.

func (Model) FindOrCreatePackagePart

func (inst Model) FindOrCreatePackagePart(absolutePath string) (PackagePart, error)

FindOrCreatePackagePart returns a new PackagePart for use within the OPC package.

func (Model) GetAttachment

func (inst Model) GetAttachment(index uint32) (Attachment, error)

GetAttachment retrieves an attachment stream object from the model..

func (Model) GetAttachmentCount

func (inst Model) GetAttachmentCount() (uint32, error)

GetAttachmentCount retrieves the number of attachments of the model.

func (Model) GetBaseMaterialGroupByID

func (inst Model) GetBaseMaterialGroupByID(uniqueResourceID uint32) (BaseMaterialGroup, error)

GetBaseMaterialGroupByID finds a model base material group by its UniqueResourceID.

func (Model) GetBaseMaterialGroups

func (inst Model) GetBaseMaterialGroups() (BaseMaterialGroupIterator, error)

GetBaseMaterialGroups creates a BaseMaterialGroupIterator instance with all base material resources.

func (Model) GetBuildItems

func (inst Model) GetBuildItems() (BuildItemIterator, error)

GetBuildItems creates a build item iterator instance with all build items.

func (Model) GetBuildUUID

func (inst Model) GetBuildUUID() (bool, string, error)

GetBuildUUID returns, whether a build has a UUID and, if true, the build's UUID.

func (Model) GetColorGroupByID

func (inst Model) GetColorGroupByID(uniqueResourceID uint32) (ColorGroup, error)

GetColorGroupByID finds a model color group by its UniqueResourceID.

func (Model) GetColorGroups

func (inst Model) GetColorGroups() (ColorGroupIterator, error)

GetColorGroups creates a ColorGroupIterator instance with all ColorGroup resources.

func (Model) GetComponentsObjectByID

func (inst Model) GetComponentsObjectByID(uniqueResourceID uint32) (ComponentsObject, error)

GetComponentsObjectByID finds a components object by its UniqueResourceID.

func (Model) GetComponentsObjects

func (inst Model) GetComponentsObjects() (ComponentsObjectIterator, error)

GetComponentsObjects creates a resource iterator instance with all components object resources.

func (Model) GetCompositeMaterials

func (inst Model) GetCompositeMaterials() (CompositeMaterialsIterator, error)

GetCompositeMaterials creates a CompositeMaterialsIterator instance with all CompositeMaterials resources.

func (Model) GetCompositeMaterialsByID

func (inst Model) GetCompositeMaterialsByID(uniqueResourceID uint32) (CompositeMaterials, error)

GetCompositeMaterialsByID finds a model CompositeMaterials by its UniqueResourceID.

func (Model) GetKeyStore

func (inst Model) GetKeyStore() (KeyStore, error)

GetKeyStore gets the keystore associated with this model.

func (Model) GetLanguage

func (inst Model) GetLanguage() (string, error)

GetLanguage retrieves the language of a model.

func (Model) GetMeshObjectByID

func (inst Model) GetMeshObjectByID(uniqueResourceID uint32) (MeshObject, error)

GetMeshObjectByID finds a mesh object by its UniqueResourceID.

func (Model) GetMeshObjects

func (inst Model) GetMeshObjects() (MeshObjectIterator, error)

GetMeshObjects creates a resource iterator instance with all mesh object resources.

func (Model) GetMetaDataGroup

func (inst Model) GetMetaDataGroup() (MetaDataGroup, error)

GetMetaDataGroup returns the metadata of the model as MetaDataGroup.

func (Model) GetMultiPropertyGroupByID

func (inst Model) GetMultiPropertyGroupByID(uniqueResourceID uint32) (MultiPropertyGroup, error)

GetMultiPropertyGroupByID finds a model MultiPropertyGroup by its UniqueResourceID.

func (Model) GetMultiPropertyGroups

func (inst Model) GetMultiPropertyGroups() (MultiPropertyGroupIterator, error)

GetMultiPropertyGroups creates a MultiPropertyGroupsIterator instance with all MultiPropertyGroup resources.

func (Model) GetObjects

func (inst Model) GetObjects() (ObjectIterator, error)

GetObjects creates a resource iterator instance with all object resources.

func (Model) GetOutbox

func (inst Model) GetOutbox() (Box, error)

GetOutbox returns the outbox of a Model.

func (Model) GetPackageThumbnailAttachment

func (inst Model) GetPackageThumbnailAttachment() (*Attachment, error)

GetPackageThumbnailAttachment get the attachment to the OPC package containing the package thumbnail.

func (Model) GetPropertyTypeByID

func (inst Model) GetPropertyTypeByID(uniqueResourceID uint32) (PropertyType, error)

GetPropertyTypeByID returns a Property's type.

func (Model) GetResourceByID

func (inst Model) GetResourceByID(uniqueResourceID uint32) (Resource, error)

GetResourceByID finds a model resource by its UniqueResourceID.

func (Model) GetResources

func (inst Model) GetResources() (ResourceIterator, error)

GetResources creates a resource iterator instance with all resources.

func (Model) GetSliceStackByID

func (inst Model) GetSliceStackByID(uniqueResourceID uint32) (SliceStack, error)

GetSliceStackByID finds a model slicestack by its UniqueResourceID.

func (Model) GetSliceStacks

func (inst Model) GetSliceStacks() (SliceStackIterator, error)

GetSliceStacks creates a resource iterator instance with all slice stack resources.

func (Model) GetTexture2DByID

func (inst Model) GetTexture2DByID(uniqueResourceID uint32) (Texture2D, error)

GetTexture2DByID finds a model texture by its UniqueResourceID.

func (Model) GetTexture2DGroupByID

func (inst Model) GetTexture2DGroupByID(uniqueResourceID uint32) (Texture2DGroup, error)

GetTexture2DGroupByID finds a model texture2d group by its UniqueResourceID.

func (Model) GetTexture2DGroups

func (inst Model) GetTexture2DGroups() (Texture2DGroupIterator, error)

GetTexture2DGroups creates a Texture2DGroupIterator instance with all base material resources.

func (Model) GetTexture2Ds

func (inst Model) GetTexture2Ds() (Texture2DIterator, error)

GetTexture2Ds creates a Texture2DIterator instance with all texture2d resources.

func (Model) GetUnit

func (inst Model) GetUnit() (ModelUnit, error)

GetUnit returns the units of a model.

func (Model) HasPackageThumbnailAttachment

func (inst Model) HasPackageThumbnailAttachment() (bool, error)

HasPackageThumbnailAttachment retrieve whether the OPC package contains a package thumbnail.

func (Model) MergeToModel

func (inst Model) MergeToModel() (Model, error)

MergeToModel merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created.

func (Model) QueryReader

func (inst Model) QueryReader(readerClass string) (Reader, error)

QueryReader creates a model reader instance for a specific file type.

func (Model) QueryWriter

func (inst Model) QueryWriter(writerClass string) (Writer, error)

QueryWriter creates a model writer instance for a specific file type.

func (Model) RemoveAttachment

func (inst Model) RemoveAttachment(attachmentInstance Attachment) error

RemoveAttachment removes attachment from the model.

func (Model) RemoveBuildItem

func (inst Model) RemoveBuildItem(buildItemInstance BuildItem) error

RemoveBuildItem removes a build item from the model.

func (Model) RemoveCustomContentType

func (inst Model) RemoveCustomContentType(extension string) error

RemoveCustomContentType removes a custom Content Type from the model (UTF8 version).

func (Model) RemovePackageThumbnailAttachment

func (inst Model) RemovePackageThumbnailAttachment() error

RemovePackageThumbnailAttachment remove the attachment to the OPC package containing the package thumbnail.

func (Model) RootModelPart

func (inst Model) RootModelPart() (PackagePart, error)

RootModelPart returns the PackagePart within the OPC package that holds the root model.

func (Model) SetBuildUUID

func (inst Model) SetBuildUUID(uUID string) error

SetBuildUUID sets the build's UUID.

func (Model) SetLanguage

func (inst Model) SetLanguage(language string) error

SetLanguage sets the language of a model.

func (Model) SetRandomNumberCallback

func (inst Model) SetRandomNumberCallback(theCallback RandomNumberCallbackFunc, userData uintptr) error

SetRandomNumberCallback sets the random number generator callback for use in the library.

func (Model) SetUnit

func (inst Model) SetUnit(unit ModelUnit) error

SetUnit sets the units of a model.

type ModelUnit

type ModelUnit int

ModelUnit represents a Lib3MF enum.

type MultiPropertyGroup

type MultiPropertyGroup struct {
	Resource
}

MultiPropertyGroup represents a Lib3MF class.

func (MultiPropertyGroup) AddLayer

func (inst MultiPropertyGroup) AddLayer(theLayer MultiPropertyLayer) (uint32, error)

AddLayer adds a MultiPropertyLayer to this MultiPropertyGroup.

func (MultiPropertyGroup) AddMultiProperty

func (inst MultiPropertyGroup) AddMultiProperty(propertyIDs []uint32) (uint32, error)

AddMultiProperty adds a new MultiProperty to the MultiPropertyGroup.

func (MultiPropertyGroup) GetAllPropertyIDs

func (inst MultiPropertyGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error)

GetAllPropertyIDs returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup.

func (MultiPropertyGroup) GetCount

func (inst MultiPropertyGroup) GetCount() (uint32, error)

GetCount retrieves the count of MultiProperty-s in the MultiPropertyGroup.

func (MultiPropertyGroup) GetLayer

func (inst MultiPropertyGroup) GetLayer(layerIndex uint32) (MultiPropertyLayer, error)

GetLayer obtains a MultiPropertyLayer of this MultiPropertyGroup.

func (MultiPropertyGroup) GetLayerCount

func (inst MultiPropertyGroup) GetLayerCount() (uint32, error)

GetLayerCount retrieves the number of layers of this MultiPropertyGroup.

func (MultiPropertyGroup) GetMultiProperty

func (inst MultiPropertyGroup) GetMultiProperty(propertyID uint32, propertyIDs []uint32) ([]uint32, error)

GetMultiProperty obtains the PropertyIDs of a MultiProperty.

func (MultiPropertyGroup) RemoveLayer

func (inst MultiPropertyGroup) RemoveLayer(layerIndex uint32) error

RemoveLayer removes a MultiPropertyLayer from this MultiPropertyGroup.

func (MultiPropertyGroup) RemoveMultiProperty

func (inst MultiPropertyGroup) RemoveMultiProperty(propertyID uint32) error

RemoveMultiProperty removes a MultiProperty from this MultiPropertyGroup.

func (MultiPropertyGroup) SetMultiProperty

func (inst MultiPropertyGroup) SetMultiProperty(propertyID uint32, propertyIDs []uint32) error

SetMultiProperty sets the PropertyIDs of a MultiProperty.

type MultiPropertyGroupIterator

type MultiPropertyGroupIterator struct {
	ResourceIterator
}

MultiPropertyGroupIterator represents a Lib3MF class.

func (MultiPropertyGroupIterator) GetCurrentMultiPropertyGroup

func (inst MultiPropertyGroupIterator) GetCurrentMultiPropertyGroup() (MultiPropertyGroup, error)

GetCurrentMultiPropertyGroup returns the MultiPropertyGroup the iterator points at.

type MultiPropertyLayer

type MultiPropertyLayer struct {
	ResourceID     uint32
	TheBlendMethod BlendMethod
}

MultiPropertyLayer represents a Lib3MF struct.

type Object

type Object struct {
	Resource
}

Object represents a Lib3MF class.

func (Object) AssignSliceStack

func (inst Object) AssignSliceStack(sliceStackInstance SliceStack) error

AssignSliceStack assigns a slicestack to the object.

func (Object) ClearSliceStack

func (inst Object) ClearSliceStack() error

ClearSliceStack unlinks the attached slicestack from this object. If no slice stack is attached, do noting.

func (Object) ClearThumbnailAttachment

func (inst Object) ClearThumbnailAttachment() error

ClearThumbnailAttachment clears the attachment. The attachment instance is not removed from the package.

func (Object) GetMetaDataGroup

func (inst Object) GetMetaDataGroup() (MetaDataGroup, error)

GetMetaDataGroup returns the metadatagroup of this object.

func (Object) GetName

func (inst Object) GetName() (string, error)

GetName retrieves an object's name.

func (Object) GetOutbox

func (inst Object) GetOutbox() (Box, error)

GetOutbox returns the outbox of a build item.

func (Object) GetPartNumber

func (inst Object) GetPartNumber() (string, error)

GetPartNumber retrieves an object's part number.

func (Object) GetSliceStack

func (inst Object) GetSliceStack() (SliceStack, error)

GetSliceStack get the Slicestack attached to the object.

func (Object) GetSlicesMeshResolution

func (inst Object) GetSlicesMeshResolution() (SlicesMeshResolution, error)

GetSlicesMeshResolution get the meshresolution of the mesh object.

func (Object) GetThumbnailAttachment

func (inst Object) GetThumbnailAttachment() (*Attachment, error)

GetThumbnailAttachment get the attachment containing the object thumbnail.

func (Object) GetType

func (inst Object) GetType() (ObjectType, error)

GetType retrieves an object's type.

func (Object) GetUUID

func (inst Object) GetUUID() (bool, string, error)

GetUUID retrieves an object's uuid string (see production extension specification).

func (Object) HasSlices

func (inst Object) HasSlices(recursive bool) (bool, error)

HasSlices returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack.

func (Object) IsComponentsObject

func (inst Object) IsComponentsObject() (bool, error)

IsComponentsObject retrieves, if an object is a components object.

func (Object) IsMeshObject

func (inst Object) IsMeshObject() (bool, error)

IsMeshObject retrieves, if an object is a mesh object.

func (Object) IsValid

func (inst Object) IsValid() (bool, error)

IsValid retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects.

func (Object) SetAttachmentAsThumbnail

func (inst Object) SetAttachmentAsThumbnail(attachment Attachment) error

SetAttachmentAsThumbnail use an existing attachment as thumbnail for this object.

func (Object) SetName

func (inst Object) SetName(name string) error

SetName sets an object's name string.

func (Object) SetPartNumber

func (inst Object) SetPartNumber(partNumber string) error

SetPartNumber sets an objects partnumber string.

func (Object) SetSlicesMeshResolution

func (inst Object) SetSlicesMeshResolution(meshResolution SlicesMeshResolution) error

SetSlicesMeshResolution set the meshresolution of the mesh object.

func (Object) SetType

func (inst Object) SetType(objectType ObjectType) error

SetType sets an object's type.

func (Object) SetUUID

func (inst Object) SetUUID(uUID string) error

SetUUID sets a build object's uuid string (see production extension specification).

type ObjectIterator

type ObjectIterator struct {
	ResourceIterator
}

ObjectIterator represents a Lib3MF class.

func (ObjectIterator) GetCurrentObject

func (inst ObjectIterator) GetCurrentObject() (Object, error)

GetCurrentObject returns the Object the iterator points at.

type ObjectType

type ObjectType int

ObjectType represents a Lib3MF enum.

type PackagePart

type PackagePart struct {
	Base
}

PackagePart represents a Lib3MF class.

func (PackagePart) GetPath

func (inst PackagePart) GetPath() (string, error)

GetPath returns the absolute path of this PackagePart.

func (PackagePart) SetPath

func (inst PackagePart) SetPath(path string) error

SetPath sets the absolute path of this PackagePart.

type Position

type Position struct {
	Coordinates [3]float32
}

Position represents a Lib3MF struct.

type Position2D

type Position2D struct {
	Coordinates [2]float32
}

Position2D represents a Lib3MF struct.

type ProgressCallbackFunc

type ProgressCallbackFunc = func(abort *bool, progressValue float64, progressIdentifier ProgressIdentifier, userData uintptr)

ProgressCallbackFunc a callback function.

type ProgressIdentifier

type ProgressIdentifier int

ProgressIdentifier represents a Lib3MF enum.

type PropertyType

type PropertyType int

PropertyType represents a Lib3MF enum.

type RandomNumberCallbackFunc

type RandomNumberCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr, bytesWritten *uint64)

RandomNumberCallbackFunc callback to generate random numbers.

type ReadCallbackFunc

type ReadCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr)

ReadCallbackFunc callback to call for reading a data chunk.

type Reader

type Reader struct {
	Base
}

Reader represents a Lib3MF class.

func (Reader) AddKeyWrappingCallback

func (inst Reader) AddKeyWrappingCallback(consumerID string, theCallback KeyWrappingCallbackFunc, userData uintptr) error

AddKeyWrappingCallback registers a callback to deal with key wrapping mechanism from keystore.

func (Reader) AddRelationToRead

func (inst Reader) AddRelationToRead(relationShipType string) error

AddRelationToRead adds a relationship type which shall be read as attachment in memory while loading.

func (Reader) GetStrictModeActive

func (inst Reader) GetStrictModeActive() (bool, error)

GetStrictModeActive queries whether the strict mode of the reader is active or not.

func (Reader) GetWarning

func (inst Reader) GetWarning(index uint32) (uint32, string, error)

GetWarning returns Warning and Error Information of the read process.

func (Reader) GetWarningCount

func (inst Reader) GetWarningCount() (uint32, error)

GetWarningCount returns Warning and Error Count of the read process.

func (Reader) ReadFromBuffer

func (inst Reader) ReadFromBuffer(buffer []uint8) error

ReadFromBuffer reads a model from a memory buffer.

func (Reader) ReadFromCallback

func (inst Reader) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error

ReadFromCallback reads a model and from the data provided by a callback function.

func (Reader) ReadFromFile

func (inst Reader) ReadFromFile(filename string) error

ReadFromFile reads a model from a file. The file type is specified by the Model Reader class.

func (Reader) RemoveRelationToRead

func (inst Reader) RemoveRelationToRead(relationShipType string) error

RemoveRelationToRead removes a relationship type which shall be read as attachment in memory while loading.

func (Reader) SetContentEncryptionCallback

func (inst Reader) SetContentEncryptionCallback(theCallback ContentEncryptionCallbackFunc, userData uintptr) error

SetContentEncryptionCallback registers a callback to deal with encryption of content.

func (Reader) SetProgressCallback

func (inst Reader) SetProgressCallback(progressCallback ProgressCallbackFunc, userData uintptr) error

SetProgressCallback set the progress callback for calls to this writer.

func (Reader) SetStrictModeActive

func (inst Reader) SetStrictModeActive(strictModeActive bool) error

SetStrictModeActive activates (deactivates) the strict mode of the reader.

type Resource

type Resource struct {
	Base
}

Resource represents a Lib3MF class.

func (Resource) GetModelResourceID

func (inst Resource) GetModelResourceID() (uint32, error)

GetModelResourceID retrieves the id of this resource within a model.

func (Resource) GetResourceID

func (inst Resource) GetResourceID() (uint32, error)

GetResourceID retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID.

func (Resource) GetUniqueResourceID

func (inst Resource) GetUniqueResourceID() (uint32, error)

GetUniqueResourceID retrieves the unique id of this resource within a package.

func (Resource) PackagePart

func (inst Resource) PackagePart() (PackagePart, error)

PackagePart returns the PackagePart within which this resource resides.

func (Resource) SetPackagePart

func (inst Resource) SetPackagePart(packagePart PackagePart) error

SetPackagePart sets the new PackagePart within which this resource resides.

type ResourceData

type ResourceData struct {
	Base
}

ResourceData represents a Lib3MF class.

func (ResourceData) GetAdditionalAuthenticationData

func (inst ResourceData) GetAdditionalAuthenticationData(byteData []uint8) ([]uint8, error)

GetAdditionalAuthenticationData tells whether this ResourceData is compressed or not.

func (ResourceData) GetCompression

func (inst ResourceData) GetCompression() (Compression, error)

GetCompression tells whether this ResourceData is compressed or not.

func (ResourceData) GetEncryptionAlgorithm

func (inst ResourceData) GetEncryptionAlgorithm() (EncryptionAlgorithm, error)

GetEncryptionAlgorithm gets the encryption algorithm used to encrypt this ResourceData.

func (ResourceData) GetPath

func (inst ResourceData) GetPath() (PackagePart, error)

GetPath gets the encrypted part path.

type ResourceDataGroup

type ResourceDataGroup struct {
	Base
}

ResourceDataGroup represents a Lib3MF class.

func (ResourceDataGroup) AddAccessRight

func (inst ResourceDataGroup) AddAccessRight(consumer Consumer, wrappingAlgorithm WrappingAlgorithm, mgfAlgorithm MgfAlgorithm, digestMethod DigestMethod) (AccessRight, error)

AddAccessRight add accessright to resourcedatagroup element.

func (ResourceDataGroup) FindAccessRightByConsumer

func (inst ResourceDataGroup) FindAccessRightByConsumer(consumer Consumer) (*AccessRight, error)

FindAccessRightByConsumer finds the AccessRight associated with a Consumer.

func (ResourceDataGroup) GetKeyUUID

func (inst ResourceDataGroup) GetKeyUUID() (string, error)

GetKeyUUID sets the resourcedatagroup keyuuid.

func (ResourceDataGroup) RemoveAccessRight

func (inst ResourceDataGroup) RemoveAccessRight(consumer Consumer) error

RemoveAccessRight removes access from a Consumer on this resource data group.

type ResourceIterator

type ResourceIterator struct {
	Base
}

ResourceIterator represents a Lib3MF class.

func (ResourceIterator) Clone

func (inst ResourceIterator) Clone() (ResourceIterator, error)

Clone creates a new resource iterator with the same resource list.

func (ResourceIterator) Count

func (inst ResourceIterator) Count() (uint64, error)

Count returns the number of resoucres the iterator captures.

func (ResourceIterator) GetCurrent

func (inst ResourceIterator) GetCurrent() (Resource, error)

GetCurrent returns the resource the iterator points at.

func (ResourceIterator) MoveNext

func (inst ResourceIterator) MoveNext() (bool, error)

MoveNext iterates to the next resource in the list.

func (ResourceIterator) MovePrevious

func (inst ResourceIterator) MovePrevious() (bool, error)

MovePrevious iterates to the previous resource in the list.

type SeekCallbackFunc

type SeekCallbackFunc = func(position uint64, userData uintptr)

SeekCallbackFunc callback to call for seeking in the stream.

type Slice

type Slice struct {
	Base
}

Slice represents a Lib3MF class.

func (Slice) AddPolygon

func (inst Slice) AddPolygon(indices []uint32) (uint64, error)

AddPolygon add a new polygon to this slice.

func (Slice) GetPolygonCount

func (inst Slice) GetPolygonCount() (uint64, error)

GetPolygonCount get the number of polygons in the slice.

func (Slice) GetPolygonIndexCount

func (inst Slice) GetPolygonIndexCount(index uint64) (uint64, error)

GetPolygonIndexCount get the number of vertices in a slice.

func (Slice) GetPolygonIndices

func (inst Slice) GetPolygonIndices(index uint64, indices []uint32) ([]uint32, error)

GetPolygonIndices get all vertices of a slice.

func (Slice) GetVertexCount

func (inst Slice) GetVertexCount() (uint64, error)

GetVertexCount get the number of vertices in a slice.

func (Slice) GetVertices

func (inst Slice) GetVertices(vertices []Position2D) ([]Position2D, error)

GetVertices get all vertices of a slice.

func (Slice) GetZTop

func (inst Slice) GetZTop() (float64, error)

GetZTop get the upper Z-Coordinate of this slice.

func (Slice) SetPolygonIndices

func (inst Slice) SetPolygonIndices(index uint64, indices []uint32) error

SetPolygonIndices set all indices of a polygon.

func (Slice) SetVertices

func (inst Slice) SetVertices(vertices []Position2D) error

SetVertices set all vertices of a slice. All polygons will be cleared.

type SliceStack

type SliceStack struct {
	Resource
}

SliceStack represents a Lib3MF class.

func (SliceStack) AddSlice

func (inst SliceStack) AddSlice(zTop float64) (Slice, error)

AddSlice returns the number of slices.

func (SliceStack) AddSliceStackReference

func (inst SliceStack) AddSliceStackReference(theSliceStack SliceStack) error

AddSliceStackReference adds another existing slicestack as sliceref in this slicestack.

func (SliceStack) CollapseSliceReferences

func (inst SliceStack) CollapseSliceReferences() error

CollapseSliceReferences removes the indirection of slices via slice-refs, i.e. creates the slices of all slice refs of this SliceStack as actual slices of this SliceStack. All previously existing slices or slicerefs will be removed.

func (SliceStack) GetBottomZ

func (inst SliceStack) GetBottomZ() (float64, error)

GetBottomZ get the lower Z-Coordinate of the slice stack.

func (SliceStack) GetOwnPath

func (inst SliceStack) GetOwnPath() (string, error)

GetOwnPath obtains the package path where this Slice should be stored. Returns an empty string if the slicestack is stored within the root model.

func (SliceStack) GetSlice

func (inst SliceStack) GetSlice(sliceIndex uint64) (Slice, error)

GetSlice query a slice from the slice stack.

func (SliceStack) GetSliceCount

func (inst SliceStack) GetSliceCount() (uint64, error)

GetSliceCount returns the number of slices.

func (SliceStack) GetSliceRefCount

func (inst SliceStack) GetSliceRefCount() (uint64, error)

GetSliceRefCount returns the number of slice refs.

func (SliceStack) GetSliceStackReference

func (inst SliceStack) GetSliceStackReference(sliceRefIndex uint64) (SliceStack, error)

GetSliceStackReference adds another existing slicestack as sliceref in this slicestack.

func (SliceStack) SetOwnPath

func (inst SliceStack) SetOwnPath(path string) error

SetOwnPath sets the package path where this Slice should be stored. Input an empty string to reset the path.

type SliceStackIterator

type SliceStackIterator struct {
	ResourceIterator
}

SliceStackIterator represents a Lib3MF class.

func (SliceStackIterator) GetCurrentSliceStack

func (inst SliceStackIterator) GetCurrentSliceStack() (SliceStack, error)

GetCurrentSliceStack returns the SliceStack the iterator points at.

type SlicesMeshResolution

type SlicesMeshResolution int

SlicesMeshResolution represents a Lib3MF enum.

type Tex2Coord

type Tex2Coord struct {
	U float64
	V float64
}

Tex2Coord represents a Lib3MF struct.

type Texture2D

type Texture2D struct {
	Resource
}

Texture2D represents a Lib3MF class.

func (Texture2D) GetAttachment

func (inst Texture2D) GetAttachment() (Attachment, error)

GetAttachment retrieves the attachment located at the path of the texture.

func (Texture2D) GetContentType

func (inst Texture2D) GetContentType() (TextureType, error)

GetContentType retrieves a texture's content type.

func (Texture2D) GetFilter

func (inst Texture2D) GetFilter() (TextureFilter, error)

GetFilter retrieves a texture's filter type.

func (Texture2D) GetTileStyleUV

func (inst Texture2D) GetTileStyleUV() (TextureTileStyle, TextureTileStyle, error)

GetTileStyleUV retrieves a texture's tilestyle type.

func (Texture2D) SetAttachment

func (inst Texture2D) SetAttachment(attachment Attachment) error

SetAttachment sets the texture's package path to the path of the attachment.

func (Texture2D) SetContentType

func (inst Texture2D) SetContentType(contentType TextureType) error

SetContentType retrieves a texture's content type.

func (Texture2D) SetFilter

func (inst Texture2D) SetFilter(filter TextureFilter) error

SetFilter sets a texture's filter type.

func (Texture2D) SetTileStyleUV

func (inst Texture2D) SetTileStyleUV(tileStyleU TextureTileStyle, tileStyleV TextureTileStyle) error

SetTileStyleUV sets a texture's tilestyle type.

type Texture2DGroup

type Texture2DGroup struct {
	Resource
}

Texture2DGroup represents a Lib3MF class.

func (Texture2DGroup) AddTex2Coord

func (inst Texture2DGroup) AddTex2Coord(uVCoordinate Tex2Coord) (uint32, error)

AddTex2Coord adds a new tex2coord to the Texture2DGroup.

func (Texture2DGroup) GetAllPropertyIDs

func (inst Texture2DGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error)

GetAllPropertyIDs returns all the PropertyIDs of all tex2coords in this Texture2DGroup.

func (Texture2DGroup) GetCount

func (inst Texture2DGroup) GetCount() (uint32, error)

GetCount retrieves the count of tex2coords in the Texture2DGroup.

func (Texture2DGroup) GetTex2Coord

func (inst Texture2DGroup) GetTex2Coord(propertyID uint32) (Tex2Coord, error)

GetTex2Coord obtains a tex2coord to the Texture2DGroup.

func (Texture2DGroup) GetTexture2D

func (inst Texture2DGroup) GetTexture2D() (Texture2D, error)

GetTexture2D obtains the texture2D instance of this group.

func (Texture2DGroup) RemoveTex2Coord

func (inst Texture2DGroup) RemoveTex2Coord(propertyID uint32) error

RemoveTex2Coord removes a tex2coords from the Texture2DGroup.

type Texture2DGroupIterator

type Texture2DGroupIterator struct {
	ResourceIterator
}

Texture2DGroupIterator represents a Lib3MF class.

func (Texture2DGroupIterator) GetCurrentTexture2DGroup

func (inst Texture2DGroupIterator) GetCurrentTexture2DGroup() (Texture2DGroup, error)

GetCurrentTexture2DGroup returns the Texture2DGroup the iterator points at.

type Texture2DIterator

type Texture2DIterator struct {
	ResourceIterator
}

Texture2DIterator represents a Lib3MF class.

func (Texture2DIterator) GetCurrentTexture2D

func (inst Texture2DIterator) GetCurrentTexture2D() (Texture2D, error)

GetCurrentTexture2D returns the Texture2D the iterator points at.

type TextureFilter

type TextureFilter int

TextureFilter represents a Lib3MF enum.

type TextureTileStyle

type TextureTileStyle int

TextureTileStyle represents a Lib3MF enum.

type TextureType

type TextureType int

TextureType represents a Lib3MF enum.

type Transform

type Transform struct {
	Fields [4][3]float32
}

Transform represents a Lib3MF struct.

type Triangle

type Triangle struct {
	Indices [3]uint32
}

Triangle represents a Lib3MF struct.

type TriangleProperties

type TriangleProperties struct {
	ResourceID  uint32
	PropertyIDs [3]uint32
}

TriangleProperties represents a Lib3MF struct.

type WrappedError

type WrappedError struct {
	Code    uint32
	Message string
}

WrappedError is an error that wraps a Lib3MF error.

func (*WrappedError) Error

func (e *WrappedError) Error() string

type Wrapper

type Wrapper struct {
	LibraryHandle ref
	// contains filtered or unexported fields
}

Wrapper represents the number wrapper

func GetWrapper

func GetWrapper() (Wrapper, error)

func LoadLibrary

func LoadLibrary(libraryPath string) (Wrapper, error)

func (Wrapper) Acquire

func (wrapper Wrapper) Acquire(instance Base) error

Acquire acquires shared ownership of an object instance.

func (Wrapper) CheckBinaryVersion

func (wrapper Wrapper) CheckBinaryVersion() error

func (Wrapper) ColorToFloatRGBA

func (wrapper Wrapper) ColorToFloatRGBA(theColor Color) (float32, float32, float32, float32, error)

ColorToFloatRGBA calculates float-RGBA-values from a Color.

func (Wrapper) ColorToRGBA

func (wrapper Wrapper) ColorToRGBA(theColor Color) (uint8, uint8, uint8, uint8, error)

ColorToRGBA calculates uint8-RGBA-values from a Color.

func (Wrapper) CreateModel

func (wrapper Wrapper) CreateModel() (Model, error)

CreateModel creates an empty model instance.

func (Wrapper) FloatRGBAToColor

func (wrapper Wrapper) FloatRGBAToColor(red float32, green float32, blue float32, alpha float32) (Color, error)

FloatRGBAToColor creates a Color from uint8 RGBA values.

func (Wrapper) GetBuildInformation

func (wrapper Wrapper) GetBuildInformation() (bool, string, error)

GetBuildInformation retrieves build information of this library.

func (Wrapper) GetIdentityTransform

func (wrapper Wrapper) GetIdentityTransform() (Transform, error)

GetIdentityTransform creates an identity transform.

func (Wrapper) GetLastError

func (wrapper Wrapper) GetLastError(instance Base) (string, bool, error)

GetLastError retrieves the last error string of an instance.

func (Wrapper) GetLibraryVersion

func (wrapper Wrapper) GetLibraryVersion() (uint32, uint32, uint32, error)

GetLibraryVersion retrieves the binary version of this library.

func (Wrapper) GetPrereleaseInformation

func (wrapper Wrapper) GetPrereleaseInformation() (bool, string, error)

GetPrereleaseInformation retrieves prerelease information of this library.

func (Wrapper) GetScaleTransform

func (wrapper Wrapper) GetScaleTransform(factorX float32, factorY float32, factorZ float32) (Transform, error)

GetScaleTransform creates a scale transform.

func (Wrapper) GetSpecificationVersion

func (wrapper Wrapper) GetSpecificationVersion(specificationURL string) (bool, uint32, uint32, uint32, error)

GetSpecificationVersion retrieves whether a specification is supported, and if so, which version.

func (Wrapper) GetSymbolLookupMethod

func (wrapper Wrapper) GetSymbolLookupMethod() (uintptr, error)

GetSymbolLookupMethod returns the address of the SymbolLookupMethod.

func (Wrapper) GetTranslationTransform

func (wrapper Wrapper) GetTranslationTransform(vectorX float32, vectorY float32, vectorZ float32) (Transform, error)

GetTranslationTransform creates an translation transform.

func (Wrapper) GetUniformScaleTransform

func (wrapper Wrapper) GetUniformScaleTransform(factor float32) (Transform, error)

GetUniformScaleTransform creates a uniform scale transform.

func (Wrapper) NewAccessRight

func (wrapper Wrapper) NewAccessRight(r ref) AccessRight

func (Wrapper) NewAttachment

func (wrapper Wrapper) NewAttachment(r ref) Attachment

func (Wrapper) NewBase

func (wrapper Wrapper) NewBase(r ref) Base

NewBase creates a new Base. The wrapped C pointer will be freed when the Go pointer is finalized, but one can release it manually calling Release.

func (Wrapper) NewBaseMaterialGroup

func (wrapper Wrapper) NewBaseMaterialGroup(r ref) BaseMaterialGroup

func (Wrapper) NewBaseMaterialGroupIterator

func (wrapper Wrapper) NewBaseMaterialGroupIterator(r ref) BaseMaterialGroupIterator

func (Wrapper) NewBeamLattice

func (wrapper Wrapper) NewBeamLattice(r ref) BeamLattice

func (Wrapper) NewBeamSet

func (wrapper Wrapper) NewBeamSet(r ref) BeamSet

func (Wrapper) NewBuildItem

func (wrapper Wrapper) NewBuildItem(r ref) BuildItem

func (Wrapper) NewBuildItemIterator

func (wrapper Wrapper) NewBuildItemIterator(r ref) BuildItemIterator

func (Wrapper) NewColorGroup

func (wrapper Wrapper) NewColorGroup(r ref) ColorGroup

func (Wrapper) NewColorGroupIterator

func (wrapper Wrapper) NewColorGroupIterator(r ref) ColorGroupIterator

func (Wrapper) NewComponent

func (wrapper Wrapper) NewComponent(r ref) Component

func (Wrapper) NewComponentsObject

func (wrapper Wrapper) NewComponentsObject(r ref) ComponentsObject

func (Wrapper) NewComponentsObjectIterator

func (wrapper Wrapper) NewComponentsObjectIterator(r ref) ComponentsObjectIterator

func (Wrapper) NewCompositeMaterials

func (wrapper Wrapper) NewCompositeMaterials(r ref) CompositeMaterials

func (Wrapper) NewCompositeMaterialsIterator

func (wrapper Wrapper) NewCompositeMaterialsIterator(r ref) CompositeMaterialsIterator

func (Wrapper) NewConsumer

func (wrapper Wrapper) NewConsumer(r ref) Consumer

func (Wrapper) NewContentEncryptionParams

func (wrapper Wrapper) NewContentEncryptionParams(r ref) ContentEncryptionParams

func (Wrapper) NewKeyStore

func (wrapper Wrapper) NewKeyStore(r ref) KeyStore

func (Wrapper) NewMeshObject

func (wrapper Wrapper) NewMeshObject(r ref) MeshObject

func (Wrapper) NewMeshObjectIterator

func (wrapper Wrapper) NewMeshObjectIterator(r ref) MeshObjectIterator

func (Wrapper) NewMetaData

func (wrapper Wrapper) NewMetaData(r ref) MetaData

func (Wrapper) NewMetaDataGroup

func (wrapper Wrapper) NewMetaDataGroup(r ref) MetaDataGroup

func (Wrapper) NewModel

func (wrapper Wrapper) NewModel(r ref) Model

func (Wrapper) NewMultiPropertyGroup

func (wrapper Wrapper) NewMultiPropertyGroup(r ref) MultiPropertyGroup

func (Wrapper) NewMultiPropertyGroupIterator

func (wrapper Wrapper) NewMultiPropertyGroupIterator(r ref) MultiPropertyGroupIterator

func (Wrapper) NewObject

func (wrapper Wrapper) NewObject(r ref) Object

func (Wrapper) NewObjectIterator

func (wrapper Wrapper) NewObjectIterator(r ref) ObjectIterator

func (Wrapper) NewPackagePart

func (wrapper Wrapper) NewPackagePart(r ref) PackagePart

func (Wrapper) NewReader

func (wrapper Wrapper) NewReader(r ref) Reader

func (Wrapper) NewResource

func (wrapper Wrapper) NewResource(r ref) Resource

func (Wrapper) NewResourceData

func (wrapper Wrapper) NewResourceData(r ref) ResourceData

func (Wrapper) NewResourceDataGroup

func (wrapper Wrapper) NewResourceDataGroup(r ref) ResourceDataGroup

func (Wrapper) NewResourceIterator

func (wrapper Wrapper) NewResourceIterator(r ref) ResourceIterator

func (Wrapper) NewSlice

func (wrapper Wrapper) NewSlice(r ref) Slice

func (Wrapper) NewSliceStack

func (wrapper Wrapper) NewSliceStack(r ref) SliceStack

func (Wrapper) NewSliceStackIterator

func (wrapper Wrapper) NewSliceStackIterator(r ref) SliceStackIterator

func (Wrapper) NewTexture2D

func (wrapper Wrapper) NewTexture2D(r ref) Texture2D

func (Wrapper) NewTexture2DGroup

func (wrapper Wrapper) NewTexture2DGroup(r ref) Texture2DGroup

func (Wrapper) NewTexture2DGroupIterator

func (wrapper Wrapper) NewTexture2DGroupIterator(r ref) Texture2DGroupIterator

func (Wrapper) NewTexture2DIterator

func (wrapper Wrapper) NewTexture2DIterator(r ref) Texture2DIterator

func (Wrapper) NewWriter

func (wrapper Wrapper) NewWriter(r ref) Writer

func (Wrapper) RGBAToColor

func (wrapper Wrapper) RGBAToColor(red uint8, green uint8, blue uint8, alpha uint8) (Color, error)

RGBAToColor creates a Color from uint8 RGBA values.

func (Wrapper) Release

func (wrapper Wrapper) Release(instance Base) error

Release releases shared ownership of an object instance.

func (Wrapper) RetrieveProgressMessage

func (wrapper Wrapper) RetrieveProgressMessage(theProgressIdentifier ProgressIdentifier) (string, error)

RetrieveProgressMessage return an English text for a progress identifier.|Note: this is the only function you can call from your callback function.

func (Wrapper) SetJournal

func (wrapper Wrapper) SetJournal(journalPath string) error

SetJournal sets the journal file path.

type WrappingAlgorithm

type WrappingAlgorithm int

WrappingAlgorithm represents a Lib3MF enum.

type WriteCallbackFunc

type WriteCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr)

WriteCallbackFunc callback to call for writing a data chunk.

type Writer

type Writer struct {
	Base
}

Writer represents a Lib3MF class.

func (Writer) AddKeyWrappingCallback

func (inst Writer) AddKeyWrappingCallback(consumerID string, theCallback KeyWrappingCallbackFunc, userData uintptr) error

AddKeyWrappingCallback registers a callback to deal with data key encryption/decryption from keystore.

func (Writer) GetDecimalPrecision

func (inst Writer) GetDecimalPrecision() (uint32, error)

GetDecimalPrecision returns the number of digits after the decimal point to be written in each vertex coordinate-value.

func (Writer) GetStreamSize

func (inst Writer) GetStreamSize() (uint64, error)

GetStreamSize retrieves the size of the full 3MF file stream.

func (Writer) GetStrictModeActive

func (inst Writer) GetStrictModeActive() (bool, error)

GetStrictModeActive queries whether the strict mode of the reader is active or not.

func (Writer) GetWarning

func (inst Writer) GetWarning(index uint32) (uint32, string, error)

GetWarning returns Warning and Error Information of the read process.

func (Writer) GetWarningCount

func (inst Writer) GetWarningCount() (uint32, error)

GetWarningCount returns Warning and Error Count of the read process.

func (Writer) SetContentEncryptionCallback

func (inst Writer) SetContentEncryptionCallback(theCallback ContentEncryptionCallbackFunc, userData uintptr) error

SetContentEncryptionCallback registers a callback to deal with encryption of content.

func (Writer) SetDecimalPrecision

func (inst Writer) SetDecimalPrecision(decimalPrecision uint32) error

SetDecimalPrecision sets the number of digits after the decimal point to be written in each vertex coordinate-value.

func (Writer) SetProgressCallback

func (inst Writer) SetProgressCallback(progressCallback ProgressCallbackFunc, userData uintptr) error

SetProgressCallback set the progress callback for calls to this writer.

func (Writer) SetStrictModeActive

func (inst Writer) SetStrictModeActive(strictModeActive bool) error

SetStrictModeActive activates (deactivates) the strict mode of the reader.

func (Writer) WriteToBuffer

func (inst Writer) WriteToBuffer(buffer []uint8) ([]uint8, error)

WriteToBuffer writes out the 3MF file into a memory buffer.

func (Writer) WriteToCallback

func (inst Writer) WriteToCallback(theWriteCallback WriteCallbackFunc, theSeekCallback SeekCallbackFunc, userData uintptr) error

WriteToCallback writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class.

func (Writer) WriteToFile

func (inst Writer) WriteToFile(filename string) error

WriteToFile writes out the model as file. The file type is specified by the Model Writer class.

Jump to

Keyboard shortcuts

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