diff --git a/Autogenerated/Bindings/C/lib3mf.h b/Autogenerated/Bindings/C/lib3mf.h index 9490b43e6..8aa43c6e0 100644 --- a/Autogenerated/Bindings/C/lib3mf.h +++ b/Autogenerated/Bindings/C/lib3mf.h @@ -873,6 +873,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_ismeshobject(Lib3MF_Object pObject, b */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1356,10 +1365,10 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc index ec45f5118..bc569242a 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc @@ -124,6 +124,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Object_SetPartNumber = NULL; pWrapperTable->m_Object_IsMeshObject = NULL; pWrapperTable->m_Object_IsComponentsObject = NULL; + pWrapperTable->m_Object_IsLevelSetObject = NULL; pWrapperTable->m_Object_IsValid = NULL; pWrapperTable->m_Object_SetAttachmentAsThumbnail = NULL; pWrapperTable->m_Object_GetThumbnailAttachment = NULL; @@ -1385,6 +1386,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Object_IsComponentsObject == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h index e3c3f201b..8af146357 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h @@ -860,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1343,10 +1352,10 @@ typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, L typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); @@ -6488,6 +6497,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; diff --git a/Autogenerated/Bindings/CSharp/Lib3MF.cs b/Autogenerated/Bindings/CSharp/Lib3MF.cs index 069f6f6f4..d978c2234 100644 --- a/Autogenerated/Bindings/CSharp/Lib3MF.cs +++ b/Autogenerated/Bindings/CSharp/Lib3MF.cs @@ -662,6 +662,9 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_object_iscomponentsobject", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Object_IsComponentsObject (IntPtr Handle, out Byte AIsComponentsObject); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_object_islevelsetobject", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Object_IsLevelSetObject (IntPtr Handle, out Byte AIsLevelSetObject); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_object_isvalid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Object_IsValid (IntPtr Handle, out Byte AIsValid); @@ -2604,12 +2607,12 @@ public static T PolymorphicFactory(IntPtr Handle) where T : class case 0xC2BDF5D8CBBDB1F0: Object = new CMultiPropertyGroupIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" case 0xC4B8EC00A82BF336: Object = new CImage3DIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" case 0x40E9035363ACE65E: Object = new CFunctionIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" - case 0x9FBC898CF30CDEF3: Object = new CLevelSetIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + case 0xA0C005C035D5371D: Object = new CLevelSetIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" case 0xD17716D063DE2C22: Object = new CMetaData(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" case 0x0C3B85369E9B25D3: Object = new CMetaDataGroup(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" case 0x2DA2136F577A779C: Object = new CObject(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" case 0x3B3A6DC6EC610497: Object = new CMeshObject(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - case 0x2BE0E57BA81B2ECB: Object = new CLevelSet(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + case 0xE8A7D9C192EFD0E2: Object = new CLevelSet(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" case 0x63B3B461B30B4BA5: Object = new CBeamLattice(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" case 0x4DF17E76926221C2: Object = new CFunctionReference(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" case 0xD85B5B6143E787E3: Object = new CVolumeDataColor(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" @@ -3565,6 +3568,14 @@ public bool IsComponentsObject () return (resultIsComponentsObject != 0); } + public bool IsLevelSetObject () + { + Byte resultIsLevelSetObject = 0; + + CheckError(Internal.Lib3MFWrapper.Object_IsLevelSetObject (Handle, out resultIsLevelSetObject)); + return (resultIsLevelSetObject != 0); + } + public bool IsValid () { Byte resultIsValid = 0; diff --git a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp index a968b54c5..a1aae9f0f 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp @@ -873,6 +873,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_ismeshobject(Lib3MF_Object pObject, b */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1356,10 +1365,10 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); diff --git a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp index e2d01cb09..9c4ea0d69 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp @@ -1401,6 +1401,7 @@ class CObject : public CResource { inline void SetPartNumber(const std::string & sPartNumber); inline bool IsMeshObject(); inline bool IsComponentsObject(); + inline bool IsLevelSetObject(); inline bool IsValid(); inline void SetAttachmentAsThumbnail(classParam pAttachment); inline PAttachment GetThumbnailAttachment(); @@ -3413,12 +3414,12 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) case 0xC2BDF5D8CBBDB1F0UL: return new CMultiPropertyGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" case 0xC4B8EC00A82BF336UL: return new CImage3DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" case 0x40E9035363ACE65EUL: return new CFunctionIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" - case 0x9FBC898CF30CDEF3UL: return new CLevelSetIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + case 0xA0C005C035D5371DUL: return new CLevelSetIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" case 0xD17716D063DE2C22UL: return new CMetaData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" case 0x0C3B85369E9B25D3UL: return new CMetaDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" case 0x2DA2136F577A779CUL: return new CObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" case 0x3B3A6DC6EC610497UL: return new CMeshObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - case 0x2BE0E57BA81B2ECBUL: return new CLevelSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + case 0xE8A7D9C192EFD0E2UL: return new CLevelSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" case 0x63B3B461B30B4BA5UL: return new CBeamLattice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" case 0x4DF17E76926221C2UL: return new CFunctionReference(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" case 0xD85B5B6143E787E3UL: return new CVolumeDataColor(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" @@ -4821,6 +4822,18 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return resultIsComponentsObject; } + /** + * CObject::IsLevelSetObject - Retrieves, if an object is a level set object + * @return returns, whether the object is a level set object + */ + bool CObject::IsLevelSetObject() + { + bool resultIsLevelSetObject = 0; + CheckError(lib3mf_object_islevelsetobject(m_pHandle, &resultIsLevelSetObject)); + + return resultIsLevelSetObject; + } + /** * CObject::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. * @return returns whether the object is a valid object description @@ -5414,8 +5427,8 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CLevelSet::GetVolumeData - Retrieves the VolumeData this MeshObject. - * @return the VolumeData of this MeshObject + * CLevelSet::GetVolumeData - Retrieves the VolumeData this Object. + * @return the VolumeData of this Object */ PVolumeData CLevelSet::GetVolumeData() { diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h index 81812cb61..0d1683c3a 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h @@ -860,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1343,10 +1352,10 @@ typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, L typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); @@ -6488,6 +6497,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp index e7a00f8f2..b31972635 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp @@ -1425,6 +1425,7 @@ class CObject : public CResource { inline void SetPartNumber(const std::string & sPartNumber); inline bool IsMeshObject(); inline bool IsComponentsObject(); + inline bool IsLevelSetObject(); inline bool IsValid(); inline void SetAttachmentAsThumbnail(classParam pAttachment); inline PAttachment GetThumbnailAttachment(); @@ -3437,12 +3438,12 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) case 0xC2BDF5D8CBBDB1F0UL: return new CMultiPropertyGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" case 0xC4B8EC00A82BF336UL: return new CImage3DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" case 0x40E9035363ACE65EUL: return new CFunctionIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" - case 0x9FBC898CF30CDEF3UL: return new CLevelSetIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + case 0xA0C005C035D5371DUL: return new CLevelSetIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" case 0xD17716D063DE2C22UL: return new CMetaData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" case 0x0C3B85369E9B25D3UL: return new CMetaDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" case 0x2DA2136F577A779CUL: return new CObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" case 0x3B3A6DC6EC610497UL: return new CMeshObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - case 0x2BE0E57BA81B2ECBUL: return new CLevelSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + case 0xE8A7D9C192EFD0E2UL: return new CLevelSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" case 0x63B3B461B30B4BA5UL: return new CBeamLattice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" case 0x4DF17E76926221C2UL: return new CFunctionReference(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" case 0xD85B5B6143E787E3UL: return new CVolumeDataColor(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" @@ -3895,6 +3896,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Object_SetPartNumber = nullptr; pWrapperTable->m_Object_IsMeshObject = nullptr; pWrapperTable->m_Object_IsComponentsObject = nullptr; + pWrapperTable->m_Object_IsLevelSetObject = nullptr; pWrapperTable->m_Object_IsValid = nullptr; pWrapperTable->m_Object_SetAttachmentAsThumbnail = nullptr; pWrapperTable->m_Object_GetThumbnailAttachment = nullptr; @@ -5152,6 +5154,15 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if (pWrapperTable->m_Object_IsComponentsObject == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 @@ -10179,6 +10190,10 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsComponentsObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_object_islevelsetobject", (void**)&(pWrapperTable->m_Object_IsLevelSetObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsLevelSetObject == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + eLookupError = (*pLookup)("lib3mf_object_isvalid", (void**)&(pWrapperTable->m_Object_IsValid)); if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsValid == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; @@ -13307,6 +13322,18 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return resultIsComponentsObject; } + /** + * CObject::IsLevelSetObject - Retrieves, if an object is a level set object + * @return returns, whether the object is a level set object + */ + bool CObject::IsLevelSetObject() + { + bool resultIsLevelSetObject = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_IsLevelSetObject(m_pHandle, &resultIsLevelSetObject)); + + return resultIsLevelSetObject; + } + /** * CObject::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. * @return returns whether the object is a valid object description @@ -13900,8 +13927,8 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CLevelSet::GetVolumeData - Retrieves the VolumeData this MeshObject. - * @return the VolumeData of this MeshObject + * CLevelSet::GetVolumeData - Retrieves the VolumeData this Object. + * @return the VolumeData of this Object */ PVolumeData CLevelSet::GetVolumeData() { diff --git a/Autogenerated/Bindings/Go/lib3mf.go b/Autogenerated/Bindings/Go/lib3mf.go index d6bc80860..bcbfea6d0 100644 --- a/Autogenerated/Bindings/Go/lib3mf.go +++ b/Autogenerated/Bindings/Go/lib3mf.go @@ -756,6 +756,15 @@ Lib3MFResult CCall_lib3mf_object_iscomponentsobject(Lib3MFHandle libraryHandle, } +Lib3MFResult CCall_lib3mf_object_islevelsetobject(Lib3MFHandle libraryHandle, Lib3MF_Object pObject, bool * pIsLevelSetObject) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Object_IsLevelSetObject (pObject, pIsLevelSetObject); +} + + Lib3MFResult CCall_lib3mf_object_isvalid(Lib3MFHandle libraryHandle, Lib3MF_Object pObject, bool * pIsValid) { if (libraryHandle == 0) @@ -7158,6 +7167,16 @@ func (inst Object) IsComponentsObject() (bool, error) { return bool(isComponentsObject), nil } +// IsLevelSetObject retrieves, if an object is a level set object. +func (inst Object) IsLevelSetObject() (bool, error) { + var isLevelSetObject C.bool + ret := C.CCall_lib3mf_object_islevelsetobject(inst.wrapperRef.LibraryHandle, inst.Ref, &isLevelSetObject) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isLevelSetObject), nil +} + // 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 (inst Object) IsValid() (bool, error) { var isValid C.bool @@ -7715,7 +7734,7 @@ func (inst LevelSet) GetMesh() (*MeshObject, error) { return _theMeshPtr, nil } -// GetVolumeData retrieves the VolumeData this MeshObject. +// GetVolumeData retrieves the VolumeData this Object. func (inst LevelSet) GetVolumeData() (*VolumeData, error) { var theVolumeData ref ret := C.CCall_lib3mf_levelset_getvolumedata(inst.wrapperRef.LibraryHandle, inst.Ref, &theVolumeData) diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc index ec45f5118..bc569242a 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc @@ -124,6 +124,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Object_SetPartNumber = NULL; pWrapperTable->m_Object_IsMeshObject = NULL; pWrapperTable->m_Object_IsComponentsObject = NULL; + pWrapperTable->m_Object_IsLevelSetObject = NULL; pWrapperTable->m_Object_IsValid = NULL; pWrapperTable->m_Object_SetAttachmentAsThumbnail = NULL; pWrapperTable->m_Object_GetThumbnailAttachment = NULL; @@ -1385,6 +1386,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Object_IsComponentsObject == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.h b/Autogenerated/Bindings/Go/lib3mf_dynamic.h index e3c3f201b..8af146357 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.h @@ -860,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1343,10 +1352,10 @@ typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, L typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); @@ -6488,6 +6497,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc index ec45f5118..bc569242a 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc @@ -124,6 +124,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Object_SetPartNumber = NULL; pWrapperTable->m_Object_IsMeshObject = NULL; pWrapperTable->m_Object_IsComponentsObject = NULL; + pWrapperTable->m_Object_IsLevelSetObject = NULL; pWrapperTable->m_Object_IsValid = NULL; pWrapperTable->m_Object_SetAttachmentAsThumbnail = NULL; pWrapperTable->m_Object_GetThumbnailAttachment = NULL; @@ -1385,6 +1386,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Object_IsComponentsObject == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h index e3c3f201b..8af146357 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h @@ -860,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1343,10 +1352,10 @@ typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, L typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); @@ -6488,6 +6497,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc index 3ff69155a..9aee82057 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc @@ -4337,6 +4337,7 @@ void CLib3MFObject::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "SetPartNumber", SetPartNumber); NODE_SET_PROTOTYPE_METHOD(tpl, "IsMeshObject", IsMeshObject); NODE_SET_PROTOTYPE_METHOD(tpl, "IsComponentsObject", IsComponentsObject); + NODE_SET_PROTOTYPE_METHOD(tpl, "IsLevelSetObject", IsLevelSetObject); NODE_SET_PROTOTYPE_METHOD(tpl, "IsValid", IsValid); NODE_SET_PROTOTYPE_METHOD(tpl, "SetAttachmentAsThumbnail", SetAttachmentAsThumbnail); NODE_SET_PROTOTYPE_METHOD(tpl, "GetThumbnailAttachment", GetThumbnailAttachment); @@ -4578,6 +4579,28 @@ void CLib3MFObject::IsComponentsObject(const FunctionCallbackInfo& args) } +void CLib3MFObject::IsLevelSetObject(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnIsLevelSetObject = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method IsLevelSetObject."); + if (wrapperTable->m_Object_IsLevelSetObject == nullptr) + throw std::runtime_error("Could not call Lib3MF method Object::IsLevelSetObject."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Object_IsLevelSetObject(instanceHandle, &bReturnIsLevelSetObject); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnIsLevelSetObject)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFObject::IsValid(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h index 492dffb61..4e402d5b8 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h @@ -509,6 +509,7 @@ class CLib3MFObject : public CLib3MFBaseClass { static void SetPartNumber(const v8::FunctionCallbackInfo& args); static void IsMeshObject(const v8::FunctionCallbackInfo& args); static void IsComponentsObject(const v8::FunctionCallbackInfo& args); + static void IsLevelSetObject(const v8::FunctionCallbackInfo& args); static void IsValid(const v8::FunctionCallbackInfo& args); static void SetAttachmentAsThumbnail(const v8::FunctionCallbackInfo& args); static void GetThumbnailAttachment(const v8::FunctionCallbackInfo& args); diff --git a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas index 1914d9f29..e02448491 100644 --- a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas +++ b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas @@ -1428,6 +1428,15 @@ TLib3MFModel = class; *) TLib3MFObject_IsComponentsObjectFunc = function(pObject: TLib3MFHandle; out pIsComponentsObject: Byte): TLib3MFResult; cdecl; + (** + * Retrieves, if an object is a level set object + * + * @param[in] pObject - Object instance. + * @param[out] pIsLevelSetObject - returns, whether the object is a level set object + * @return error code or 0 (success) + *) + TLib3MFObject_IsLevelSetObjectFunc = function(pObject: TLib3MFHandle; out pIsLevelSetObject: Byte): TLib3MFResult; cdecl; + (** * 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. * @@ -1913,10 +1922,10 @@ TLib3MFModel = class; TLib3MFLevelSet_GetMeshFunc = function(pLevelSet: TLib3MFHandle; out pTheMesh: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Retrieves the VolumeData this MeshObject. + * Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. - * @param[out] pTheVolumeData - the VolumeData of this MeshObject + * @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) *) TLib3MFLevelSet_GetVolumeDataFunc = function(pLevelSet: TLib3MFHandle; out pTheVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; @@ -7407,6 +7416,7 @@ TLib3MFObject = class(TLib3MFResource) procedure SetPartNumber(const APartNumber: String); function IsMeshObject(): Boolean; function IsComponentsObject(): Boolean; + function IsLevelSetObject(): Boolean; function IsValid(): Boolean; procedure SetAttachmentAsThumbnail(const AAttachment: TLib3MFAttachment); function GetThumbnailAttachment(): TLib3MFAttachment; @@ -9008,6 +9018,7 @@ TLib3MFWrapper = class(TObject) FLib3MFObject_SetPartNumberFunc: TLib3MFObject_SetPartNumberFunc; FLib3MFObject_IsMeshObjectFunc: TLib3MFObject_IsMeshObjectFunc; FLib3MFObject_IsComponentsObjectFunc: TLib3MFObject_IsComponentsObjectFunc; + FLib3MFObject_IsLevelSetObjectFunc: TLib3MFObject_IsLevelSetObjectFunc; FLib3MFObject_IsValidFunc: TLib3MFObject_IsValidFunc; FLib3MFObject_SetAttachmentAsThumbnailFunc: TLib3MFObject_SetAttachmentAsThumbnailFunc; FLib3MFObject_GetThumbnailAttachmentFunc: TLib3MFObject_GetThumbnailAttachmentFunc; @@ -9617,6 +9628,7 @@ TLib3MFWrapper = class(TObject) property Lib3MFObject_SetPartNumberFunc: TLib3MFObject_SetPartNumberFunc read FLib3MFObject_SetPartNumberFunc; property Lib3MFObject_IsMeshObjectFunc: TLib3MFObject_IsMeshObjectFunc read FLib3MFObject_IsMeshObjectFunc; property Lib3MFObject_IsComponentsObjectFunc: TLib3MFObject_IsComponentsObjectFunc read FLib3MFObject_IsComponentsObjectFunc; + property Lib3MFObject_IsLevelSetObjectFunc: TLib3MFObject_IsLevelSetObjectFunc read FLib3MFObject_IsLevelSetObjectFunc; property Lib3MFObject_IsValidFunc: TLib3MFObject_IsValidFunc read FLib3MFObject_IsValidFunc; property Lib3MFObject_SetAttachmentAsThumbnailFunc: TLib3MFObject_SetAttachmentAsThumbnailFunc read FLib3MFObject_SetAttachmentAsThumbnailFunc; property Lib3MFObject_GetThumbnailAttachmentFunc: TLib3MFObject_GetThumbnailAttachmentFunc read FLib3MFObject_GetThumbnailAttachmentFunc; @@ -11059,12 +11071,12 @@ implementation QWord($C2BDF5D8CBBDB1F0): begin Obj := TLIB3MFMultiPropertyGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" QWord($C4B8EC00A82BF336): begin Obj := TLIB3MFImage3DIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" QWord($40E9035363ACE65E): begin Obj := TLIB3MFFunctionIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" - QWord($9FBC898CF30CDEF3): begin Obj := TLIB3MFLevelSetIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + QWord($A0C005C035D5371D): begin Obj := TLIB3MFLevelSetIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" QWord($D17716D063DE2C22): begin Obj := TLIB3MFMetaData.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" QWord($0C3B85369E9B25D3): begin Obj := TLIB3MFMetaDataGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" QWord($2DA2136F577A779C): begin Obj := TLIB3MFObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Object" QWord($3B3A6DC6EC610497): begin Obj := TLIB3MFMeshObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - QWord($2BE0E57BA81B2ECB): begin Obj := TLIB3MFLevelSet.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + QWord($E8A7D9C192EFD0E2): begin Obj := TLIB3MFLevelSet.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" QWord($63B3B461B30B4BA5): begin Obj := TLIB3MFBeamLattice.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" QWord($4DF17E76926221C2): begin Obj := TLIB3MFFunctionReference.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" QWord($D85B5B6143E787E3): begin Obj := TLIB3MFVolumeDataColor.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" @@ -12668,6 +12680,15 @@ implementation Result := (ResultIsComponentsObject <> 0); end; + function TLib3MFObject.IsLevelSetObject(): Boolean; + var + ResultIsLevelSetObject: Byte; + begin + ResultIsLevelSetObject := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsLevelSetObjectFunc(FHandle, ResultIsLevelSetObject)); + Result := (ResultIsLevelSetObject <> 0); + end; + function TLib3MFObject.IsValid(): Boolean; var ResultIsValid: Byte; @@ -18905,6 +18926,7 @@ implementation FLib3MFObject_SetPartNumberFunc := LoadFunction('lib3mf_object_setpartnumber'); FLib3MFObject_IsMeshObjectFunc := LoadFunction('lib3mf_object_ismeshobject'); FLib3MFObject_IsComponentsObjectFunc := LoadFunction('lib3mf_object_iscomponentsobject'); + FLib3MFObject_IsLevelSetObjectFunc := LoadFunction('lib3mf_object_islevelsetobject'); FLib3MFObject_IsValidFunc := LoadFunction('lib3mf_object_isvalid'); FLib3MFObject_SetAttachmentAsThumbnailFunc := LoadFunction('lib3mf_object_setattachmentasthumbnail'); FLib3MFObject_GetThumbnailAttachmentFunc := LoadFunction('lib3mf_object_getthumbnailattachment'); @@ -19665,6 +19687,9 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_object_iscomponentsobject'), @FLib3MFObject_IsComponentsObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_islevelsetobject'), @FLib3MFObject_IsLevelSetObjectFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_object_isvalid'), @FLib3MFObject_IsValidFunc); diff --git a/Autogenerated/Bindings/Python/Lib3MF.py b/Autogenerated/Bindings/Python/Lib3MF.py index 643bb4a7d..f91b7eef1 100644 --- a/Autogenerated/Bindings/Python/Lib3MF.py +++ b/Autogenerated/Bindings/Python/Lib3MF.py @@ -210,6 +210,7 @@ class FunctionTable: lib3mf_object_setpartnumber = None lib3mf_object_ismeshobject = None lib3mf_object_iscomponentsobject = None + lib3mf_object_islevelsetobject = None lib3mf_object_isvalid = None lib3mf_object_setattachmentasthumbnail = None lib3mf_object_getthumbnailattachment = None @@ -1693,6 +1694,12 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) self.lib.lib3mf_object_iscomponentsobject = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_object_islevelsetobject")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_object_islevelsetobject = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_object_isvalid")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -5007,6 +5014,9 @@ def _loadFunctionTable(self): self.lib.lib3mf_object_iscomponentsobject.restype = ctypes.c_int32 self.lib.lib3mf_object_iscomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + self.lib.lib3mf_object_islevelsetobject.restype = ctypes.c_int32 + self.lib.lib3mf_object_islevelsetobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + self.lib.lib3mf_object_isvalid.restype = ctypes.c_int32 self.lib.lib3mf_object_isvalid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] @@ -6761,7 +6771,7 @@ def getObjectById_C4B8EC00A82BF336(self, handle, wrapper): # First 64 bits of SH return Image3DIterator(handle, wrapper) def getObjectById_40E9035363ACE65E(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" return FunctionIterator(handle, wrapper) - def getObjectById_9FBC898CF30CDEF3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + def getObjectById_A0C005C035D5371D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" return LevelSetIterator(handle, wrapper) def getObjectById_D17716D063DE2C22(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MetaData" return MetaData(handle, wrapper) @@ -6771,7 +6781,7 @@ def getObjectById_2DA2136F577A779C(self, handle, wrapper): # First 64 bits of SH return Object(handle, wrapper) def getObjectById_3B3A6DC6EC610497(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" return MeshObject(handle, wrapper) - def getObjectById_2BE0E57BA81B2ECB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + def getObjectById_E8A7D9C192EFD0E2(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" return LevelSet(handle, wrapper) def getObjectById_63B3B461B30B4BA5(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" return BeamLattice(handle, wrapper) @@ -7703,6 +7713,12 @@ def IsComponentsObject(self): return pIsComponentsObject.value + def IsLevelSetObject(self): + pIsLevelSetObject = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_islevelsetobject(self._handle, pIsLevelSetObject)) + + return pIsLevelSetObject.value + def IsValid(self): pIsValid = ctypes.c_bool() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_isvalid(self._handle, pIsValid)) diff --git a/Autogenerated/Source/lib3mf_abi.hpp b/Autogenerated/Source/lib3mf_abi.hpp index a968b54c5..a1aae9f0f 100644 --- a/Autogenerated/Source/lib3mf_abi.hpp +++ b/Autogenerated/Source/lib3mf_abi.hpp @@ -873,6 +873,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_ismeshobject(Lib3MF_Object pObject, b */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * 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. * @@ -1356,10 +1365,10 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); /** -* Retrieves the VolumeData this MeshObject. +* Retrieves the VolumeData this Object. * * @param[in] pLevelSet - LevelSet instance. -* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @param[out] pTheVolumeData - the VolumeData of this Object * @return error code or 0 (success) */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); diff --git a/Autogenerated/Source/lib3mf_interfaces.hpp b/Autogenerated/Source/lib3mf_interfaces.hpp index 474c74277..8ff1ecaee 100644 --- a/Autogenerated/Source/lib3mf_interfaces.hpp +++ b/Autogenerated/Source/lib3mf_interfaces.hpp @@ -1037,7 +1037,7 @@ class ILevelSetIterator : public virtual IResourceIterator { */ Lib3MF_uint64 ClassTypeId() override { - return 0x9FBC898CF30CDEF3UL; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + return 0xA0C005C035D5371DUL; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" } /** @@ -1264,6 +1264,12 @@ class IObject : public virtual IResource { */ virtual bool IsComponentsObject() = 0; + /** + * IObject::IsLevelSetObject - Retrieves, if an object is a level set object + * @return returns, whether the object is a level set object + */ + virtual bool IsLevelSetObject() = 0; + /** * IObject::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. * @return returns whether the object is a valid object description @@ -1537,7 +1543,7 @@ class ILevelSet : public virtual IObject { */ Lib3MF_uint64 ClassTypeId() override { - return 0x2BE0E57BA81B2ECBUL; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + return 0xE8A7D9C192EFD0E2UL; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" } /** @@ -1625,8 +1631,8 @@ class ILevelSet : public virtual IObject { virtual IMeshObject * GetMesh() = 0; /** - * ILevelSet::GetVolumeData - Retrieves the VolumeData this MeshObject. - * @return the VolumeData of this MeshObject + * ILevelSet::GetVolumeData - Retrieves the VolumeData this Object. + * @return the VolumeData of this Object */ virtual IVolumeData * GetVolumeData() = 0; diff --git a/Autogenerated/Source/lib3mf_interfacewrapper.cpp b/Autogenerated/Source/lib3mf_interfacewrapper.cpp index 50b10724f..136f57ce5 100644 --- a/Autogenerated/Source/lib3mf_interfacewrapper.cpp +++ b/Autogenerated/Source/lib3mf_interfacewrapper.cpp @@ -3044,6 +3044,40 @@ Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsC } } +Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject) +{ + IBase* pIBaseClass = (IBase *)pObject; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pObject, "Object", "IsLevelSetObject"); + } + if (pIsLevelSetObject == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IObject* pIObject = dynamic_cast(pIBaseClass); + if (!pIObject) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pIsLevelSetObject = pIObject->IsLevelSetObject(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("IsLevelSetObject", *pIsLevelSetObject); + 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_object_isvalid(Lib3MF_Object pObject, bool * pIsValid) { IBase* pIBaseClass = (IBase *)pObject; @@ -22699,6 +22733,8 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_object_ismeshobject; if (sProcName == "lib3mf_object_iscomponentsobject") *ppProcAddress = (void*) &lib3mf_object_iscomponentsobject; + if (sProcName == "lib3mf_object_islevelsetobject") + *ppProcAddress = (void*) &lib3mf_object_islevelsetobject; if (sProcName == "lib3mf_object_isvalid") *ppProcAddress = (void*) &lib3mf_object_isvalid; if (sProcName == "lib3mf_object_setattachmentasthumbnail") diff --git a/AutomaticComponentToolkit/lib3mf.xml b/AutomaticComponentToolkit/lib3mf.xml index 50971ff02..626ab2ea0 100644 --- a/AutomaticComponentToolkit/lib3mf.xml +++ b/AutomaticComponentToolkit/lib3mf.xml @@ -787,6 +787,12 @@ + + + + - + + description="the VolumeData of this Object" /> setVolumeData(pVolumeData); } -bool Lib3MF::Impl::CLevelSet::IsMeshObject() +bool CLevelSet::IsMeshObject() { return false; } +bool CLevelSet::IsLevelSetObject() +{ + return true; +} + IVolumeData * CLevelSet::GetVolumeData() { NMR::PModelVolumeData pVolumeData = levelSetObject()->getVolumeData(); diff --git a/Source/API/lib3mf_meshobject.cpp b/Source/API/lib3mf_meshobject.cpp index cebef9773..9c08449f6 100644 --- a/Source/API/lib3mf_meshobject.cpp +++ b/Source/API/lib3mf_meshobject.cpp @@ -382,6 +382,11 @@ bool CMeshObject::IsComponentsObject() return false; } +bool CMeshObject::IsLevelSetObject() +{ + return false; +} + bool CMeshObject::IsValid() { return meshObject()->isValid(); diff --git a/Source/API/lib3mf_object.cpp b/Source/API/lib3mf_object.cpp index aa87cecd7..b292f473a 100644 --- a/Source/API/lib3mf_object.cpp +++ b/Source/API/lib3mf_object.cpp @@ -124,6 +124,13 @@ bool CObject::IsComponentsObject () throw ELib3MFInterfaceException(LIB3MF_ERROR_SHOULDNOTBECALLED); } +bool CObject::IsLevelSetObject() +{ + // overwritten by child class + throw ELib3MFInterfaceException(LIB3MF_ERROR_SHOULDNOTBECALLED); +} + + IMeshObject * CObject::AsMeshObject() { if (dynamic_cast(resource().get())) diff --git a/Tests/CPP_Bindings/Source/Volumetric.cpp b/Tests/CPP_Bindings/Source/Volumetric.cpp index 0a1297974..740ba2db8 100644 --- a/Tests/CPP_Bindings/Source/Volumetric.cpp +++ b/Tests/CPP_Bindings/Source/Volumetric.cpp @@ -743,11 +743,11 @@ namespace Lib3MF // Add a boundary to the volume data auto theMesh = GetMesh(); - auto theBoundary = model->AddLevelSet(); - theBoundary->SetMesh(theMesh); - theBoundary->SetFunction(newFunction.get()); - theBoundary->SetMinFeatureSize(0.1); - theBoundary->SetChannelName("shape"); + auto theLevelSet = model->AddLevelSet(); + theLevelSet->SetMesh(theMesh); + theLevelSet->SetFunction(newFunction.get()); + theLevelSet->SetMinFeatureSize(0.1); + theLevelSet->SetChannelName("shape"); // Write the model to a file writer3MF->WriteToFile(Volumetric::OutFolder +