Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ SetupWriteRead5.3mf
v093reout.3mf
.vs
.idea
cmake-build-*
cmake-build-*
TODO.md
Testing
177 changes: 176 additions & 1 deletion Autogenerated/Bindings/C/lib3mf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1.
Abstract: This is an autogenerated plain C Header file in order to allow an easy
use of the 3MF Library

Interface version: 2.5.0
Interface version: 2.6.0

*/

Expand Down Expand Up @@ -497,6 +497,19 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobjectiterator_getcurrentmeshobject(Lib3
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobjectiterator_getcurrentcomponentsobject(Lib3MF_ComponentsObjectIterator pComponentsObjectIterator, Lib3MF_ComponentsObject * pResource);

/*************************************************************************************************************************
Class definition for BooleanObjectIterator
**************************************************************************************************************************/

/**
* Returns the BooleanObject the iterator points at.
*
* @param[in] pBooleanObjectIterator - BooleanObjectIterator instance.
* @param[out] pResource - returns the BooleanObject instance.
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobjectiterator_getcurrentbooleanobject(Lib3MF_BooleanObjectIterator pBooleanObjectIterator, Lib3MF_BooleanObject * pResource);

/*************************************************************************************************************************
Class definition for Texture2DIterator
**************************************************************************************************************************/
Expand Down Expand Up @@ -1011,6 +1024,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObj
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject);

/**
* Retrieves, if an object is a boolean object
*
* @param[in] pObject - Object instance.
* @param[out] pIsBooleanObject - returns, whether the object is a boolean object
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_isbooleanobject(Lib3MF_Object pObject, bool * pIsBooleanObject);

/**
* 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 @@ -1561,6 +1583,131 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLeve
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData);

/*************************************************************************************************************************
Class definition for BooleanObject
**************************************************************************************************************************/

/**
* Sets the base object and transform for the boolean shape.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] pBaseObject - base object of the boolean shape
* @param[in] pTransform - transform applied to the base object
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_setbaseobject(Lib3MF_BooleanObject pBooleanObject, Lib3MF_Object pBaseObject, const sLib3MFTransform * pTransform);

/**
* Returns the base object of the boolean shape.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[out] pBaseObject - base object of the boolean shape
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getbaseobject(Lib3MF_BooleanObject pBooleanObject, Lib3MF_Object * pBaseObject);

/**
* Sets the base transform of the boolean shape.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] pTransform - transform applied to the base object
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_setbasetransform(Lib3MF_BooleanObject pBooleanObject, const sLib3MFTransform * pTransform);

/**
* Returns the base transform of the boolean shape.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[out] pTransform - transform applied to the base object
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getbasetransform(Lib3MF_BooleanObject pBooleanObject, sLib3MFTransform * pTransform);

/**
* Sets the boolean operation used for the boolean shape.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] eOperation - boolean operation used for the shape
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_setoperation(Lib3MF_BooleanObject pBooleanObject, eLib3MFBooleanOperation eOperation);

/**
* Returns the boolean operation used for the boolean shape.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[out] pOperation - boolean operation used for the shape
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getoperation(Lib3MF_BooleanObject pBooleanObject, eLib3MFBooleanOperation * pOperation);

/**
* Enables or disables CSG field evaluation for boolean-to-mesh materialization.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] bCSGModeEnabled - if true, boolean materialization uses CSG field evaluation; otherwise, uses flattening fallback
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_setcsgmodeenabled(Lib3MF_BooleanObject pBooleanObject, bool bCSGModeEnabled);

/**
* Returns whether CSG field evaluation is enabled for boolean-to-mesh materialization.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[out] pCSGModeEnabled - if true, boolean materialization uses CSG field evaluation; otherwise, uses flattening fallback
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getcsgmodeenabled(Lib3MF_BooleanObject pBooleanObject, bool * pCSGModeEnabled);

/**
* Sets the extraction grid resolution used for boolean-to-mesh materialization.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] nGridResolution - extraction grid resolution for boolean surface extraction
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_setextractiongridresolution(Lib3MF_BooleanObject pBooleanObject, Lib3MF_uint32 nGridResolution);

/**
* Returns the extraction grid resolution used for boolean-to-mesh materialization.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[out] pGridResolution - extraction grid resolution for boolean surface extraction
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getextractiongridresolution(Lib3MF_BooleanObject pBooleanObject, Lib3MF_uint32 * pGridResolution);

/**
* Returns the number of operands in the boolean sequence.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[out] pCount - number of operands in the boolean sequence
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getoperandcount(Lib3MF_BooleanObject pBooleanObject, Lib3MF_uint32 * pCount);

/**
* Adds an operand object to the boolean sequence.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] pOperandObject - mesh object used as operand
* @param[in] pTransform - transform applied to the operand object
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_addoperand(Lib3MF_BooleanObject pBooleanObject, Lib3MF_MeshObject pOperandObject, const sLib3MFTransform * pTransform);

/**
* Returns one operand object and transform from the boolean sequence.
*
* @param[in] pBooleanObject - BooleanObject instance.
* @param[in] nIndex - index of the operand in the boolean sequence
* @param[out] pOperandObject - mesh object used as operand
* @param[out] pTransform - transform applied to the operand object
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_booleanobject_getoperand(Lib3MF_BooleanObject pBooleanObject, Lib3MF_uint32 nIndex, Lib3MF_MeshObject * pOperandObject, sLib3MFTransform * pTransform);

/*************************************************************************************************************************
Class definition for BeamLattice
**************************************************************************************************************************/
Expand Down Expand Up @@ -6178,6 +6325,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getmeshobjectbyid(Lib3MF_Model pModel,
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcomponentsobjectbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ComponentsObject * pComponentsObjectInstance);

/**
* finds a boolean object by its UniqueResourceID
*
* @param[in] pModel - Model instance.
* @param[in] nUniqueResourceID - UniqueResourceID
* @param[out] pBooleanObjectInstance - returns the boolean object instance
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getbooleanobjectbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_BooleanObject * pBooleanObjectInstance);

/**
* finds a model color group by its UniqueResourceID
*
Expand Down Expand Up @@ -6283,6 +6440,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getmeshobjects(Lib3MF_Model pModel, Li
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcomponentsobjects(Lib3MF_Model pModel, Lib3MF_ComponentsObjectIterator * pResourceIterator);

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

/**
* creates a Texture2DIterator instance with all texture2d resources.
*
Expand Down Expand Up @@ -6391,6 +6557,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addmeshobject(Lib3MF_Model pModel, Lib
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addcomponentsobject(Lib3MF_Model pModel, Lib3MF_ComponentsObject * pComponentsObjectInstance);

/**
* adds an empty boolean object to the model.
*
* @param[in] pModel - Model instance.
* @param[out] pBooleanObjectInstance - returns the boolean object instance
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addbooleanobject(Lib3MF_Model pModel, Lib3MF_BooleanObject * pBooleanObjectInstance);

/**
* creates a new model slicestack by its id
*
Expand Down
17 changes: 15 additions & 2 deletions Autogenerated/Bindings/C/lib3mf_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1.
Abstract: This is an autogenerated plain C Header file with basic types in
order to allow an easy use of the 3MF Library

Interface version: 2.5.0
Interface version: 2.6.0

*/

Expand Down Expand Up @@ -84,7 +84,7 @@ typedef void * Lib3MF_pvoid;
**************************************************************************************************************************/

#define LIB3MF_VERSION_MAJOR 2
#define LIB3MF_VERSION_MINOR 5
#define LIB3MF_VERSION_MINOR 6
#define LIB3MF_VERSION_MICRO 0
#define LIB3MF_VERSION_PRERELEASEINFO ""
#define LIB3MF_VERSION_BUILDINFO ""
Expand Down Expand Up @@ -220,6 +220,7 @@ typedef Lib3MFHandle Lib3MF_SliceStackIterator;
typedef Lib3MFHandle Lib3MF_ObjectIterator;
typedef Lib3MFHandle Lib3MF_MeshObjectIterator;
typedef Lib3MFHandle Lib3MF_ComponentsObjectIterator;
typedef Lib3MFHandle Lib3MF_BooleanObjectIterator;
typedef Lib3MFHandle Lib3MF_Texture2DIterator;
typedef Lib3MFHandle Lib3MF_BaseMaterialGroupIterator;
typedef Lib3MFHandle Lib3MF_ColorGroupIterator;
Expand All @@ -235,6 +236,7 @@ typedef Lib3MFHandle Lib3MF_TriangleSet;
typedef Lib3MFHandle Lib3MF_Object;
typedef Lib3MFHandle Lib3MF_MeshObject;
typedef Lib3MFHandle Lib3MF_LevelSet;
typedef Lib3MFHandle Lib3MF_BooleanObject;
typedef Lib3MFHandle Lib3MF_BeamLattice;
typedef Lib3MFHandle Lib3MF_FunctionReference;
typedef Lib3MFHandle Lib3MF_VolumeDataColor;
Expand Down Expand Up @@ -365,6 +367,12 @@ typedef enum eLib3MFObjectType {
eObjectTypeSurface = 4
} eLib3MFObjectType;

typedef enum eLib3MFBooleanOperation {
eBooleanOperationUnion = 0,
eBooleanOperationDifference = 1,
eBooleanOperationIntersection = 2
} eLib3MFBooleanOperation;

typedef enum eLib3MFTextureType {
eTextureTypeUnknown = 0,
eTextureTypePNG = 1,
Expand Down Expand Up @@ -585,6 +593,11 @@ typedef union {
int m_code;
} structEnumLib3MFObjectType;

typedef union {
eLib3MFBooleanOperation m_enum;
int m_code;
} structEnumLib3MFBooleanOperation;

typedef union {
eLib3MFTextureType m_enum;
int m_code;
Expand Down
Loading
Loading