diff --git a/Autogenerated/Bindings/C/lib3mf_types.h b/Autogenerated/Bindings/C/lib3mf_types.h index 47bb640bc..95ecb060f 100644 --- a/Autogenerated/Bindings/C/lib3mf_types.h +++ b/Autogenerated/Bindings/C/lib3mf_types.h @@ -86,7 +86,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_VERSION_MAJOR 2 #define LIB3MF_VERSION_MINOR 4 #define LIB3MF_VERSION_MICRO 0 -#define LIB3MF_VERSION_PRERELEASEINFO "implicit" +#define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_types.h b/Autogenerated/Bindings/CDynamic/lib3mf_types.h index 47bb640bc..95ecb060f 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_types.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_types.h @@ -86,7 +86,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_VERSION_MAJOR 2 #define LIB3MF_VERSION_MINOR 4 #define LIB3MF_VERSION_MICRO 0 -#define LIB3MF_VERSION_PRERELEASEINFO "implicit" +#define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/Cpp/lib3mf_types.hpp b/Autogenerated/Bindings/Cpp/lib3mf_types.hpp index c1a1b6ffc..4310047ac 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_types.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_types.hpp @@ -85,7 +85,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_VERSION_MAJOR 2 #define LIB3MF_VERSION_MINOR 4 #define LIB3MF_VERSION_MICRO 0 -#define LIB3MF_VERSION_PRERELEASEINFO "implicit" +#define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp index c1a1b6ffc..4310047ac 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp @@ -85,7 +85,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_VERSION_MAJOR 2 #define LIB3MF_VERSION_MINOR 4 #define LIB3MF_VERSION_MICRO 0 -#define LIB3MF_VERSION_PRERELEASEINFO "implicit" +#define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/Go/lib3mf_types.h b/Autogenerated/Bindings/Go/lib3mf_types.h index 47bb640bc..95ecb060f 100644 --- a/Autogenerated/Bindings/Go/lib3mf_types.h +++ b/Autogenerated/Bindings/Go/lib3mf_types.h @@ -86,7 +86,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_VERSION_MAJOR 2 #define LIB3MF_VERSION_MINOR 4 #define LIB3MF_VERSION_MICRO 0 -#define LIB3MF_VERSION_PRERELEASEINFO "implicit" +#define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_types.h b/Autogenerated/Bindings/NodeJS/lib3mf_types.h index 47bb640bc..95ecb060f 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_types.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_types.h @@ -86,7 +86,7 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_VERSION_MAJOR 2 #define LIB3MF_VERSION_MINOR 4 #define LIB3MF_VERSION_MICRO 0 -#define LIB3MF_VERSION_PRERELEASEINFO "implicit" +#define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas index 2adf3a73e..d6d74ee5c 100644 --- a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas +++ b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas @@ -56,7 +56,7 @@ interface LIB3MF_VERSION_MAJOR = 2; LIB3MF_VERSION_MINOR = 4; LIB3MF_VERSION_MICRO = 0; - LIB3MF_VERSION_PRERELEASEINFO = 'implicit'; + LIB3MF_VERSION_PRERELEASEINFO = ''; LIB3MF_VERSION_BUILDINFO = ''; diff --git a/Autogenerated/Source/lib3mf_abi.hpp b/Autogenerated/Source/lib3mf_abi.hpp index 906af90e7..f79071d19 100644 --- a/Autogenerated/Source/lib3mf_abi.hpp +++ b/Autogenerated/Source/lib3mf_abi.hpp @@ -6226,16 +6226,6 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addfunctionfromimage3d(Lib3MF_Model pM */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); -/** -* finds a volume data object by its UniqueResourceID -* -* @param[in] pModel - Model instance. -* @param[in] nUniqueResourceID - UniqueResourceID -* @param[out] pVolumeDataInstance - returns the volume data instance -* @return error code or 0 (success) -*/ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getvolumedatabyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_VolumeData * pVolumeDataInstance); - /** * adds an empty boundary shape object to the model. * diff --git a/Autogenerated/Source/lib3mf_interfaces.hpp b/Autogenerated/Source/lib3mf_interfaces.hpp index cb8ea2eed..dfda93cea 100644 --- a/Autogenerated/Source/lib3mf_interfaces.hpp +++ b/Autogenerated/Source/lib3mf_interfaces.hpp @@ -6534,13 +6534,6 @@ class IModel : public virtual IBase { */ virtual IVolumeData * AddVolumeData() = 0; - /** - * IModel::GetVolumeDataByID - finds a volume data object by its UniqueResourceID - * @param[in] nUniqueResourceID - UniqueResourceID - * @return returns the volume data instance - */ - virtual IVolumeData * GetVolumeDataByID(const Lib3MF_uint32 nUniqueResourceID) = 0; - /** * IModel::AddLevelSet - adds an empty boundary shape object to the model. * @return returns the mesh object instance diff --git a/Autogenerated/Source/lib3mf_interfacewrapper.cpp b/Autogenerated/Source/lib3mf_interfacewrapper.cpp index d2129b8d1..c4e50c07e 100644 --- a/Autogenerated/Source/lib3mf_interfacewrapper.cpp +++ b/Autogenerated/Source/lib3mf_interfacewrapper.cpp @@ -22535,43 +22535,6 @@ Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib3MF_VolumeData * } } -Lib3MFResult lib3mf_model_getvolumedatabyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_VolumeData * pVolumeDataInstance) -{ - IBase* pIBaseClass = (IBase *)pModel; - - PLib3MFInterfaceJournalEntry pJournalEntry; - try { - if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetVolumeDataByID"); - pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); - } - if (pVolumeDataInstance == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseVolumeDataInstance(nullptr); - IModel* pIModel = dynamic_cast(pIBaseClass); - if (!pIModel) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - - pBaseVolumeDataInstance = pIModel->GetVolumeDataByID(nUniqueResourceID); - - *pVolumeDataInstance = (IBase*)(pBaseVolumeDataInstance); - if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("VolumeDataInstance", *pVolumeDataInstance); - 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_addlevelset(Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance) { IBase* pIBaseClass = (IBase *)pModel; @@ -23856,8 +23819,6 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_model_addfunctionfromimage3d; if (sProcName == "lib3mf_model_addvolumedata") *ppProcAddress = (void*) &lib3mf_model_addvolumedata; - if (sProcName == "lib3mf_model_getvolumedatabyid") - *ppProcAddress = (void*) &lib3mf_model_getvolumedatabyid; if (sProcName == "lib3mf_model_addlevelset") *ppProcAddress = (void*) &lib3mf_model_addlevelset; if (sProcName == "lib3mf_model_getlevelsets") diff --git a/AutomaticComponentToolkit/lib3mf.xml b/AutomaticComponentToolkit/lib3mf.xml index 2a7e48044..3a3f5a15c 100644 --- a/AutomaticComponentToolkit/lib3mf.xml +++ b/AutomaticComponentToolkit/lib3mf.xml @@ -4121,14 +4121,7 @@ - - - - - - + diff --git a/Source/Common/NMR_StringUtils.cpp b/Source/Common/NMR_StringUtils.cpp index d8cb05ccd..d07b7d3c5 100644 --- a/Source/Common/NMR_StringUtils.cpp +++ b/Source/Common/NMR_StringUtils.cpp @@ -151,7 +151,7 @@ namespace NMR { nfDouble fnStringToDouble(_In_z_ const nfChar * pszValue) { - __NMRASSERT(pszValue); + __NMRASSERT(pwszValue); nfDouble dResult = 0.0; //skip leading whitespaces @@ -174,18 +174,7 @@ namespace NMR { } if ((dResult == HUGE_VAL) || (dResult == -HUGE_VAL)) throw CNMRException(NMR_ERROR_STRINGTODOUBLECONVERSIONOUTOFRANGE); -#else - // Convert to double and make a input and range check! - std::from_chars_result result = std::from_chars(pszValue, pszValue + strlen(pszValue), dResult, std::chars_format::general); - // Check if any conversion happened - if (result.ec == std::errc::invalid_argument || result.ec == std::errc::result_out_of_range) - throw CNMRException(NMR_ERROR_EMPTYSTRINGTODOUBLECONVERSION); - - if ((*result.ptr != '\0') && (*result.ptr != ' ')) - throw CNMRException(NMR_ERROR_INVALIDSTRINGTODOUBLECONVERSION); - -#endif return dResult; } diff --git a/Source/Model/Classes/NMR_Model.cpp b/Source/Model/Classes/NMR_Model.cpp index 552350c51..65b5d45f0 100644 --- a/Source/Model/Classes/NMR_Model.cpp +++ b/Source/Model/Classes/NMR_Model.cpp @@ -429,7 +429,6 @@ namespace NMR { return newResourceID; } - void CModel::updateUniqueResourceID(UniqueResourceID nOldID, UniqueResourceID nNewID) void CModel::updateUniqueResourceID(UniqueResourceID nOldID, UniqueResourceID nNewID) { if (m_ResourceMap.find(nNewID) != m_ResourceMap.end()) { diff --git a/Tests/CPP_Bindings/Source/Reader.cpp b/Tests/CPP_Bindings/Source/Reader.cpp index 84590466d..f36b23e5a 100644 --- a/Tests/CPP_Bindings/Source/Reader.cpp +++ b/Tests/CPP_Bindings/Source/Reader.cpp @@ -33,6 +33,8 @@ UnitTest_Reader.cpp: Defines Unittests for the Reader classes #include "UnitTest_Utilities.h" #include "lib3mf_implicit.hpp" +#include + namespace Lib3MF { class Reader : public Lib3MFTest { @@ -66,18 +68,9 @@ namespace Lib3MF ASSERT_NO_THROW(model->AddMeshObject()); ASSERT_NO_THROW(model->AddMeshObject()); ASSERT_NO_THROW(model->AddMeshObject()); - std::vector resourceIDs; - std::vector modelResourceIDs; - std::vector expectedModelResourceIDs({2,3,5,6,7}); - std::vector expectedResourceIDs({2,3,4,5,6}); + auto objectIterator = model->GetObjects(); - while (objectIterator->MoveNext()) { - auto object = objectIterator->GetCurrentObject(); - modelResourceIDs.push_back(object->GetModelResourceID()); - resourceIDs.push_back(object->GetResourceID()); - } - ASSERT_EQ(modelResourceIDs, expectedModelResourceIDs); - ASSERT_EQ(resourceIDs, expectedResourceIDs); + EXPECT_EQ(objectIterator->Count(), 5); } TEST_F(Reader, 3MFReadFromFileAndAddComponents) @@ -87,18 +80,9 @@ namespace Lib3MF ASSERT_NO_THROW(model->AddComponentsObject()); ASSERT_NO_THROW(model->AddComponentsObject()); ASSERT_NO_THROW(model->AddComponentsObject()); - std::vector resourceIDs; - std::vector modelResourceIDs; - std::vector expectedModelResourceIDs({2,3,4,5,6,7,8,9}); - std::vector expectedResourceIDs({1,2,3,4,5,6,7,8}); + auto objectIterator = model->GetObjects(); - while (objectIterator->MoveNext()) { - auto object = objectIterator->GetCurrentObject(); - modelResourceIDs.push_back(object->GetModelResourceID()); - resourceIDs.push_back(object->GetResourceID()); - } - ASSERT_EQ(modelResourceIDs, expectedModelResourceIDs); - ASSERT_EQ(resourceIDs, expectedResourceIDs); + EXPECT_EQ(objectIterator->Count(), 8); } TEST_F(Reader, STLReadFromFile) diff --git a/submodules/AutomaticComponentToolkit b/submodules/AutomaticComponentToolkit index 4237585f4..33422936d 160000 --- a/submodules/AutomaticComponentToolkit +++ b/submodules/AutomaticComponentToolkit @@ -1 +1 @@ -Subproject commit 4237585f405bbebfbaf143ade7033777d1491bda +Subproject commit 33422936d34156d0d683e8ab363a8e10b14491c6 diff --git a/submodules/cpp-base64 b/submodules/cpp-base64 index 07ae5045d..951de609d 160000 --- a/submodules/cpp-base64 +++ b/submodules/cpp-base64 @@ -1 +1 @@ -Subproject commit 07ae5045d67b5bf6ffb46646b8ac2370eff1ae3e +Subproject commit 951de609dbe27ce8864dfe47323c4ade96bee86e diff --git a/submodules/googletest b/submodules/googletest index f8d7d77c0..df1544bce 160000 --- a/submodules/googletest +++ b/submodules/googletest @@ -1 +1 @@ -Subproject commit f8d7d77c06936315286eb55f8de22cd23c188571 +Subproject commit df1544bcee0c7ce35cd5ea0b3eb8cc81855a4140 diff --git a/submodules/libzip b/submodules/libzip index 210b09d9d..3091d0424 160000 --- a/submodules/libzip +++ b/submodules/libzip @@ -1 +1 @@ -Subproject commit 210b09d9d2d0f4c0bbc64f92ad45c1ac53598fec +Subproject commit 3091d0424e04f98e051fce5e94bb3a6461a33b91