Skip to content

Commit

Permalink
[Volumetric tests] Tests pass again
Browse files Browse the repository at this point in the history
  • Loading branch information
3dJan committed Apr 3, 2024
1 parent 7a724ae commit 0812191
Show file tree
Hide file tree
Showing 53 changed files with 1,138 additions and 47 deletions.
22 changes: 22 additions & 0 deletions Autogenerated/Bindings/C/lib3mf.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,19 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Ima
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioniterator_getcurrentfunction(Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource);

/*************************************************************************************************************************
Class definition for BoundaryShapeIterator
**************************************************************************************************************************/

/**
* Returns the BoundaryShape the iterator points at.
*
* @param[in] pBoundaryShapeIterator - BoundaryShapeIterator instance.
* @param[out] pResource - returns the MeshObject instance.
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_boundaryshapeiterator_getcurrentboundaryshape(Lib3MF_BoundaryShapeIterator pBoundaryShapeIterator, Lib3MF_BoundaryShape * pResource);

/*************************************************************************************************************************
Class definition for MetaData
**************************************************************************************************************************/
Expand Down Expand Up @@ -6199,6 +6212,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addboundaryshape(Lib3MF_Model pModel, Lib3MF_BoundaryShape * pBoundaryShapeInstance);

/**
* creates a resource iterator instance with all boundary shape resources.
*
* @param[in] pModel - Model instance.
* @param[out] pResourceIterator - returns the iterator instance.
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getboundaryshapes(Lib3MF_Model pModel, Lib3MF_BoundaryShapeIterator * pResourceIterator);

/*************************************************************************************************************************
Global functions
**************************************************************************************************************************/
Expand Down
1 change: 1 addition & 0 deletions Autogenerated/Bindings/C/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator;
typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator;
typedef Lib3MFHandle Lib3MF_Image3DIterator;
typedef Lib3MFHandle Lib3MF_FunctionIterator;
typedef Lib3MFHandle Lib3MF_BoundaryShapeIterator;
typedef Lib3MFHandle Lib3MF_MetaData;
typedef Lib3MFHandle Lib3MF_MetaDataGroup;
typedef Lib3MFHandle Lib3MF_Object;
Expand Down
20 changes: 20 additions & 0 deletions Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable)
pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = NULL;
pWrapperTable->m_Image3DIterator_GetCurrentImage3D = NULL;
pWrapperTable->m_FunctionIterator_GetCurrentFunction = NULL;
pWrapperTable->m_BoundaryShapeIterator_GetCurrentBoundaryShape = NULL;
pWrapperTable->m_MetaData_GetNameSpace = NULL;
pWrapperTable->m_MetaData_SetNameSpace = NULL;
pWrapperTable->m_MetaData_GetName = NULL;
Expand Down Expand Up @@ -626,6 +627,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable)
pWrapperTable->m_Model_AddFunctionFromImage3D = NULL;
pWrapperTable->m_Model_AddVolumeData = NULL;
pWrapperTable->m_Model_AddBoundaryShape = NULL;
pWrapperTable->m_Model_GetBoundaryShapes = NULL;
pWrapperTable->m_GetLibraryVersion = NULL;
pWrapperTable->m_GetPrereleaseInformation = NULL;
pWrapperTable->m_GetBuildInformation = NULL;
Expand Down Expand Up @@ -1149,6 +1151,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable,
if (pWrapperTable->m_FunctionIterator_GetCurrentFunction == NULL)
return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT;

#ifdef _WIN32
pWrapperTable->m_BoundaryShapeIterator_GetCurrentBoundaryShape = (PLib3MFBoundaryShapeIterator_GetCurrentBoundaryShapePtr) GetProcAddress(hLibrary, "lib3mf_boundaryshapeiterator_getcurrentboundaryshape");
#else // _WIN32
pWrapperTable->m_BoundaryShapeIterator_GetCurrentBoundaryShape = (PLib3MFBoundaryShapeIterator_GetCurrentBoundaryShapePtr) dlsym(hLibrary, "lib3mf_boundaryshapeiterator_getcurrentboundaryshape");
dlerror();
#endif // _WIN32
if (pWrapperTable->m_BoundaryShapeIterator_GetCurrentBoundaryShape == NULL)
return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT;

#ifdef _WIN32
pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getnamespace");
#else // _WIN32
Expand Down Expand Up @@ -5901,6 +5912,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable,
if (pWrapperTable->m_Model_AddBoundaryShape == NULL)
return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT;

#ifdef _WIN32
pWrapperTable->m_Model_GetBoundaryShapes = (PLib3MFModel_GetBoundaryShapesPtr) GetProcAddress(hLibrary, "lib3mf_model_getboundaryshapes");
#else // _WIN32
pWrapperTable->m_Model_GetBoundaryShapes = (PLib3MFModel_GetBoundaryShapesPtr) dlsym(hLibrary, "lib3mf_model_getboundaryshapes");
dlerror();
#endif // _WIN32
if (pWrapperTable->m_Model_GetBoundaryShapes == NULL)
return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT;

#ifdef _WIN32
pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) GetProcAddress(hLibrary, "lib3mf_getlibraryversion");
#else // _WIN32
Expand Down
24 changes: 24 additions & 0 deletions Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,19 @@ typedef Lib3MFResult (*PLib3MFImage3DIterator_GetCurrentImage3DPtr) (Lib3MF_Imag
*/
typedef Lib3MFResult (*PLib3MFFunctionIterator_GetCurrentFunctionPtr) (Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource);

/*************************************************************************************************************************
Class definition for BoundaryShapeIterator
**************************************************************************************************************************/

/**
* Returns the BoundaryShape the iterator points at.
*
* @param[in] pBoundaryShapeIterator - BoundaryShapeIterator instance.
* @param[out] pResource - returns the MeshObject instance.
* @return error code or 0 (success)
*/
typedef Lib3MFResult (*PLib3MFBoundaryShapeIterator_GetCurrentBoundaryShapePtr) (Lib3MF_BoundaryShapeIterator pBoundaryShapeIterator, Lib3MF_BoundaryShape * pResource);

/*************************************************************************************************************************
Class definition for MetaData
**************************************************************************************************************************/
Expand Down Expand Up @@ -6186,6 +6199,15 @@ typedef Lib3MFResult (*PLib3MFModel_AddVolumeDataPtr) (Lib3MF_Model pModel, Lib3
*/
typedef Lib3MFResult (*PLib3MFModel_AddBoundaryShapePtr) (Lib3MF_Model pModel, Lib3MF_BoundaryShape * pBoundaryShapeInstance);

/**
* creates a resource iterator instance with all boundary shape resources.
*
* @param[in] pModel - Model instance.
* @param[out] pResourceIterator - returns the iterator instance.
* @return error code or 0 (success)
*/
typedef Lib3MFResult (*PLib3MFModel_GetBoundaryShapesPtr) (Lib3MF_Model pModel, Lib3MF_BoundaryShapeIterator * pResourceIterator);

/*************************************************************************************************************************
Global functions
**************************************************************************************************************************/
Expand Down Expand Up @@ -6440,6 +6462,7 @@ typedef struct {
PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup;
PLib3MFImage3DIterator_GetCurrentImage3DPtr m_Image3DIterator_GetCurrentImage3D;
PLib3MFFunctionIterator_GetCurrentFunctionPtr m_FunctionIterator_GetCurrentFunction;
PLib3MFBoundaryShapeIterator_GetCurrentBoundaryShapePtr m_BoundaryShapeIterator_GetCurrentBoundaryShape;
PLib3MFMetaData_GetNameSpacePtr m_MetaData_GetNameSpace;
PLib3MFMetaData_SetNameSpacePtr m_MetaData_SetNameSpace;
PLib3MFMetaData_GetNamePtr m_MetaData_GetName;
Expand Down Expand Up @@ -6968,6 +6991,7 @@ typedef struct {
PLib3MFModel_AddFunctionFromImage3DPtr m_Model_AddFunctionFromImage3D;
PLib3MFModel_AddVolumeDataPtr m_Model_AddVolumeData;
PLib3MFModel_AddBoundaryShapePtr m_Model_AddBoundaryShape;
PLib3MFModel_GetBoundaryShapesPtr m_Model_GetBoundaryShapes;
PLib3MFGetLibraryVersionPtr m_GetLibraryVersion;
PLib3MFGetPrereleaseInformationPtr m_GetPrereleaseInformation;
PLib3MFGetBuildInformationPtr m_GetBuildInformation;
Expand Down
1 change: 1 addition & 0 deletions Autogenerated/Bindings/CDynamic/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator;
typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator;
typedef Lib3MFHandle Lib3MF_Image3DIterator;
typedef Lib3MFHandle Lib3MF_FunctionIterator;
typedef Lib3MFHandle Lib3MF_BoundaryShapeIterator;
typedef Lib3MFHandle Lib3MF_MetaData;
typedef Lib3MFHandle Lib3MF_MetaDataGroup;
typedef Lib3MFHandle Lib3MF_Object;
Expand Down
31 changes: 31 additions & 0 deletions Autogenerated/Bindings/CSharp/Lib3MF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,9 @@ public class Lib3MFWrapper
[DllImport("lib3mf.dll", EntryPoint = "lib3mf_functioniterator_getcurrentfunction", CallingConvention=CallingConvention.Cdecl)]
public unsafe extern static Int32 FunctionIterator_GetCurrentFunction (IntPtr Handle, out IntPtr AResource);

[DllImport("lib3mf.dll", EntryPoint = "lib3mf_boundaryshapeiterator_getcurrentboundaryshape", CallingConvention=CallingConvention.Cdecl)]
public unsafe extern static Int32 BoundaryShapeIterator_GetCurrentBoundaryShape (IntPtr Handle, out IntPtr AResource);

[DllImport("lib3mf.dll", EntryPoint = "lib3mf_metadata_getnamespace", CallingConvention=CallingConvention.Cdecl)]
public unsafe extern static Int32 MetaData_GetNameSpace (IntPtr Handle, UInt32 sizeNameSpace, out UInt32 neededNameSpace, IntPtr dataNameSpace);

Expand Down Expand Up @@ -2168,6 +2171,9 @@ public class Lib3MFWrapper
[DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addboundaryshape", CallingConvention=CallingConvention.Cdecl)]
public unsafe extern static Int32 Model_AddBoundaryShape (IntPtr Handle, out IntPtr ABoundaryShapeInstance);

[DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getboundaryshapes", CallingConvention=CallingConvention.Cdecl)]
public unsafe extern static Int32 Model_GetBoundaryShapes (IntPtr Handle, out IntPtr AResourceIterator);

[DllImport("lib3mf.dll", EntryPoint = "lib3mf_getlibraryversion", CharSet = CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)]
public extern static Int32 GetLibraryVersion (out UInt32 AMajor, out UInt32 AMinor, out UInt32 AMicro);

Expand Down Expand Up @@ -2598,6 +2604,7 @@ 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 CBoundaryShapeIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BoundaryShapeIterator"
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"
Expand Down Expand Up @@ -3282,6 +3289,22 @@ public CFunction GetCurrentFunction ()

}

public class CBoundaryShapeIterator : CResourceIterator
{
public CBoundaryShapeIterator (IntPtr NewHandle) : base (NewHandle)
{
}

public CBoundaryShape GetCurrentBoundaryShape ()
{
IntPtr newResource = IntPtr.Zero;

CheckError(Internal.Lib3MFWrapper.BoundaryShapeIterator_GetCurrentBoundaryShape (Handle, out newResource));
return Internal.Lib3MFWrapper.PolymorphicFactory<CBoundaryShape>(newResource);
}

}

public class CMetaData : CBase
{
public CMetaData (IntPtr NewHandle) : base (NewHandle)
Expand Down Expand Up @@ -8844,6 +8867,14 @@ public CBoundaryShape AddBoundaryShape ()
return Internal.Lib3MFWrapper.PolymorphicFactory<CBoundaryShape>(newBoundaryShapeInstance);
}

public CBoundaryShapeIterator GetBoundaryShapes ()
{
IntPtr newResourceIterator = IntPtr.Zero;

CheckError(Internal.Lib3MFWrapper.Model_GetBoundaryShapes (Handle, out newResourceIterator));
return Internal.Lib3MFWrapper.PolymorphicFactory<CBoundaryShapeIterator>(newResourceIterator);
}

}

class Wrapper
Expand Down
22 changes: 22 additions & 0 deletions Autogenerated/Bindings/Cpp/lib3mf_abi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,19 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Ima
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioniterator_getcurrentfunction(Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource);

/*************************************************************************************************************************
Class definition for BoundaryShapeIterator
**************************************************************************************************************************/

/**
* Returns the BoundaryShape the iterator points at.
*
* @param[in] pBoundaryShapeIterator - BoundaryShapeIterator instance.
* @param[out] pResource - returns the MeshObject instance.
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_boundaryshapeiterator_getcurrentboundaryshape(Lib3MF_BoundaryShapeIterator pBoundaryShapeIterator, Lib3MF_BoundaryShape * pResource);

/*************************************************************************************************************************
Class definition for MetaData
**************************************************************************************************************************/
Expand Down Expand Up @@ -6199,6 +6212,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addboundaryshape(Lib3MF_Model pModel, Lib3MF_BoundaryShape * pBoundaryShapeInstance);

/**
* creates a resource iterator instance with all boundary shape resources.
*
* @param[in] pModel - Model instance.
* @param[out] pResourceIterator - returns the iterator instance.
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getboundaryshapes(Lib3MF_Model pModel, Lib3MF_BoundaryShapeIterator * pResourceIterator);

/*************************************************************************************************************************
Global functions
**************************************************************************************************************************/
Expand Down
Loading

0 comments on commit 0812191

Please sign in to comment.