DG Kernel Documentation


Skip Navigation Links.
Skip Navigation LinksHome Page > DG Kernel Components > Programmatic Functionality > Data Types Search Documentation


Basic data types

Warning: All elements of data structures below declared with struct keyword must be initialised before any use. Failing to do so may lead to unpredictable behaiviour as structures do not have a constructor, so have random values by default
AssociationPair
Box_DG
Color_KC
DG2D
DI3DSectInfo
DISectInfo
E2DViewGeometryType
E3DBoolParams
EBooleanOperation
EBoolOpContext
BRepOrientation_DG
ECADFormat
EColorParams
Continuity_DG
ECoordinatesType
EDataType
EDictionaryType_KC
EDIEvent
EDrawPrimitive
EDwgVersion
EDXFVersion
EEditorEvent_KC
EElemTypeKC
EEnableBit
EItemType
EKCType
EMenuCommand_KC
EMeshModsAction
EMeshRefineType
EModelViewFrame
EModelEntity
EModifResult
EObjectType
EPageOrientation
EPaperSize
EPatchType
EPointInSimplexLocation
RenderType_DG
ESatVersion
ESegmentType
EStringSource
ESymmType
ShapeType_DG
EViewType
JoinType_DG
ViewType_DG
E3DViewProjectionType
KCBitmap
KCN3 Structure
KCSceneItemInfo
MetrDistContext
MetrIsCloserThanContext
PairInt
PathDetectorContext
Point_DG
POSN
PrintContext_KC
Range_DG
RenderContext
ThreeState_DG
EDictionaryType_DG
Vect_DG
ViewBoolAttribute_DG

See also: Deprecated Types


3D vector

struct Vect_DG
                            double v[3];
};

Vect_DG is used to represent a 3D vector.


3D point

struct Point_DG { 
                            double x[3];
};

Point_DG is a 3D point.


struct Line_DG { 
                            Point_DG origin;
Vect_DG direction;
};


2D Point or Vector

struct DG2D { 
                            double x[2];
};


Color_KC

struct Color_KC_ {
                            float red;
                            float green;
                            float blue;
} Color_KC;


POSN

typedef unsigned __int64 POSN;

Range_DG Structure

typedef struct Range_DG {
        double min;
        double max;
            } Range_DG;


Box_DG Srtucture

typedef struct Box_DG {
        Range_DG range[3];
            } Box_DG;


KCN3 Srtucture

typedef struct KCN3_ {
        int n[3];
            } KCN3;


PairInt Structure

typedef struct PairInt_ {
        int x;
        int y
            } PairInt;


ECoordinatesType enumeration

 typedef enum ECoordinatesType_ {
                eCoordTypeCartesian = 1,
                eCoordTypePolar = 2,
            } ECoordinatesType;


RenderType_DG enumeration

 typedef enum RenderType_DG_ {
                eRenderTypeDgUnknown,
                eRenderTypeDgSolid,
                eRenderTypeDgWireFrame,
            } RenderType_DG;


EPatchType  enumeration

typedef enum EPatchType_ {
        ePatchTypeCurvature = 1,
        ePatchTypeRadius = 2,
        } EPatchType;

The enumeration used for selection between Standard (Curvature) and Radial Arc Patch types. (See Radial Patches


Segment Type enumeration

enum ESegmentType {  eSegmTypeLine = 1,  eSegmTypeArc = 2  }

Segment Type enumeration may be expanded in future versions of software by adding new types.


DISectInfo Structure

typedef struct DISectInfo_ {

bool                     closed;
int                        segments;
double                 radius;
ESegmentType    segmentType;
bool                     regularJoints
} DISectInfo;

DISectInfo structure is used to specify common parameters of a new object in DInsight model. 

closed  - If true surface strip in the new object will be closed.

 segments - specifies number of surface segments in the strip, which constitutes the surface of the Generic 3D object  (See Patch Strips and Surfaces ). In case of an SOR this is the number of 2D segments in the generating line strip.

radius - specifies approximate maximal dimension of the object. In case of a short cylinder it will be equal to the radius of the cyliner.

segmentType - if segmentType is eSegmTypeArc (see above) than all surface patches in the object will be of arc type (See Patch Types), otherwise all patches will be linear.

regularJoints - if true all surface joints will be rendered smooth in 3D.


DI3DSectInfo Structure

typedef struct DI3DSectInfo_ {

        DISectInfo                 sectInfo;
        int                             knots;
        ESegmentType         axialSegmType;
        ECoordinatesType     edgeCoordType;
        EPatchType                 patchType
} DI3DSectInfo;

DISectInfo structure contains parameters for creation of a new Generic 3D Entity object.

sectInfo - structure which contains parameters common to all types of objects (See above).

knots - Number of knots in the base.

axialSegmType - if true all edges in the object will be curved lines and straight lines otherwise.

edgeCoordType - a member of ECoordinatesType enumeration. If it is set to eCoordTypePolar than all 3D lines representing edges of the object will be defined in Cylindrical coordinates. Otherwise standard Cartesian coordinates will be used.

patchType - if patchType is ePatchTypeRadius (See EPatchType enumeration) than all arc patches in the object will be of radial type (See Radial Patches). Otherwise all arc patches in the object will be standard.


RenderContext Structure

Used to pass additional parameters to IGraphicItem.DrawEx method.

typedef struct RenderContext_
{
                        VARIANT_BOOL surface; // If false wire frame will be rendered. Default: true
                        VARIANT_BOOL normals; // Draw normals? Default: false

} RenderContext;


KCSceneItemInfo Structure

Used to pass search criteria to IModel2.FindItem method.

typedef struct KCSceneItemInfo_
{
    KC3State hasChildren;
    KC3State hasParent;
    KC3State isEmpty;
    BSTR name;
    KC3State hasLocalFrame;
    int hashItemStartAfter;

} KCSceneItemInfo;


Draw Primitive Enumeration

typedef enum EDrawPrimitive_ {
    ePoints,
    eLines,
    eLineStrip,
    eLineLoop,
    eTriangles,
    eTriangleStrip,
    eTriangleFan,
    eQuads, 
    eQuadStrip, 
    ePolygon,

                    } EDrawPrimitive;


ThreeState_DG Enumeration

typedef enum ThreeState_DG {
                                            unknownDG = -1, 
                                            falseDG = 0, 
                                            trueDG = 1, 
} ThreeState_DG;


EDictionaryType_DG Enumeration

typedef enum EDictionaryType_DG {
                                            eDictTypeUnknown, 
                                            eDictTypeInt, 
                                            eDictTypeDouble, 
                                            eDictTypeBool, 
                                            eDictType3State, 
                                            eDictTypeString, 
                                            eDictTypeVariant, 
                                            eDictTypeInterface, 
                                            eDictTypePointer, 
} EDictionaryType_DG;


DrawPrimitive_DG Enumeration

typedef enum DrawPrimitive_DG {
                                            ePointsDG
                                            eLinesDG
                                            eLineLoopDG
                                            eLineStripDG
                                            eTrianglesDG
                                            eTriangleStripDG
                                            eTriangleFanDG
                                            eQuadsDG
                                            eQuadStripDG
                                            ePolygonDG
                                            eDrawPrimitiveUnknownDG
} DrawPrimitive_DG;


Data Type Enumeration

typedef enum EDataType_ {
                                            eDataTypeNULL, 
                                            eDataTypeDouble, 
                                            eDataTypeSingle, 
                                            eDataTypeLong, 
                                            eDataTypeShort, 
                                            eDataTypeString
                    } EDataType;


EKCType Enumeration

typedef enum EKCType_ {
                                            eKCTypeNULL,
                                            eKCTypeDouble,
                                            eKCTypeSingle,                // (32 bit floating)
                                            eKCTypeLong,                  // 32 bit signed integer
                                            eKCTypeShort,                  // 16 bit signed integer
                                            eKCTypeString,
                                            eKCTypeBool,
                                            eKCTypeIUnknown,
                                            eKCTypeColor,
                       } EKCType;


EDictionaryType_KC Enumeration

Enumerates types in dictionaries

typedef enum EDictionaryType_KC_ {
                                            eKDUnknown,            // Any type (or unknown)
                                            eKDInt,                        / 32 bit signed integer
                                            eKDDouble,                // (64 bit floating)
                                            eKDBool,                  // Boolean
                                            eKDString,                  // String
                                            eKDVariant,                    // VARIANT. Interpreted as Object in many environments
                                            eKDInterface,                  // Interface
                                            } EDictionaryType_KC;


EEnableBit Enumeration

typedef enum EEnableBit_ {
                                            eEnablePan = 1,
                                            eEnableZoom = 2,
                                            eEnableRotate = 4,
                                            eEnableHighLightPoint = 128,
                                            eEnableHighLightLine = 256,
                                            eEnableHighLightSurface = 512,
                                            eEnableTransparency = 1024,
                                            eEnablePerspectiveProjection = 2048,
                                            eEnableNormals = 4096,
} EEnableBit;

EEnableBit enumeration can be used in calls to IView2.Enable() and IView2.GetEnableFlag() methods.

EEnableBit enumeration may be expanded in future versions of software by adding new types.


ESymmType Enumeration

typedef enum ESymmType_ {
    eSymmTypeNULL,
    eSymmTypeAxial, 
    eSymmTypeMirror, 
    eSymmTypeTranslation, 
                            } ESymmType;


EElemTypeKC Enumeration

typedef enum EElemTypeKC_ {
                                            eElTypeVertex,
                                            eElTypeSegment,
                                            eElTypeSimplex,
                                            eElTypeEntity,       
                                } EElemTypeKC;


EDIEvent Enumeration

typedef enum EDIEvent_ {
                                            eEventMouseHover,
                                            eEventClientDraw,
                                            eEventCollision,
                                            eEventUICommand,        //Context menu item selected
                                            eEventSelection,
                                            eEventExplorerSelection,    //Selection changed in Model Explorer
                                            eEvent2DEditor,                // Events from overlay or other 2D editor. The param0 parameter of KernelCADEvent is an integer with value one of EEditorEvent_KC below
                                            eEventMouseSimple,         //For RequestEvent. All button down/up etc apart from intesive mouse move
                                            eEventMouseMove,
                                            eEventMouseLButtonDown,
                                            eEventMouseRButtonDown,
                                            eEventModelStructureChanged, //Object hierarchy has changed
                                            eEventMouseRButtonDown,
                                            eEventMouseRButtonMove,
                                            eEventMouseRButtonUp,
                                            eEventCount,

} EDIEvent;

EEditorEvent_KC Enumeration

typedef enum EEditorEvent_KC_ {
                                            eEditEventUnknown,
                                            eEditEventActivated,                    // The editor has been activated
                                            eEditEventModelStructureChanged,    // A new item aded to the 2D model or deleted
                                            eEditEventItemStructureChanged,        // Number of elements in an item has chanded. New element added or deleted
                                            eEditEventClosing,                    // The editor is about to be closed
} EEditorEvent_KC;


EItemType Enumeration

typedef enum EItemType_ {
    eItemTypeEntity,
    eItemTypeLabel, 
    eItemTypeViewPoint, 
            } EItemType;

EPointLocation2D Enumeration

typedef enum EItemType_ {
    ePointLocation2DUnknown,
    ePointLocation2DInterval, // On a segment in open interval 
    ePointLocation2DPoint, // At a point 
    ePointLocation2DInside, // Inside of a closed strip or on the left of an infinitely long strip obtained by extending end lines as rays
    ePointLocation2DOutsnside, // Outside of a closed strip or on the right of an infinitely long strip obtained by extending end lines as rays
            } EPointLocation2D;


EModelViewFrame Enumeration

typedef enum EModelViewFrame_ {
            eModelViewFrameGlobal,
            eModelViewFrameEye
                } EModelViewFrame;
 


EModelEntity Enumeration

typedef enum EModelEntity_ {
            eModelEntityUnknown,
            eModelEntityObject,
            eModelEntityModel,
                    } EModelEntity;

It is recommended to use mnemonic members of this enumeration as opposed to hard coded values as it may be expanded in future releases


ESTLAnalysis Enumeration

typedef enum ESTLAnalysis_ {
        eStlAnalysAuto,
        eStlAnalysPerform,
        eStlAnalysSkip,
                    } ESTLAnalysis;


EViewReset Enumeration

typedef enum EViewReset_ {
        eViewResetAll,
        eViewResetVolume,
                    } EViewReset;

This enumeration is likely to be expanded in future releases


EModifResult Enumeration

typedef enum EModifResult_ {
    eModifResInvalid = -1,
    eModifResNoChange = 0,
    eModifResModified = 1
                    } EModifResult;


ECADFormatEnumeration

typedef enum ECADFormat_ {
        eCADFormatGLM,
        eCADFormatVRML,
        eCADFormatSTL,
        eCADFormatAutoCADDXF,
        eCADFormatAutoCADDWG,
        eCADFormatSAT,
        eCADFormatSAT,
        eCADFormatCSV,
        eCADFormatXYZ,
        eCADFormatPLY,
        eCADFormatSTEP,
        eCADFormatIGES,
        eCADFormatBREP,
        eCADFormatCSFDB,
        eCADFormatDat,
        eCADFormatMDG,
        eCADFormatOBJ,
        eCADFormatUnknown,
                    } ECADFormat;

Enumerates CAD formats supported by the software. This enumeration will be expanded in future releases


EPageOrientation Enumeration

typedef enum EPageOrientation_ {
            eOrientAuto,
            eOrientPortrait,
            eOrientLandscape,
                    } EPageOrientation;


EPaperSize Enumeration

typedef enum EPaperSize_ {
                ePaperSizeUnknown,
                ePaperSizeA4,
                ePaperSizeA3,
                    } EPaperSize;


PrintContext_KC Structure

typedef struct PrintContext_KC_ {
            VARIANT_BOOL validOrientation;
            EPageOrientation orientation;
            VARIANT_BOOL validPaperSize;
            EPaperSize paperSize;
            VARIANT_BOOL validMargin;
            float marginHorizontal;
            float marginVertical;
            VARIANT_BOOL validScale;
            float scale;
                    } PrintContext_KC;


KCBitmap Structure

typedef struct KCBitmap_ {
        int type;
        int width;
        int height;
        int widthBytes;
        short planes;
        short bitsPixel;
                    } KCBitmap;


ViewMode_DG Enumeration

typedef enum ViewMode_DG_ {
    eViewModeDgUnknown,
    eViewModeDgView,
    eViewModeDgModify,
                    } ViewMode_DG


ViewType_DG Enumeration

typedef enum ViewType_DG_ {
    eViewTypeDg2D = 2,
    eViewTypeDg3D = 3,
                    } ViewType_DG


EViewType Enumeration

typedef enum EViewType_ {
    eViewType2D = 2,
    eViewType3D = 3,
                    } EViewType


ProjectionType_DG Enumeration

typedef enum ProjectionType_DG {
       eProjectionTypeDgOrthographic,
       eProjectionTypeDgPerspective
                    } ProjectionType_DG


E3DViewProjectionType Enumeration

typedef enum E3DViewProjectionType {
       e3DViewProjectionTypeOrthographic,
       e3DViewProjectionTypePerspective
                    } E3DViewProjectionType


E2DViewGeometryType Enumeration

typedef enum E2DViewGeometryType_ {
                          e2DViewGeometryTypeProjection,
                          e2DViewGeometryTypeInterentity,
                        } E2DViewGeometryType;


PathDetectorContext Structure

typedef struct PathDetectorContext_   {
                    VARIANT_BOOL decreasingStart;
                    double minDistToler;
                    double precision;
                    } PathDetectorContext;
 

PathDetectorContext structure is used in IKCPathCollisionDetector.Detect method to specify additional parameters for the operation.


EBooleanOperation Enumeration

typedef enum EBooleanOperation_ {
                eBoolOpUnknown = 0,
                eBoolOpSubtract = 1,
                eBoolOpUnion = 2,
                eBoolOpInters = 3,
                eBoolOpClip = 4,
                    } EBooleanOperation;


EBoolOpContext Structure

typedef struct EBoolOpContext_ {
            EBooleanOperation operation;                    // The operation
            VARIANT_BOOL execute;                       // If false only interentity curve is calculated
            VARIANT_BOOL interentityLine;           // Calculate interentity curve(s) of two surfaces
            VARIANT_BOOL needEdges;                  // If true edges array is calculated (contains information about normals along interentity)
            IUnknown* edges;                                      // Vertices of interentity arranged in linked loops. Actual type IArray. elements are IArray of IVertex one per loop
            VARIANT_BOOL separateComponents;   // If the first object becomes divided into several isolated pieces, separate the objects and make it a group.
                    } EBoolOpContext;


EMenuCommand_KCEnumeration

typedef enum EMenuCommand_KC_ {

eMenuCommandSaveAs,
eMenuCommandSeparator1,
eMenuCommandFullScreen,
eMenuCommandSeparator3,
eMenuCommandSurface,
eMenuCommandWireFrame,
eMenuCommandSeparator6,
eMenuCommandGlobalFrame,
eMenuCommandSeparator8,
eMenuCommandHelp,
eMenuCommandAbout,
eMenuCommandSeparator9,
eMenuCommandCustomItem0,
eMenuCommandCustomItem1,
eMenuCommandCustomItem2,
eMenuCommandCustomItem3,
eMenuCommandCustomItem4,
} EMenuCommand_KC;


EMeshModsAction Enumeration

typedef enum EMeshModsAction_ {
eMeshActionNone = 0,
eMeshActionNormalsFastApprox = 1,
eMeshActionNormalsMedium = 2,
eMeshActionNormalsFull = 4,
eMeshActionNormalsAuto = 8,
} EMeshModsAction;

EDwgVersion Enumeration

typedef enum EDwgVersion_
{
    kc_vAC14 = 21, // R14 release
    kc_vAC15 = 23, // R15 (2000) release
    kc_vAC18 = 25, // R18 (2004) release
    kc_vAC21 = 27, // R21 (2007) release
    kc_vAC24 = 29, // R24 (2010) release
    kc_vAC27 = 31, // R27 (2013) release
} EDwgVersion;

EDXFVersion Enumeration

typedef enum EDXFVersion_ {
    kc_vACdxf12 = 16, // R11 and R12
    kc_vACdxf15 = 23, // R15 (2000) release
    kc_vACdxf18 = 25, // R18 (2004) release
    kc_vACdxf21 = 27, // R21 (2007) release
    kc_vACdxf24 = 29, // R24 (2010) release
    kc_vACdxf27 = 31, // R27 (2013) release
} EDXFVersion;

ESatVersion Enumeration

typedef enum ESatVersion_ {
    kc_ASCII_106 = 0x01000000|106,
    kc_ASCII_400 = 0x01000000|400,
    kc_ASCII_500 = 0x01000000|500,
    kc_ASCII_600 = 0x01000000|600,
    kc_ASCII_700 = 0x01000000|700,
    kc_ASCII_20800 = 0x01000000|20800,
    kc_ASCII_21200 = 0x01000000|21200,
    kc_ASCII_21500 = 0x01000000|21500,
} ESatVersion;

EPointInSimplexLocation Enumeration

typedef enum EPointInSimplexLocation_ {
    eSimplexPointLocationUnknown,
    eSimplexPointLocationInside,
    eSimplexPointLocationEdge,
    eSimplexPointLocationVertex,
    eSimplexPointLocationOutside,
    eSimplexPointLocationNotInPlane,
} EPointInSimplexLocation;

ShapeType_DG enumeration

typedef enum ShapeType_DG {
        eShTypeCompoundDG ,
        eShTypeCompsolidDG,
        eShTypeSolidDG ,
        eShTypeShellDG,
        eShTypeFaceDG,
        eShTypeWireDG,
        eShTypeEdgeDG,
        eShTypeVertexDG,
        eShTypeShapeDG,
        eShTypeUnknownDG,
        } ShapeType_DG;

Enumerates topological types of geometry of bspline brep entities


BRepOrientation_DG enumeration

typedef enum BRepOrientation_DG {
        eBRepOrientationForward ,
        eBRepOrientationReversed,
        eBRepOrientationInternal,
        eBRepOrientationExternal
        } BRepOrientation_DG;

Enumerates orientation of a subshape in its parent shape


JoinType_DG enumeration

typedef enum JoinType_DG {
        eJoinTypeArc,
        eJoinTypeTangent,
        eJoinTypeIntersection
} JoinType_DG;


ViewBoolAttribute_DG enumeration

typedef enum ViewBoolAttribute_DG {
        eViewBoolAttributeDgUnknown,
        eViewBoolAttributeDgShowNormals,
        eViewBoolAttributeDgEnableSurfaceHighLighting,
} ViewBoolAttribute_DG;


EColorParams enumeration

typedef enum EColorParams {
        eColorMouseStroke,
        eColorBackgroundDualVirtual,
        eColorSelectedEntity,
        eColorCurrentEntity,
        eColorParamCount,
} EColorParams;


Continuity_DG enumeration

typedef enum Continuity_DG {
        eCont_C0, // Only continuous
        eCont_G1, // Geometrically smooth
        eCont_C1, // Smooth WRT parameter
        eCont_G2, // Geometrically smooth curvature
        eCont_C2, // Smooth WRT parameter up to 2nd derivatives
        eCont_C3, // Smooth WRT parameter up to 3rd derivatives
        eCont_CN // Infinitely smooth
        } Continuity_DG;

Enumerates smoothness of a curve or a surface


EStringSource Enumeration

typedef enum EStringSource_ {
    eStringSourceUnknown,
    eStringSourceObjectName,
    eStringSourceLayerName,
    eStringSourceTemplate,
} EStringSource;

EMeshRefineType Enumeration

typedef enum EMeshRefineType_ {
    eMeshRefineTypeFlat,
    eMeshRefineTypeButterfly,
    eMeshRefineTypeLoop,
    eMeshRefineTypeCatmull,
    eMeshRefineTypeONE_QUAD_X_EDGE,
} EMeshRefineType;