CObject

class Lib3MF::CObject : public CResource
eObjectType GetType()

Retrieves an object’s type

Returns

returns object type enum.

void SetType(const eObjectType eObjectType)

Sets an object’s type

Parameters

eObjectType – object type enum.

std::string GetName()

Retrieves an object’s name

Returns

returns object name.

void SetName(const std::string &sName)

Sets an object’s name string

Parameters

sName – new object name.

std::string GetPartNumber()

Retrieves an object’s part number

Returns

returns object part number.

void SetPartNumber(const std::string &sPartNumber)

Sets an objects partnumber string

Parameters

sPartNumber – new object part number.

bool IsMeshObject()

Retrieves, if an object is a mesh object

Returns

returns, whether the object is a mesh object

bool IsComponentsObject()

Retrieves, if an object is a components object

Returns

returns, whether the object is a components object

bool 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.

Returns

returns whether the object is a valid object description

void SetAttachmentAsThumbnail(CAttachment *pAttachment)

Use an existing attachment as thumbnail for this object

Parameters

pAttachment – Instance of a new or the existing thumbnailattachment object.

PAttachment GetThumbnailAttachment()

Get the attachment containing the object thumbnail.

Returns

Instance of the thumbnailattachment object or NULL.

void ClearThumbnailAttachment()

Clears the attachment. The attachment instance is not removed from the package.

sBox GetOutbox()

Returns the outbox of a build item

Returns

Outbox of this build item

std::string GetUUID(bool &bHasUUID)

Retrieves an object’s uuid string (see production extension specification)

Parameters

bHasUUID – flag whether the build item has a UUID

Returns

returns object uuid.

void SetUUID(const std::string &sUUID)

Sets a build object’s uuid string (see production extension specification)

Parameters

sUUID – new object uuid string.

PMetaDataGroup GetMetaDataGroup()

Returns the metadatagroup of this object

Returns

returns an Instance of the metadatagroup of this object

void SetSlicesMeshResolution(const eSlicesMeshResolution eMeshResolution)

set the meshresolution of the mesh object

Parameters

eMeshResolution – meshresolution of this object

eSlicesMeshResolution GetSlicesMeshResolution()

get the meshresolution of the mesh object

Returns

meshresolution of this object

bool HasSlices(const bool bRecursive)

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

Parameters

bRecursive – check also all referenced objects?

Returns

does the object have a slice stack?

void ClearSliceStack()

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

PSliceStack GetSliceStack()

get the Slicestack attached to the object

Returns

returns the slicestack instance

void AssignSliceStack(CSliceStack *pSliceStackInstance)

assigns a slicestack to the object

Parameters

pSliceStackInstance – the new slice stack of this Object

typedef std::shared_ptr<CObject> Lib3MF::PObject

Shared pointer to CObject to easily allow reference counting.