CSliceStack

class Lib3MF::CSliceStack : public CResource
Lib3MF_double GetBottomZ()

Get the lower Z-Coordinate of the slice stack.

Returns

the lower Z-Coordinate the slice stack

Lib3MF_uint64 GetSliceCount()

Returns the number of slices

Returns

the number of slices

PSlice GetSlice(const Lib3MF_uint64 nSliceIndex)

Query a slice from the slice stack

Parameters

nSliceIndex – the index of the slice

Returns

the Slice instance

PSlice AddSlice(const Lib3MF_double dZTop)

Returns the number of slices

Parameters

dZTop – upper Z coordinate of the slice

Returns

a new Slice instance

Lib3MF_uint64 GetSliceRefCount()

Returns the number of slice refs

Returns

the number of slicereferences

void AddSliceStackReference(CSliceStack *pTheSliceStack)

Adds another existing slicestack as sliceref in this slicestack

Parameters

pTheSliceStack – the slicestack to use as sliceref

PSliceStack GetSliceStackReference(const Lib3MF_uint64 nSliceRefIndex)

Adds another existing slicestack as sliceref in this slicestack

Parameters

nSliceRefIndex – the index of the slice ref

Returns

the slicestack that is used as sliceref

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

void SetOwnPath(const std::string &sPath)

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

Parameters

sPath – the package path where this Slice should be stored

std::string GetOwnPath()

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

Returns

the package path where this Slice will be stored

typedef std::shared_ptr<CSliceStack> Lib3MF::PSliceStack

Shared pointer to CSliceStack to easily allow reference counting.