//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : EInAPI.h Data : 26.08.14 Versione : 1.5h1 // Contenuto : API (application programming interface). // // // // Modifiche : 26.08.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include //----------------------- Macro per import/export ---------------------------- #undef EIN_EXPORT #if defined( I_AM_EIN) // da definirsi solo nella DLL #define EIN_EXPORT __declspec( dllexport) #else #define EIN_EXPORT __declspec( dllimport) #endif //----------------------------------------------------------------------------- #ifdef __cplusplus extern "C" { #endif // API // General EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* sLogFile) ; EIN_EXPORT BOOL __stdcall EgtExit( void) ; EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* sKey) ; EIN_EXPORT BOOL __stdcall EgtSetFont( const wchar_t* sNfeFontDir, const wchar_t* sDefaultFont) ; EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ; // GeomDB EIN_EXPORT int __stdcall EgtInitGeomDB( void) ; EIN_EXPORT BOOL __stdcall EgtSetDefaultMaterial( int nGseCtx, int nRed, int nGreen, int nBlue) ; EIN_EXPORT BOOL __stdcall EgtNewFile( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtOpenFile( int nGseCtx, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtSaveFile( int nGseCtx, const wchar_t* wsFilePath, int nFlag) ; // GeomDB Create EIN_EXPORT int __stdcall EgtCreateGroup( int nGseCtx, int nParentId, const double vOrig[3], const double vX[3], const double vY[3], const double vZ[3]) ; EIN_EXPORT int __stdcall EgtCreateGeoPoint( int nGseCtx, int nParentId, const double ptP[3]) ; EIN_EXPORT int __stdcall EgtCreateGeoVector( int nGseCtx, int nParentId, const double vtV[3], const double ptB[3]) ; EIN_EXPORT int __stdcall EgtCreateGeoFrame( int nGseCtx, int nParentId, const double ptOrig[3], const double vX[3], const double vY[3], const double vZ[3]) ; EIN_EXPORT int __stdcall EgtCreateCurveLine( int nGseCtx, int nParentId, const double ptIni[3], const double ptFin[3]) ; EIN_EXPORT int __stdcall EgtCreateCurveLineMinPointCurve( int nGseCtx, int nParentId, const double ptStart[3], int nCrvId, double dNearPar) ; EIN_EXPORT int __stdcall EgtCreateCurveCircle( int nGseCtx, int nParentId, const double ptCen[3], const double vtN[3], double dRad) ; EIN_EXPORT int __stdcall EgtCreateCurveCircle3P( int nGseCtx, int nParentId, const double ptP1[3], const double ptP2[3], const double ptP3[3]) ; EIN_EXPORT int __stdcall EgtCreateCurveCircleXY( int nGseCtx, int nParentId, const double ptCen[3], double dRad) ; EIN_EXPORT int __stdcall EgtCreateCurveArc( int nGseCtx, int nParentId, const double ptCen[3], const double vtN[3], double dRad, const double vtS[3], double dAngCenDeg, double dDeltaN) ; EIN_EXPORT int __stdcall EgtCreateCurveArcXY( int nGseCtx, int nParentId, const double ptCen[3], double dRad, double dAngStartDeg, double dAngCenDeg, double dDeltaZ) ; EIN_EXPORT int __stdcall EgtCreateCurveArc3P( int nGseCtx, int nParentId, const double ptP1[3], const double ptP2[3], const double ptP3[3]) ; EIN_EXPORT int __stdcall EgtCreateCurveBezier( int nGseCtx, int nParentId, int nDegree, const double ptCtrls[/*3x(nDegree+1)*/]) ; EIN_EXPORT int __stdcall EgtCreateCurveBezierRational( int nGseCtx, int nParentId, int nDegree, const double ptCtrlWs[/*4x(nDegree+1)*/]) ; EIN_EXPORT int __stdcall EgtCreateCurveBezierFromArc( int nGseCtx, int nParentId, int nArcId, BOOL bErase) ; EIN_EXPORT int __stdcall EgtCreateCurveCompo( int nGseCtx, int nParentId, int nNumId, const int nIds[], BOOL bErase) ; EIN_EXPORT int __stdcall EgtCreateCurveCompoFromPoints( int nGseCtx, int nParentId, int nP, const double ptPs[/*3 x nP*/]) ; EIN_EXPORT int __stdcall EgtCreateCurveCompoFromPointBulges( int nGseCtx, int nParentId, int nPB, const double ptPBs[/*4 x nPB*/]) ; EIN_EXPORT int __stdcall EgtCreateCurveCompoFromPolygonSide( int nGseCtx, int nParentId, int nNumSides, const double ptIni[3], const double ptFin[3]) ; EIN_EXPORT int __stdcall EgtCreateSurfTriMeshByContour( int nGseCtx, int nParentId, int nCrvId, double dLinTol) ; EIN_EXPORT int __stdcall EgtCreateText( int nGseCtx, int nParentId, const wchar_t* wsText, const double ptP[3], double dAngRotDeg, double dH) ; EIN_EXPORT int __stdcall EgtCreateTextEx( int nGseCtx, int nParentId, const wchar_t* wsText, const double ptP[3], double dAngRotDeg, const wchar_t* wsFont, int nW, BOOL bItalic, double dH, double dRat, double dAddAdv, int nInsPos) ; // GeomDB Modify EIN_EXPORT BOOL __stdcall EgtChangeVectorBase( int nGseCtx, int nId, const double ptB[3]) ; EIN_EXPORT BOOL __stdcall EgtModifyText( int nGseCtx, int nId, const wchar_t* wsNewText) ; EIN_EXPORT BOOL __stdcall EgtChangeTextFont( int nGseCtx, int nId, const wchar_t* wsNewFont) ; EIN_EXPORT BOOL __stdcall EgtFlipText( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtMirrorText( int nGseCtx, int nId, BOOL bOnL) ; EIN_EXPORT BOOL __stdcall EgtTextToOutline( int nGseCtx, int nId, int nDestGroupId) ; EIN_EXPORT BOOL __stdcall EgtSplitText( int nGseCtx, int nId, int nDestGroupId) ; // GeomDB Objects EIN_EXPORT BOOL __stdcall EgtExistsObj( int nGseCtx, int nId) ; EIN_EXPORT int __stdcall EgtGetGroupObjs( int nGseCtx, int nId) ; EIN_EXPORT int __stdcall EgtGetFirstInGroup( int nGseCtx, int nGroupId) ; EIN_EXPORT int __stdcall EgtGetNext( int nGseCtx, int nId) ; EIN_EXPORT int __stdcall EgtGetLastInGroup( int nGseCtx, int nGroupId) ; EIN_EXPORT int __stdcall EgtGetPrev( int nGseCtx, int nId) ; EIN_EXPORT int __stdcall EgtCopy( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT int __stdcall EgtCopyGlob( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT BOOL __stdcall EgtRelocate( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT BOOL __stdcall EgtRelocateGlob( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT BOOL __stdcall EgtErase( int nGseCtx, int nId) ; EIN_EXPORT int __stdcall EgtGetType( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtGetTitle( int nGseCtx, int nId, wchar_t*& wsTitle) ; EIN_EXPORT BOOL __stdcall EgtGroupDump( int nGseCtx, int nId, wchar_t*& wsDump) ; EIN_EXPORT BOOL __stdcall EgtGeoObjDump( int nGseCtx, int nId, wchar_t*& wsDump) ; // GeomDB Obj Attributes EIN_EXPORT BOOL __stdcall EgtSetLevel( int nGseCtx, int nId, int nLevel) ; EIN_EXPORT BOOL __stdcall EgtRevertLevel( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtGetLevel( int nGseCtx, int nId, int* pnLevel) ; EIN_EXPORT BOOL __stdcall EgtGetCalcLevel( int nGseCtx, int nId, int* pnLevel) ; EIN_EXPORT BOOL __stdcall EgtSetMode( int nGseCtx, int nId, int nMode) ; EIN_EXPORT BOOL __stdcall EgtRevertMode( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtGetMode( int nGseCtx, int nId, int* pnMode) ; EIN_EXPORT BOOL __stdcall EgtGetCalcMode( int nGseCtx, int nId, int* pnMode) ; EIN_EXPORT BOOL __stdcall EgtSetStatus( int nGseCtx, int nId, int nStat) ; EIN_EXPORT BOOL __stdcall EgtRevertStatus( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtGetStatus( int nGseCtx, int nId, int* pnStat) ; EIN_EXPORT BOOL __stdcall EgtGetCalcStatus( int nGseCtx, int nId, int* pnStat) ; EIN_EXPORT BOOL __stdcall EgtSetMark( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtResetMark( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtGetMark( int nGseCtx, int nId, BOOL* pnMark) ; EIN_EXPORT BOOL __stdcall EgtGetCalcMark( int nGseCtx, int nId, BOOL* pnMark) ; EIN_EXPORT BOOL __stdcall EgtStdColor( const wchar_t* wsName, int& nRed, int& nGreen, int& nBlue, int& nAlpha) ; EIN_EXPORT BOOL __stdcall EgtSetColor( int nGseCtx, int nId, int nRed, int nGreen, int nBlue, int nAlpha) ; EIN_EXPORT BOOL __stdcall EgtGetColor( int nGseCtx, int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha) ; EIN_EXPORT BOOL __stdcall EgtGetCalcColor( int nGseCtx, int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha) ; EIN_EXPORT BOOL __stdcall EgtSetName( int nGseCtx, int nId, const wchar_t* wsName) ; EIN_EXPORT BOOL __stdcall EgtGetName( int nGseCtx, int nId, wchar_t*& wsName) ; EIN_EXPORT BOOL __stdcall EgtExistsName( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtRemoveName( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtSetInfo( int nGseCtx, int nId, const wchar_t* wsKey, const wchar_t* wsInfo) ; EIN_EXPORT BOOL __stdcall EgtGetInfo( int nGseCtx, int nId, const wchar_t* wsKey, wchar_t*& wsInfo) ; EIN_EXPORT BOOL __stdcall EgtExistsInfo( int nGseCtx, int nId, const wchar_t* wsKey) ; EIN_EXPORT BOOL __stdcall EgtRemoveInfo( int nGseCtx, int nId, const wchar_t* wsKey) ; // GeomDb Obj Selection EIN_EXPORT BOOL __stdcall EgtIsSelectedObj( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtSelectObj( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtDeselectObj( int nGseCtx, int nId) ; // GeomDb CurveModif EIN_EXPORT BOOL __stdcall EgtInvertCurve( int nGseCtx, int nId) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveStartPoint( int nGseCtx, int nId, const double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveEndPoint( int nGseCtx, int nId, const double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveExtrusion( int nGseCtx, int nId, const double vtExtr[3]) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveThickness( int nGseCtx, int nId, double dThick) ; EIN_EXPORT BOOL __stdcall EgtTrimCurveStartAtLen( int nGseCtx, int nId, double dLen) ; EIN_EXPORT BOOL __stdcall EgtTrimCurveEndAtLen( int nGseCtx, int nId, double dLen) ; EIN_EXPORT BOOL __stdcall EgtTrimCurveStartAtParam( int nGseCtx, int nId, double dPar) ; EIN_EXPORT BOOL __stdcall EgtTrimCurveEndAtParam( int nGseCtx, int nId, double dPar) ; EIN_EXPORT BOOL __stdcall EgtTrimCurveStartEndAtParam( int nGseCtx, int nId, double dParS, double dParE) ; // Geo Snap Points EIN_EXPORT BOOL __stdcall EgtStartPoint( int nGseCtx, int nId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtEndPoint( int nGseCtx, int nId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtMidPoint( int nGseCtx, int nId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtCenterPoint( int nGseCtx, int nId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtAtParamPoint( int nGseCtx, int nId, double dU, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtStartVector( int nGseCtx, int nId, double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtEndVector( int nGseCtx, int nId, double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtMidVector( int nGseCtx, int nId, double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtAtParamVector( int nGseCtx, int nId, double dU, int nSide, double vtV[3]) ; EIN_EXPORT BOOL __stdcall EgtFrame( int nGseCtx, int nId, double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3]) ; // Geo Transform EIN_EXPORT BOOL __stdcall EgtMove( int nGseCtx, int nId, double vVtMove[3]) ; EIN_EXPORT BOOL __stdcall EgtMoveGlob( int nGseCtx, int nId, double vVtMove[3]) ; EIN_EXPORT BOOL __stdcall EgtMoveGroup( int nGseCtx, int nId, double vVtMove[3]) ; EIN_EXPORT BOOL __stdcall EgtRotate( int nGseCtx, int nId, double vPtAx[3], double vVtAx[3], double dAngRotDeg) ; EIN_EXPORT BOOL __stdcall EgtRotateGlob( int nGseCtx, int nId, double vPtAx[3], double vVtAx[3], double dAngRotDeg) ; EIN_EXPORT BOOL __stdcall EgtRotateGroup( int nGseCtx, int nId, double vPtAx[3], double vVtAx[3], double dAngRotDeg) ; EIN_EXPORT BOOL __stdcall EgtScale( int nGseCtx, int nId, const double vOrig[3], const double vX[3], const double vY[3], const double vZ[3], double dCoeffX, double dCoeffY, double dCoeffZ) ; EIN_EXPORT BOOL __stdcall EgtScaleGlob( int nGseCtx, int nId, const double vOrig[3], const double vX[3], const double vY[3], const double vZ[3], double dCoeffX, double dCoeffY, double dCoeffZ) ; EIN_EXPORT BOOL __stdcall EgtScaleGroup( int nGseCtx, int nId, const double vOrig[3], const double vX[3], const double vY[3], const double vZ[3], double dCoeffX, double dCoeffY, double dCoeffZ) ; EIN_EXPORT BOOL __stdcall EgtMirror( int nGseCtx, int nId, const double vPnt[3], const double vN[3]) ; EIN_EXPORT BOOL __stdcall EgtMirrorGlob( int nGseCtx, int nId, const double vPnt[3], const double vN[3]) ; EIN_EXPORT BOOL __stdcall EgtMirrorGroup( int nGseCtx, int nId, const double vPnt[3], const double vN[3]) ; EIN_EXPORT BOOL __stdcall EgtShear( int nGseCtx, int nId, const double vPnt[3], const double vN[3], const double vDir[3], double dCoeff) ; EIN_EXPORT BOOL __stdcall EgtShearGlob( int nGseCtx, int nId, const double vPnt[3], const double vN[3], const double vDir[3], double dCoeff) ; EIN_EXPORT BOOL __stdcall EgtShearGroup( int nGseCtx, int nId, const double vPnt[3], const double vN[3], const double vDir[3], double dCoeff) ; // Scene EIN_EXPORT BOOL __stdcall EgtInitScene( int nGseCtx, HWND hWnd, int nDriver, int b2Buff, int nColorBits, int nDepthBits) ; EIN_EXPORT BOOL __stdcall EgtSetBackground( int nGseCtx, int nTopRed, int nTopGreen, int nTopBlue, int nBottomRed, int nBottomGreen, int nBottomBlue, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetMarkAttribs( int nGseCtx, int nRed, int nGreen, int nBlue) ; EIN_EXPORT BOOL __stdcall EgtSetGeoLineAttribs( int nGseCtx, int nRed, int nGreen, int nBlue) ; EIN_EXPORT BOOL __stdcall EgtSetWinRectAttribs( int nGseCtx, BOOL bOutline, int nRed, int nGreen, int nBlue, int nAlpha) ; EIN_EXPORT BOOL __stdcall EgtResize( int nGseCtx, int nW, int nH) ; EIN_EXPORT BOOL __stdcall EgtDraw( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtSelect( int nGseCtx, int nWinX, int nWinY, int nSelW, int nSelH, int* pnSel) ; EIN_EXPORT int __stdcall EgtGetFirstSelectedObj( int nGseCtx) ; EIN_EXPORT int __stdcall EgtGetNextSelectedObj( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtGetSelectedSnapPoint( int nGseCtx, int nSnap, int nWinX, int nWinY, int nSelW, int nSelH, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtSetShowMode( int nGseCtx, int nShowMode, BOOL bRedraw) ; EIN_EXPORT int __stdcall EgtGetShowMode( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtSetShowCurveDirection( int nGseCtx, BOOL bShow, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtGetShowCurveDirection( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtZoom( int nGseCtx, int nZoom, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtZoomOnPoint( int nGseCtx, int nWinX, int nWinY, double dCoeff, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetGeoLine( int nGseCtx, const double ptP1[3], const double ptP2[3], BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtResetGeoLine( int nGseCtx, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetWinRect( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtResetWinRect( int nGseCtx, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtZoomWin( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetView( int nGseCtx, int nView, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetGenericView( int nGseCtx, double dAngVertDeg, double dAngHorizDeg, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetViewCenter( int nGseCtx, const double ptP[3], BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtPanCamera( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtRotateCamera( int nGseCtx, int nPrevX, int nPrevY, int nCurrX, int nCurrY, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtGetCameraDir( int nGseCtx, int* pnDir) ; EIN_EXPORT BOOL __stdcall EgtUnProjectPoint( int nGseCtx, int nWinX, int nWinY, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtProjectPoint( int nGseCtx, const double ptP[3], double ptWin[3]) ; // Exchange EIN_EXPORT int __stdcall EgtGetFileType( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtImportDxf( int nGseCtx, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtImportStl( int nGseCtx, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtImportCnc( int nGseCtx, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtExportDxf( int nGseCtx, int nId, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtExportStl( int nGseCtx, int nId, const wchar_t* wsFilePath) ; // Tsc Executor EIN_EXPORT BOOL __stdcall EgtInitTscExec( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtTscExecFile( int nGseCtx, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtTscExecLine( int nGseCtx, const wchar_t* wsLine) ; // LUA Executor EIN_EXPORT BOOL __stdcall EgtLuaSetContext( int nGseCtx) ; EIN_EXPORT BOOL __stdcall EgtLuaExecLine( const wchar_t* wsLine) ; EIN_EXPORT BOOL __stdcall EgtLuaExecFile( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtLuaGetLastError( wchar_t*& wsError) ; #ifdef __cplusplus } #endif