//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : API.h Data : 01.09.14 Versione : 1.5l1 // Contenuto : Dichiarazioni locali per moduli API. // // // // Modifiche : 01.09.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "GseContext.h" #include "/EgtDev/Include/EGkGeoCollection.h" #include "/EgtDev/Include/EGkPolyArc.h" #include "/EgtDev/Include/EgtILogger.h" //---------------------------------------------------------------------------- ILogger* GetLogger( void) ; ILogger* GetCmdLogger( void) ; bool IsCmdLog( void) ; //--------------------------- General ---------------------------------------- bool __stdcall EgtGetVersionInfo( std::string& sVer, const char* szNewLine) ; //--------------------------- GeomDB ----------------------------------------- bool __stdcall EgtSetGridFrame( const Frame3d& frFrame) ; bool __stdcall EgtGetGridFrame( int nRefId, Frame3d& frFrame) ; bool __stdcall EgtGetGridVersZ( int nRefId, Vector3d& vtVersZ) ; bool __stdcall EgtOpenFile( const std::string& sFilePath) ; bool __stdcall EgtImportFile( const std::string& sFilePath) ; bool __stdcall EgtSaveFile( const std::string& sFilePath, int nFlag) ; //--------------------------- GeomDBCreate ----------------------------------- int __stdcall EgtCreateText( int nParentId, const Point3d& ptP, double dAngRotDeg, const std::string& sText, double dH, int nRefType) ; int __stdcall EgtCreateTextEx( int nParentId, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, const std::string& sText, const std::string& sFont, bool bItalic, double dH, int nRefType) ; int __stdcall EgtCreateTextAdv( int nParentId, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, const std::string& sText, const std::string& sFont, int nW, bool bItalic, double dH, double dRat, double dAddAdv, int nInsPos, int nRefType) ; //--------------------------- GeomDBCreateCurve ------------------------------ int __stdcall EgtCreateCurveBezier( int nParentId, int nDegree, const PNTVECTOR& vPnt) ; int __stdcall EgtCreateCurveBezierRational( int nParentId, int nDegree, const PNTUVECTOR& vPntW) ; int __stdcall EgtCreateCurveCompo( int nParentId, const INTVECTOR& vIds, bool bErase) ; int __stdcall EgtCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds, const Point3d& ptNear, bool bErase) ; int __stdcall EgtCreateCurveCompoFromPoints( int nParentId, const PolyLine& PL) ; int __stdcall EgtCreateCurveCompoFromPointBulges( int nParentId, const PolyArc& PA) ; bool __stdcall GetPolyLineFromCurve( int nId, const Frame3d& frDest, double dLinTol, PolyLine& PL) ; bool __stdcall GetPolyArcFromCurve( int nId, const Frame3d& frDest, double dLinTol, PolyArc& PA) ; //--------------------------- GdbModify -------------------------------------- BOOL __stdcall EgtModifyText( int nId, const std::string& sNewText) ; BOOL __stdcall EgtChangeTextFont( int nId, const std::string& sNewFont) ; //--------------------------- GdbObjects ------------------------------------- int __stdcall EgtGetFirstNameInGroup( int nGroupId, const std::string& sName) ; int __stdcall EgtGetNextName( int nId, const std::string& sName) ; //--------------------------- GdbObjAttribs ---------------------------------- bool __stdcall EgtSetName( int nId, const std::string& sName) ; bool __stdcall EgtGetName( int nId, std::string& sName) ; bool __stdcall EgtSetInfo( int nId, const std::string& sKey, const std::string& sInfo) ; bool __stdcall EgtSetInfo( int nId, const std::string& sKey, int nInfo) ; bool __stdcall EgtGetInfo( int nId, const std::string& sKey, std::string& sInfo) ; bool __stdcall EgtGetInfo( int nId, const std::string& sKey, int& nInfo) ; bool __stdcall EgtExistsInfo( int nId, const std::string& sKey) ; bool __stdcall EgtRemoveInfo( int nId, const std::string& sKey) ; //--------------------------- GeoSnap ---------------------------------------- bool __stdcall EgtStartPoint( int nId, int nRefId, Point3d& ptP) ; bool __stdcall EgtEndPoint( int nId, int nRefId, Point3d& ptP) ; bool __stdcall EgtMidPoint( int nId, int nRefId, Point3d& ptP) ; bool __stdcall EgtCenterPoint( int nId, int nRefId, Point3d& ptP) ; bool __stdcall EgtAtParamPoint( int nId, double dU, int nRefId, Point3d& ptP) ; bool __stdcall EgtNearPoint( int nId, const Point3d& ptNear, int nRefId, Point3d& ptP) ; bool __stdcall EgtIntersectionPoint( int nId1, int nId2, const Point3d& ptNear, int nRefId, Point3d& ptP) ; bool __stdcall EgtStartVector( int nId, int nRefId, Vector3d& vtV) ; bool __stdcall EgtEndVector( int nId, int nRefId, Vector3d& vtV) ; bool __stdcall EgtMidVector( int nId, int nRefId, Vector3d& vtV) ; bool __stdcall EgtAtParamVector( int nId, double dU, int nSide, int nRefId, Vector3d& vtV) ; bool __stdcall EgtFrame( int nId, int nRefId, Frame3d& frFrame) ; bool __stdcall EgtCurveExtrusion( int nId, int nRefId, Vector3d& vtExtr) ; // EgtCurveThickness vedi EinAPI.h bool __stdcall EgtCurveArcNormVersor( int nId, int nRefId, Vector3d& vtNorm) ; bool __stdcall EgtExtTextNormVersor( int nId, int nRefId, Vector3d& vtNorm) ; bool __stdcall EgtPointToIdGlob( Point3d& ptP, int nId) ; bool __stdcall EgtPointToIdLoc( Point3d& ptP, int nId) ; bool __stdcall EgtVectorToIdGlob( Vector3d& vtV, int nId) ; bool __stdcall EgtVectorToIdLoc( Vector3d& vtV, int nId) ; //--------------------------- Scene ------------------------------------------ bool __stdcall EgtSetBackground( Color TopCol, Color BottomCol, bool bRedraw) ; bool __stdcall EgtSetMarkAttribs( Color MarkCol) ; bool __stdcall EgtSetSelSurfAttribs( Color SelSurfCol) ; bool __stdcall EgtSetGeoLineAttribs( Color GlCol) ; bool __stdcall EgtSetGeoTriaAttribs( Color GtCol) ; bool __stdcall EgtSetWinRectAttribs( bool bOutline, Color WrCol) ; //--------------------------- Exchange --------------------------------------- int __stdcall EgtGetFileType( const std::string& sFilePath) ; bool __stdcall EgtImportDxf( const std::string& sFilePath) ; bool __stdcall EgtImportStl( const std::string& sFilePath) ; bool __stdcall EgtImportCnc( const std::string& sFilePath) ; bool __stdcall EgtExportDxf( int nId, const std::string& sFilePath) ; bool __stdcall EgtExportStl( int nId, const std::string& sFilePath) ; //--------------------------- TscExec ---------------------------------------- bool __stdcall EgtTscExecFile( const std::string& sFilePath) ;