Skip to content

Commit

Permalink
Merge branch 'develop' into vijai/golang_examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaiaeroastro committed Dec 16, 2024
2 parents bd16ead + 932f2d6 commit c12fa20
Show file tree
Hide file tree
Showing 391 changed files with 163,410 additions and 27,735 deletions.
14 changes: 14 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
BasedOnStyle: Google
IndentWidth: 4
AllowShortFunctionsOnASingleLine: Inline
PointerAlignment: Left
SpaceBeforeParens: Never
SpacesInParentheses: false
MaxEmptyLinesToKeep: 1
BreakBeforeBraces: Allman
DerivePointerAlignment: true
AlignAfterOpenBracket: Align
BreakConstructorInitializers: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
NamespaceIndentation: All
SortIncludes: true
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,14 @@ Include/Model/COM/NMR_COMVersion.h
debug
.DS_Store
.vscode
TestOutput
nonrootmodels.3mf
SetupWriteRead1.3mf
SetupWriteRead2.3mf
SetupWriteRead3.3mf
SetupWriteRead4.3mf
SetupWriteRead5.3mf
v093reout.3mf
.vs
.idea
cmake-build-*
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
[submodule "submodules/googletest"]
path = submodules/googletest
url = https://github.com/google/googletest.git

3,501 changes: 3,113 additions & 388 deletions Autogenerated/Bindings/C/lib3mf.h

Large diffs are not rendered by default.

232 changes: 225 additions & 7 deletions Autogenerated/Bindings/C/lib3mf_types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*++
Copyright (C) 2019 3MF Consortium (Original Author)
Copyright (C) 2024 3MF Consortium (Original Author)
All rights reserved.
Expand Down 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.3.2
Interface version: 2.4.0
*/

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

#define LIB3MF_VERSION_MAJOR 2
#define LIB3MF_VERSION_MINOR 3
#define LIB3MF_VERSION_MICRO 2
#define LIB3MF_VERSION_MINOR 4
#define LIB3MF_VERSION_MICRO 0
#define LIB3MF_VERSION_PRERELEASEINFO ""
#define LIB3MF_VERSION_BUILDINFO ""

Expand Down Expand Up @@ -130,13 +130,18 @@ typedef void * Lib3MF_pvoid;
#define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */
#define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */
#define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */
#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */
#define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */
#define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */
#define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */
#define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */
#define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */
#define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */
#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */
#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */
#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */
#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */
#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */
#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */

/*************************************************************************************************************************
Error strings for Lib3MF
Expand Down Expand Up @@ -181,13 +186,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) {
case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown";
case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit";
case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid";
case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid";
case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices";
case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid";
case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid";
case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found";
case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found";
case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered";
case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid";
case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid";
case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible";
case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted.";
case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set.";
case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported";
default: return "unknown error";
}
}
Expand All @@ -212,11 +222,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator;
typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator;
typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator;
typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator;
typedef Lib3MFHandle Lib3MF_Image3DIterator;
typedef Lib3MFHandle Lib3MF_FunctionIterator;
typedef Lib3MFHandle Lib3MF_LevelSetIterator;
typedef Lib3MFHandle Lib3MF_MetaData;
typedef Lib3MFHandle Lib3MF_MetaDataGroup;
typedef Lib3MFHandle Lib3MF_Object;
typedef Lib3MFHandle Lib3MF_MeshObject;
typedef Lib3MFHandle Lib3MF_LevelSet;
typedef Lib3MFHandle Lib3MF_BeamLattice;
typedef Lib3MFHandle Lib3MF_FunctionReference;
typedef Lib3MFHandle Lib3MF_VolumeDataColor;
typedef Lib3MFHandle Lib3MF_MaterialMapping;
typedef Lib3MFHandle Lib3MF_VolumeDataComposite;
typedef Lib3MFHandle Lib3MF_VolumeDataProperty;
typedef Lib3MFHandle Lib3MF_VolumeData;
typedef Lib3MFHandle Lib3MF_Component;
typedef Lib3MFHandle Lib3MF_ComponentsObject;
typedef Lib3MFHandle Lib3MF_BeamSet;
Expand All @@ -225,8 +245,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup;
typedef Lib3MFHandle Lib3MF_Texture2DGroup;
typedef Lib3MFHandle Lib3MF_CompositeMaterials;
typedef Lib3MFHandle Lib3MF_MultiPropertyGroup;
typedef Lib3MFHandle Lib3MF_Image3D;
typedef Lib3MFHandle Lib3MF_ImageStack;
typedef Lib3MFHandle Lib3MF_Attachment;
typedef Lib3MFHandle Lib3MF_Texture2D;
typedef Lib3MFHandle Lib3MF_ImplicitPort;
typedef Lib3MFHandle Lib3MF_Iterator;
typedef Lib3MFHandle Lib3MF_ImplicitPortIterator;
typedef Lib3MFHandle Lib3MF_ImplicitNode;
typedef Lib3MFHandle Lib3MF_OneInputNode;
typedef Lib3MFHandle Lib3MF_SinNode;
typedef Lib3MFHandle Lib3MF_CosNode;
typedef Lib3MFHandle Lib3MF_TanNode;
typedef Lib3MFHandle Lib3MF_ArcSinNode;
typedef Lib3MFHandle Lib3MF_ArcCosNode;
typedef Lib3MFHandle Lib3MF_ArcTanNode;
typedef Lib3MFHandle Lib3MF_SinhNode;
typedef Lib3MFHandle Lib3MF_CoshNode;
typedef Lib3MFHandle Lib3MF_TanhNode;
typedef Lib3MFHandle Lib3MF_RoundNode;
typedef Lib3MFHandle Lib3MF_CeilNode;
typedef Lib3MFHandle Lib3MF_FloorNode;
typedef Lib3MFHandle Lib3MF_SignNode;
typedef Lib3MFHandle Lib3MF_FractNode;
typedef Lib3MFHandle Lib3MF_AbsNode;
typedef Lib3MFHandle Lib3MF_ExpNode;
typedef Lib3MFHandle Lib3MF_LogNode;
typedef Lib3MFHandle Lib3MF_Log2Node;
typedef Lib3MFHandle Lib3MF_Log10Node;
typedef Lib3MFHandle Lib3MF_LengthNode;
typedef Lib3MFHandle Lib3MF_TransposeNode;
typedef Lib3MFHandle Lib3MF_InverseNode;
typedef Lib3MFHandle Lib3MF_SqrtNode;
typedef Lib3MFHandle Lib3MF_ResourceIdNode;
typedef Lib3MFHandle Lib3MF_TwoInputNode;
typedef Lib3MFHandle Lib3MF_AdditionNode;
typedef Lib3MFHandle Lib3MF_SubtractionNode;
typedef Lib3MFHandle Lib3MF_MultiplicationNode;
typedef Lib3MFHandle Lib3MF_DivisionNode;
typedef Lib3MFHandle Lib3MF_DotNode;
typedef Lib3MFHandle Lib3MF_CrossNode;
typedef Lib3MFHandle Lib3MF_ArcTan2Node;
typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode;
typedef Lib3MFHandle Lib3MF_MinNode;
typedef Lib3MFHandle Lib3MF_MaxNode;
typedef Lib3MFHandle Lib3MF_FmodNode;
typedef Lib3MFHandle Lib3MF_ModNode;
typedef Lib3MFHandle Lib3MF_PowNode;
typedef Lib3MFHandle Lib3MF_SelectNode;
typedef Lib3MFHandle Lib3MF_ClampNode;
typedef Lib3MFHandle Lib3MF_ComposeVectorNode;
typedef Lib3MFHandle Lib3MF_VectorFromScalarNode;
typedef Lib3MFHandle Lib3MF_DecomposeVectorNode;
typedef Lib3MFHandle Lib3MF_ComposeMatrixNode;
typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode;
typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode;
typedef Lib3MFHandle Lib3MF_ConstantNode;
typedef Lib3MFHandle Lib3MF_ConstVecNode;
typedef Lib3MFHandle Lib3MF_ConstMatNode;
typedef Lib3MFHandle Lib3MF_MeshNode;
typedef Lib3MFHandle Lib3MF_UnsignedMeshNode;
typedef Lib3MFHandle Lib3MF_FunctionCallNode;
typedef Lib3MFHandle Lib3MF_NodeIterator;
typedef Lib3MFHandle Lib3MF_Function;
typedef Lib3MFHandle Lib3MF_ImplicitFunction;
typedef Lib3MFHandle Lib3MF_FunctionFromImage3D;
typedef Lib3MFHandle Lib3MF_BuildItem;
typedef Lib3MFHandle Lib3MF_BuildItemIterator;
typedef Lib3MFHandle Lib3MF_Slice;
Expand Down Expand Up @@ -305,7 +388,7 @@ typedef enum eLib3MFBeamLatticeClipMode {
} eLib3MFBeamLatticeClipMode;

typedef enum eLib3MFBeamLatticeBallMode {
eBeamLatticeBallModeNone = 0,
eBeamLatticeBallModeBeamLatticeBallModeNone = 0,
eBeamLatticeBallModeMixed = 1,
eBeamLatticeBallModeAll = 2
} eLib3MFBeamLatticeBallMode;
Expand Down Expand Up @@ -343,6 +426,103 @@ typedef enum eLib3MFBlendMethod {
eBlendMethodMultiply = 2
} eLib3MFBlendMethod;

typedef enum eLib3MFChannelName {
eChannelNameRed = 0,
eChannelNameGreen = 1,
eChannelNameBlue = 2,
eChannelNameAlpha = 3
} eLib3MFChannelName;

typedef enum eLib3MFCompositionMethod {
eCompositionMethodWeightedSum = 0,
eCompositionMethodMultiply = 1,
eCompositionMethodMin = 2,
eCompositionMethodMax = 3,
eCompositionMethodMask = 4
} eLib3MFCompositionMethod;

typedef enum eLib3MFCompositionSpace {
eCompositionSpaceRaw = 0,
eCompositionSpaceLinearColor = 1
} eLib3MFCompositionSpace;

/**
* enum eLib3MFImplicitNodeType - The type of the node
*/
typedef enum eLib3MFImplicitNodeType {
eImplicitNodeTypeAddition = 0, /** Adds to values (scalar or vector) */
eImplicitNodeTypeSubtraction = 1, /** Subtracts two values (scalar or vector) */
eImplicitNodeTypeMultiplication = 2, /** Multiplies two values (scalar or vector) */
eImplicitNodeTypeDivision = 3, /** Divides two values (scalar or vector) */
eImplicitNodeTypeConstant = 4, /** A constant scalar value */
eImplicitNodeTypeConstVec = 5, /** A constant vector value */
eImplicitNodeTypeConstMat = 6, /** A constant matrix value */
eImplicitNodeTypeComposeVector = 7, /** Creates a vector from three scalar values */
eImplicitNodeTypeDecomposeVector = 8, /** Decomposes a vector into three scalar values */
eImplicitNodeTypeComposeMatrix = 9, /** Creates a matrix from nine scalar values */
eImplicitNodeTypeMatrixFromColumns = 10, /** Creates a matrix from three column vector values */
eImplicitNodeTypeMatrixFromRows = 11, /** Creates a matrix from three row vector values */
eImplicitNodeTypeDot = 12, /** Calculates the dot product of two vector values */
eImplicitNodeTypeCross = 13, /** Calculates the cross product of two vector values */
eImplicitNodeTypeMatVecMultiplication = 14, /** Multiplies a matrix with a vector */
eImplicitNodeTypeTranspose = 15, /** Transposes a matrix */
eImplicitNodeTypeInverse = 16, /** Computes the inverse of a matrix */
eImplicitNodeTypeSinus = 17, /** Calculates the sinus */
eImplicitNodeTypeCosinus = 18, /** Calculates the cosinus */
eImplicitNodeTypeTan = 19, /** Calculates the tangent */
eImplicitNodeTypeArcSin = 20, /** Calculates the arcsinus */
eImplicitNodeTypeArcCos = 21, /** Calculates the arccosinus */
eImplicitNodeTypeArcTan = 22, /** Calculates the arctangent */
eImplicitNodeTypeArcTan2 = 23, /** Calculates the arctangent */
eImplicitNodeTypeMin = 24, /** Calculates the minimum of two values */
eImplicitNodeTypeMax = 25, /** Calculates the maximum of two values */
eImplicitNodeTypeAbs = 26, /** Calculates the absolute value */
eImplicitNodeTypeFmod = 27, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */
eImplicitNodeTypePow = 28, /** Calculates the power A^B */
eImplicitNodeTypeSqrt = 29, /** Calculates the square root */
eImplicitNodeTypeExp = 30, /** Exponential function */
eImplicitNodeTypeLog = 31, /** Natural logarithmus */
eImplicitNodeTypeLog2 = 32, /** Logarithmus to the base 2 */
eImplicitNodeTypeLog10 = 33, /** Logarithmus to the base 10 */
eImplicitNodeTypeSelect = 34, /** If A is less than B returns C, else D */
eImplicitNodeTypeClamp = 35, /** Clamps the input value to min and max */
eImplicitNodeTypeSinh = 36, /** Calculates the hyperbolic sine */
eImplicitNodeTypeCosh = 37, /** Calculates the hyperbolic cosine */
eImplicitNodeTypeTanh = 38, /** Calculates the hyperbolic tangent */
eImplicitNodeTypeRound = 39, /** Rounds a scalar value to the nearest integer */
eImplicitNodeTypeCeil = 40, /** Rounds a scalar value up to the nearest integer */
eImplicitNodeTypeFloor = 41, /** Rounds a scalar value down to the nearest integer */
eImplicitNodeTypeSign = 42, /** Returns the sign */
eImplicitNodeTypeFract = 43, /** Returns the fractional part */
eImplicitNodeTypeFunctionCall = 44, /** Calls a function */
eImplicitNodeTypeMesh = 45, /** Calculates the signed distance to a mesh */
eImplicitNodeTypeLength = 46, /** Calculates the length of a vector */
eImplicitNodeTypeConstResourceID = 47, /** Selects a resource (function, mesh etc.) */
eImplicitNodeTypeVectorFromScalar = 48, /** Creates a vector from one scalar values */
eImplicitNodeTypeUnsignedMesh = 49, /** Calculates the unsigned distance to a mesh */
eImplicitNodeTypeMod = 50 /** Calculates the modulo of two values (same behaviour as glsl mod) */
} eLib3MFImplicitNodeType;

/**
* enum eLib3MFImplicitPortType - The type of the port
*/
typedef enum eLib3MFImplicitPortType {
eImplicitPortTypeScalar = 0, /** Scalar */
eImplicitPortTypeVector = 1, /** Vector */
eImplicitPortTypeMatrix = 2, /** 4x4 Matrix */
eImplicitPortTypeResourceID = 3 /** Resource ID */
} eLib3MFImplicitPortType;

/**
* enum eLib3MFImplicitNodeConfiguration - Defines the input and output types of a node
*/
typedef enum eLib3MFImplicitNodeConfiguration {
eImplicitNodeConfigurationDefault = 0, /** Default */
eImplicitNodeConfigurationScalarToScalar = 1, /** Scalar -> Scalar */
eImplicitNodeConfigurationVectorToVector = 2, /** Vector -> Vector */
eImplicitNodeConfigurationMatrixToMatrix = 3 /** Matrix -> Matrix */
} eLib3MFImplicitNodeConfiguration;

typedef enum eLib3MFEncryptionAlgorithm {
eEncryptionAlgorithmAES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */
} eLib3MFEncryptionAlgorithm;
Expand Down Expand Up @@ -433,6 +613,36 @@ typedef union {
int m_code;
} structEnumLib3MFBlendMethod;

typedef union {
eLib3MFChannelName m_enum;
int m_code;
} structEnumLib3MFChannelName;

typedef union {
eLib3MFCompositionMethod m_enum;
int m_code;
} structEnumLib3MFCompositionMethod;

typedef union {
eLib3MFCompositionSpace m_enum;
int m_code;
} structEnumLib3MFCompositionSpace;

typedef union {
eLib3MFImplicitNodeType m_enum;
int m_code;
} structEnumLib3MFImplicitNodeType;

typedef union {
eLib3MFImplicitPortType m_enum;
int m_code;
} structEnumLib3MFImplicitPortType;

typedef union {
eLib3MFImplicitNodeConfiguration m_enum;
int m_code;
} structEnumLib3MFImplicitNodeConfiguration;

typedef union {
eLib3MFEncryptionAlgorithm m_enum;
int m_code;
Expand Down Expand Up @@ -523,6 +733,14 @@ typedef struct sLib3MFBall {
Lib3MF_double m_Radius;
} sLib3MFBall;

typedef struct sLib3MFVector {
Lib3MF_double m_Coordinates[3];
} sLib3MFVector;

typedef struct sLib3MFMatrix4x4 {
Lib3MF_double m_Field[4][4];
} sLib3MFMatrix4x4;

#pragma pack ()

/*************************************************************************************************************************
Expand Down
Loading

0 comments on commit c12fa20

Please sign in to comment.