Skip to content

Commit

Permalink
Introducing IsLevelSetObject
Browse files Browse the repository at this point in the history
  • Loading branch information
3dJan committed Apr 8, 2024
1 parent 7c98e50 commit dc43e60
Show file tree
Hide file tree
Showing 30 changed files with 353 additions and 44 deletions.
13 changes: 11 additions & 2 deletions Autogenerated/Bindings/C/lib3mf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
15 changes: 13 additions & 2 deletions Autogenerated/Bindings/CSharp/Lib3MF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -2604,12 +2607,12 @@ public static T PolymorphicFactory<T>(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"
Expand Down Expand Up @@ -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;
Expand Down
13 changes: 11 additions & 2 deletions Autogenerated/Bindings/Cpp/lib3mf_abi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down
21 changes: 17 additions & 4 deletions Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<CAttachment> pAttachment);
inline PAttachment GetThumbnailAttachment();
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
{
Expand Down
14 changes: 12 additions & 2 deletions Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit dc43e60

Please sign in to comment.