diff --git a/Autogenerated/Bindings/C/lib3mf.h b/Autogenerated/Bindings/C/lib3mf.h index 8aa43c6e0..9c197ed1e 100644 --- a/Autogenerated/Bindings/C/lib3mf.h +++ b/Autogenerated/Bindings/C/lib3mf.h @@ -5752,6 +5752,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcolorgroupbyid(Lib3MF_Model pModel, */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc index bc569242a..7016fba24 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc @@ -578,6 +578,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetComponentsObjectByID = NULL; pWrapperTable->m_Model_GetColorGroupByID = NULL; pWrapperTable->m_Model_GetSliceStackByID = NULL; + pWrapperTable->m_Model_GetLevelSetByID = NULL; pWrapperTable->m_Model_GetBuildUUID = NULL; pWrapperTable->m_Model_SetBuildUUID = NULL; pWrapperTable->m_Model_GetBuildItems = NULL; @@ -5472,6 +5473,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStackByID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h index 8af146357..0f941c3a2 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h @@ -5739,6 +5739,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -6951,6 +6961,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; diff --git a/Autogenerated/Bindings/CSharp/Lib3MF.cs b/Autogenerated/Bindings/CSharp/Lib3MF.cs index d978c2234..01cb527a1 100644 --- a/Autogenerated/Bindings/CSharp/Lib3MF.cs +++ b/Autogenerated/Bindings/CSharp/Lib3MF.cs @@ -2024,6 +2024,9 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getslicestackbyid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_GetSliceStackByID (IntPtr Handle, UInt32 AUniqueResourceID, out IntPtr ASliceStacInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getlevelsetbyid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_GetLevelSetByID (IntPtr Handle, UInt32 AUniqueResourceID, out IntPtr ALevelSetObjectInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getbuilduuid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_GetBuildUUID (IntPtr Handle, out Byte AHasUUID, UInt32 sizeUUID, out UInt32 neededUUID, IntPtr dataUUID); @@ -8454,6 +8457,14 @@ public CSliceStack GetSliceStackByID (UInt32 AUniqueResourceID) return Internal.Lib3MFWrapper.PolymorphicFactory(newSliceStacInstance); } + public CLevelSet GetLevelSetByID (UInt32 AUniqueResourceID) + { + IntPtr newLevelSetObjectInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_GetLevelSetByID (Handle, AUniqueResourceID, out newLevelSetObjectInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newLevelSetObjectInstance); + } + public String GetBuildUUID (out bool AHasUUID) { Byte resultHasUUID = 0; diff --git a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp index a1aae9f0f..1601c7c92 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp @@ -5752,6 +5752,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcolorgroupbyid(Lib3MF_Model pModel, */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * diff --git a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp index 9c4ea0d69..2dbfda4df 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp @@ -3327,6 +3327,7 @@ class CModel : public CBase { inline PComponentsObject GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID); inline PColorGroup GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID); inline PSliceStack GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID); + inline PLevelSet GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID); inline std::string GetBuildUUID(bool & bHasUUID); inline void SetBuildUUID(const std::string & sUUID); inline PBuildItemIterator GetBuildItems(); @@ -11300,6 +11301,22 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStacInstance))); } + /** + * CModel::GetLevelSetByID - finds a level set object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the level set object instance + */ + PLevelSet CModel::GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) + { + Lib3MFHandle hLevelSetObjectInstance = nullptr; + CheckError(lib3mf_model_getlevelsetbyid(m_pHandle, nUniqueResourceID, &hLevelSetObjectInstance)); + + if (!hLevelSetObjectInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hLevelSetObjectInstance))); + } + /** * CModel::GetBuildUUID - returns, whether a build has a UUID and, if true, the build's UUID * @param[out] bHasUUID - flag whether the build has a UUID diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h index 0d1683c3a..865a65006 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h @@ -5739,6 +5739,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -6951,6 +6961,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp index b31972635..93c52b511 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp @@ -3351,6 +3351,7 @@ class CModel : public CBase { inline PComponentsObject GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID); inline PColorGroup GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID); inline PSliceStack GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID); + inline PLevelSet GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID); inline std::string GetBuildUUID(bool & bHasUUID); inline void SetBuildUUID(const std::string & sUUID); inline PBuildItemIterator GetBuildItems(); @@ -4350,6 +4351,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Model_GetComponentsObjectByID = nullptr; pWrapperTable->m_Model_GetColorGroupByID = nullptr; pWrapperTable->m_Model_GetSliceStackByID = nullptr; + pWrapperTable->m_Model_GetLevelSetByID = nullptr; pWrapperTable->m_Model_GetBuildUUID = nullptr; pWrapperTable->m_Model_SetBuildUUID = nullptr; pWrapperTable->m_Model_GetBuildItems = nullptr; @@ -9240,6 +9242,15 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if (pWrapperTable->m_Model_GetSliceStackByID == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 @@ -12006,6 +12017,10 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetSliceStackByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_model_getlevelsetbyid", (void**)&(pWrapperTable->m_Model_GetLevelSetByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetLevelSetByID == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_model_getbuilduuid", (void**)&(pWrapperTable->m_Model_GetBuildUUID)); if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBuildUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; @@ -19800,6 +19815,22 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStacInstance))); } + /** + * CModel::GetLevelSetByID - finds a level set object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the level set object instance + */ + PLevelSet CModel::GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) + { + Lib3MFHandle hLevelSetObjectInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_GetLevelSetByID(m_pHandle, nUniqueResourceID, &hLevelSetObjectInstance)); + + if (!hLevelSetObjectInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hLevelSetObjectInstance))); + } + /** * CModel::GetBuildUUID - returns, whether a build has a UUID and, if true, the build's UUID * @param[out] bHasUUID - flag whether the build has a UUID diff --git a/Autogenerated/Bindings/Go/lib3mf.go b/Autogenerated/Bindings/Go/lib3mf.go index bcbfea6d0..385afe654 100644 --- a/Autogenerated/Bindings/Go/lib3mf.go +++ b/Autogenerated/Bindings/Go/lib3mf.go @@ -4842,6 +4842,15 @@ Lib3MFResult CCall_lib3mf_model_getslicestackbyid(Lib3MFHandle libraryHandle, Li } +Lib3MFResult CCall_lib3mf_model_getlevelsetbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetLevelSetByID (pModel, nUniqueResourceID, pLevelSetObjectInstance); +} + + Lib3MFResult CCall_lib3mf_model_getbuilduuid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) { if (libraryHandle == 0) @@ -12951,6 +12960,16 @@ func (inst Model) GetSliceStackByID(uniqueResourceID uint32) (SliceStack, error) return inst.wrapperRef.NewSliceStack(sliceStacInstance), nil } +// GetLevelSetByID finds a level set object by its UniqueResourceID. +func (inst Model) GetLevelSetByID(uniqueResourceID uint32) (LevelSet, error) { + var levelSetObjectInstance ref + ret := C.CCall_lib3mf_model_getlevelsetbyid(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID), &levelSetObjectInstance) + if ret != 0 { + return LevelSet{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewLevelSet(levelSetObjectInstance), nil +} + // GetBuildUUID returns, whether a build has a UUID and, if true, the build's UUID. func (inst Model) GetBuildUUID() (bool, string, error) { var hasUUID C.bool diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc index bc569242a..7016fba24 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc @@ -578,6 +578,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetComponentsObjectByID = NULL; pWrapperTable->m_Model_GetColorGroupByID = NULL; pWrapperTable->m_Model_GetSliceStackByID = NULL; + pWrapperTable->m_Model_GetLevelSetByID = NULL; pWrapperTable->m_Model_GetBuildUUID = NULL; pWrapperTable->m_Model_SetBuildUUID = NULL; pWrapperTable->m_Model_GetBuildItems = NULL; @@ -5472,6 +5473,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStackByID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.h b/Autogenerated/Bindings/Go/lib3mf_dynamic.h index 8af146357..0f941c3a2 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.h @@ -5739,6 +5739,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -6951,6 +6961,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc index bc569242a..7016fba24 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc @@ -578,6 +578,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetComponentsObjectByID = NULL; pWrapperTable->m_Model_GetColorGroupByID = NULL; pWrapperTable->m_Model_GetSliceStackByID = NULL; + pWrapperTable->m_Model_GetLevelSetByID = NULL; pWrapperTable->m_Model_GetBuildUUID = NULL; pWrapperTable->m_Model_SetBuildUUID = NULL; pWrapperTable->m_Model_GetBuildItems = NULL; @@ -5472,6 +5473,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStackByID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h index 8af146357..0f941c3a2 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h @@ -5739,6 +5739,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -6951,6 +6961,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc index 9aee82057..3fa8485db 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc @@ -21528,6 +21528,7 @@ void CLib3MFModel::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "GetComponentsObjectByID", GetComponentsObjectByID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetColorGroupByID", GetColorGroupByID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetSliceStackByID", GetSliceStackByID); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetLevelSetByID", GetLevelSetByID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetBuildUUID", GetBuildUUID); NODE_SET_PROTOTYPE_METHOD(tpl, "SetBuildUUID", SetBuildUUID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetBuildItems", GetBuildItems); @@ -22113,6 +22114,33 @@ void CLib3MFModel::GetSliceStackByID(const FunctionCallbackInfo& args) } +void CLib3MFModel::GetLevelSetByID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (UniqueResourceID)"); + } + unsigned int nUniqueResourceID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnLevelSetObjectInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLevelSetByID."); + if (wrapperTable->m_Model_GetLevelSetByID == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::GetLevelSetByID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_GetLevelSetByID(instanceHandle, nUniqueResourceID, &hReturnLevelSetObjectInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjLevelSetObjectInstance = CLib3MFLevelSet::NewInstance(args.Holder(), hReturnLevelSetObjectInstance); + args.GetReturnValue().Set(instanceObjLevelSetObjectInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFModel::GetBuildUUID(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h index 4e402d5b8..6427ce459 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h @@ -2527,6 +2527,7 @@ class CLib3MFModel : public CLib3MFBaseClass { static void GetComponentsObjectByID(const v8::FunctionCallbackInfo& args); static void GetColorGroupByID(const v8::FunctionCallbackInfo& args); static void GetSliceStackByID(const v8::FunctionCallbackInfo& args); + static void GetLevelSetByID(const v8::FunctionCallbackInfo& args); static void GetBuildUUID(const v8::FunctionCallbackInfo& args); static void SetBuildUUID(const v8::FunctionCallbackInfo& args); static void GetBuildItems(const v8::FunctionCallbackInfo& args); diff --git a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas index e02448491..88f685def 100644 --- a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas +++ b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas @@ -6399,6 +6399,16 @@ TLib3MFModel = class; *) TLib3MFModel_GetSliceStackByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pSliceStacInstance: TLib3MFHandle): TLib3MFResult; cdecl; + (** + * finds a level set object by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pLevelSetObjectInstance - returns the level set object instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetLevelSetByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pLevelSetObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + (** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -8882,6 +8892,7 @@ TLib3MFModel = class(TLib3MFBase) function GetComponentsObjectByID(const AUniqueResourceID: Cardinal): TLib3MFComponentsObject; function GetColorGroupByID(const AUniqueResourceID: Cardinal): TLib3MFColorGroup; function GetSliceStackByID(const AUniqueResourceID: Cardinal): TLib3MFSliceStack; + function GetLevelSetByID(const AUniqueResourceID: Cardinal): TLib3MFLevelSet; function GetBuildUUID(out AHasUUID: Boolean): String; procedure SetBuildUUID(const AUUID: String); function GetBuildItems(): TLib3MFBuildItemIterator; @@ -9472,6 +9483,7 @@ TLib3MFWrapper = class(TObject) FLib3MFModel_GetComponentsObjectByIDFunc: TLib3MFModel_GetComponentsObjectByIDFunc; FLib3MFModel_GetColorGroupByIDFunc: TLib3MFModel_GetColorGroupByIDFunc; FLib3MFModel_GetSliceStackByIDFunc: TLib3MFModel_GetSliceStackByIDFunc; + FLib3MFModel_GetLevelSetByIDFunc: TLib3MFModel_GetLevelSetByIDFunc; FLib3MFModel_GetBuildUUIDFunc: TLib3MFModel_GetBuildUUIDFunc; FLib3MFModel_SetBuildUUIDFunc: TLib3MFModel_SetBuildUUIDFunc; FLib3MFModel_GetBuildItemsFunc: TLib3MFModel_GetBuildItemsFunc; @@ -10082,6 +10094,7 @@ TLib3MFWrapper = class(TObject) property Lib3MFModel_GetComponentsObjectByIDFunc: TLib3MFModel_GetComponentsObjectByIDFunc read FLib3MFModel_GetComponentsObjectByIDFunc; property Lib3MFModel_GetColorGroupByIDFunc: TLib3MFModel_GetColorGroupByIDFunc read FLib3MFModel_GetColorGroupByIDFunc; property Lib3MFModel_GetSliceStackByIDFunc: TLib3MFModel_GetSliceStackByIDFunc read FLib3MFModel_GetSliceStackByIDFunc; + property Lib3MFModel_GetLevelSetByIDFunc: TLib3MFModel_GetLevelSetByIDFunc read FLib3MFModel_GetLevelSetByIDFunc; property Lib3MFModel_GetBuildUUIDFunc: TLib3MFModel_GetBuildUUIDFunc read FLib3MFModel_GetBuildUUIDFunc; property Lib3MFModel_SetBuildUUIDFunc: TLib3MFModel_SetBuildUUIDFunc read FLib3MFModel_SetBuildUUIDFunc; property Lib3MFModel_GetBuildItemsFunc: TLib3MFModel_GetBuildItemsFunc read FLib3MFModel_GetBuildItemsFunc; @@ -18278,6 +18291,17 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSliceStacInstance); end; + function TLib3MFModel.GetLevelSetByID(const AUniqueResourceID: Cardinal): TLib3MFLevelSet; + var + HLevelSetObjectInstance: TLib3MFHandle; + begin + Result := nil; + HLevelSetObjectInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_GetLevelSetByIDFunc(FHandle, AUniqueResourceID, HLevelSetObjectInstance)); + if Assigned(HLevelSetObjectInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HLevelSetObjectInstance); + end; + function TLib3MFModel.GetBuildUUID(out AHasUUID: Boolean): String; var ResultHasUUID: Byte; @@ -19380,6 +19404,7 @@ implementation FLib3MFModel_GetComponentsObjectByIDFunc := LoadFunction('lib3mf_model_getcomponentsobjectbyid'); FLib3MFModel_GetColorGroupByIDFunc := LoadFunction('lib3mf_model_getcolorgroupbyid'); FLib3MFModel_GetSliceStackByIDFunc := LoadFunction('lib3mf_model_getslicestackbyid'); + FLib3MFModel_GetLevelSetByIDFunc := LoadFunction('lib3mf_model_getlevelsetbyid'); FLib3MFModel_GetBuildUUIDFunc := LoadFunction('lib3mf_model_getbuilduuid'); FLib3MFModel_SetBuildUUIDFunc := LoadFunction('lib3mf_model_setbuilduuid'); FLib3MFModel_GetBuildItemsFunc := LoadFunction('lib3mf_model_getbuilditems'); @@ -21049,6 +21074,9 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_getslicestackbyid'), @FLib3MFModel_GetSliceStackByIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_getlevelsetbyid'), @FLib3MFModel_GetLevelSetByIDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_getbuilduuid'), @FLib3MFModel_GetBuildUUIDFunc); diff --git a/Autogenerated/Bindings/Python/Lib3MF.py b/Autogenerated/Bindings/Python/Lib3MF.py index f91b7eef1..a079439c7 100644 --- a/Autogenerated/Bindings/Python/Lib3MF.py +++ b/Autogenerated/Bindings/Python/Lib3MF.py @@ -664,6 +664,7 @@ class FunctionTable: lib3mf_model_getcomponentsobjectbyid = None lib3mf_model_getcolorgroupbyid = None lib3mf_model_getslicestackbyid = None + lib3mf_model_getlevelsetbyid = None lib3mf_model_getbuilduuid = None lib3mf_model_setbuilduuid = None lib3mf_model_getbuilditems = None @@ -4418,6 +4419,12 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_model_getslicestackbyid = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getlevelsetbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getlevelsetbyid = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbuilduuid")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -6376,6 +6383,9 @@ def _loadFunctionTable(self): self.lib.lib3mf_model_getslicestackbyid.restype = ctypes.c_int32 self.lib.lib3mf_model_getslicestackbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_model_getlevelsetbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getlevelsetbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_model_getbuilduuid.restype = ctypes.c_int32 self.lib.lib3mf_model_getbuilduuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] @@ -12329,6 +12339,17 @@ def GetSliceStackByID(self, UniqueResourceID): return SliceStacInstanceObject + def GetLevelSetByID(self, UniqueResourceID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + LevelSetObjectInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_getlevelsetbyid(self._handle, nUniqueResourceID, LevelSetObjectInstanceHandle)) + if LevelSetObjectInstanceHandle: + LevelSetObjectInstanceObject = self._wrapper._polymorphicFactory(LevelSetObjectInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return LevelSetObjectInstanceObject + def GetBuildUUID(self): pHasUUID = ctypes.c_bool() nUUIDBufferSize = ctypes.c_uint64(0) diff --git a/Autogenerated/Source/lib3mf_abi.hpp b/Autogenerated/Source/lib3mf_abi.hpp index a1aae9f0f..1601c7c92 100644 --- a/Autogenerated/Source/lib3mf_abi.hpp +++ b/Autogenerated/Source/lib3mf_abi.hpp @@ -5752,6 +5752,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcolorgroupbyid(Lib3MF_Model pModel, */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * diff --git a/Autogenerated/Source/lib3mf_interfaces.hpp b/Autogenerated/Source/lib3mf_interfaces.hpp index 8ff1ecaee..374148766 100644 --- a/Autogenerated/Source/lib3mf_interfaces.hpp +++ b/Autogenerated/Source/lib3mf_interfaces.hpp @@ -6195,6 +6195,13 @@ class IModel : public virtual IBase { */ virtual ISliceStack * GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID) = 0; + /** + * IModel::GetLevelSetByID - finds a level set object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the level set object instance + */ + virtual ILevelSet * GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) = 0; + /** * IModel::GetBuildUUID - returns, whether a build has a UUID and, if true, the build's UUID * @param[out] bHasUUID - flag whether the build has a UUID diff --git a/Autogenerated/Source/lib3mf_interfacewrapper.cpp b/Autogenerated/Source/lib3mf_interfacewrapper.cpp index 136f57ce5..fa5f71a6a 100644 --- a/Autogenerated/Source/lib3mf_interfacewrapper.cpp +++ b/Autogenerated/Source/lib3mf_interfacewrapper.cpp @@ -20671,6 +20671,43 @@ Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 n } } +Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetLevelSetByID"); + pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); + } + if (pLevelSetObjectInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseLevelSetObjectInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseLevelSetObjectInstance = pIModel->GetLevelSetByID(nUniqueResourceID); + + *pLevelSetObjectInstance = (IBase*)(pBaseLevelSetObjectInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("LevelSetObjectInstance", *pLevelSetObjectInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + Lib3MFResult lib3mf_model_getbuilduuid(Lib3MF_Model pModel, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) { IBase* pIBaseClass = (IBase *)pModel; @@ -23641,6 +23678,8 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_model_getcolorgroupbyid; if (sProcName == "lib3mf_model_getslicestackbyid") *ppProcAddress = (void*) &lib3mf_model_getslicestackbyid; + if (sProcName == "lib3mf_model_getlevelsetbyid") + *ppProcAddress = (void*) &lib3mf_model_getlevelsetbyid; if (sProcName == "lib3mf_model_getbuilduuid") *ppProcAddress = (void*) &lib3mf_model_getbuilduuid; if (sProcName == "lib3mf_model_setbuilduuid") diff --git a/Autogenerated/Source/lib3mf_types.hpp b/Autogenerated/Source/lib3mf_types.hpp index 8c709a77e..e5b0a3bf4 100644 --- a/Autogenerated/Source/lib3mf_types.hpp +++ b/Autogenerated/Source/lib3mf_types.hpp @@ -129,6 +129,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSETRESOURCE 143 /** A level set resource is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ diff --git a/AutomaticComponentToolkit/lib3mf.xml b/AutomaticComponentToolkit/lib3mf.xml index 626ab2ea0..9835552b2 100644 --- a/AutomaticComponentToolkit/lib3mf.xml +++ b/AutomaticComponentToolkit/lib3mf.xml @@ -97,6 +97,7 @@ + @@ -3853,6 +3854,11 @@ + + + + (pResource.get())) { + return new CLevelSet(std::dynamic_pointer_cast(pResource)); + } + else + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDLEVELSETRESOURCE); + +} + ITexture2DGroup * CModel::GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID) { NMR::PModelResource pResource = model().findResource(nUniqueResourceID);