//---------------------------------------------------------------------------- // EgalTech 2015-2015 //---------------------------------------------------------------------------- // File : EMkMachMgr.h Data : 23.03.15 Versione : 1.6c6 // Contenuto : Dichiarazione della interfaccia IMachMgr. // // // // Modifiche : 23.03.15 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EGkGeomDB.h" #include "/EgtDev/Include/EGkSelection.h" //----------------------- Macro per import/export ---------------------------- #undef EMK_EXPORT #if defined( I_AM_EMK) // da definirsi solo nella DLL #define EMK_EXPORT __declspec( dllexport) #else #define EMK_EXPORT __declspec( dllimport) #endif //----------------------------------------------------------------------------- class __declspec( novtable) IMachMgr { public : // Basic virtual ~IMachMgr( void) {} virtual bool Init( const std::string& sMachinesDir, IGeomDB* pGeomDB, int nContextId, const std::string& sLuaLibsDir, const std::string& sLuaLastRequire) = 0 ; virtual bool Update( void) = 0 ; virtual bool Insert( int nInsGrp) = 0 ; // MachGroups virtual int GetMachGroupCount( void) const = 0 ; virtual int GetFirstMachGroup( void) const = 0 ; virtual int GetNextMachGroup( int nId) const = 0 ; virtual bool GetMachGroupNewName( std::string& sName) const = 0 ; virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) = 0 ; virtual bool RemoveMachGroup( int nId) = 0 ; virtual std::string GetMachGroupName( int nId) const = 0 ; virtual int GetMachGroupId( const std::string& sName) const = 0 ; virtual bool SetCurrMachGroup( int nId) = 0 ; virtual bool ResetCurrMachGroup( void) = 0 ; virtual int GetCurrMachGroup( void) const = 0 ; // RawParts virtual int GetRawPartCount( void) const = 0 ; virtual int GetFirstRawPart( void) const = 0 ; virtual int GetNextRawPart( int nId) const = 0 ; virtual int AddRawPart( const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ; virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ; virtual bool ModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) = 0 ; virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ; virtual bool RemoveRawPart( int nRawId) = 0 ; virtual bool RotateRawPart( int nRawId, const Vector3d& vtAx, double dAngRotDeg) = 0 ; virtual bool MoveToCornerRawPart( int nRawId, const Point3d& ptCorner, int nFlag) = 0 ; virtual bool MoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag) = 0 ; virtual bool MoveRawPart( int nRawId, const Vector3d& vtMove) = 0 ; // Parts virtual int GetPartInRawPartCount( int nRawId) const = 0 ; virtual int GetFirstPartInRawPart( int nRawId) const = 0 ; virtual int GetNextPartInRawPart( int nId) const = 0 ; virtual bool AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId) = 0 ; virtual bool RemovePartFromRawPart( int nPartId) = 0 ; virtual bool TranslatePartInRawPart( int nPartId, const Vector3d& vtMove) = 0 ; virtual bool RotatePartInRawPart( int nPartId, const Vector3d& vtAx, double dAngRotDeg) = 0 ; // Tables and Fixtures virtual bool SetTable( const std::string& sTable) = 0 ; virtual bool GetTableRef1( Point3d& ptPos) = 0 ; virtual int AddSubPiece( const std::string& sName, const Point3d& ptPos, double dAngRotDeg) = 0 ; virtual bool ShowOnlyTable( bool bVal) = 0 ; // Machine virtual bool SetAxisPos( const std::string& sAxis, double dVal) = 0 ; virtual bool GetAxisPos( const std::string& sAxis, double& dVal) = 0 ; virtual bool GetAxisHomePos( const std::string& sAxis, double& dHomeVal) = 0 ; virtual bool ResetAxisPos( const std::string& sAxis) = 0 ; virtual bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) = 0 ; virtual bool ResetHeadSet( const std::string& sHead) = 0 ; virtual bool SetCalcTable( const std::string& sTable) = 0 ; virtual bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) = 0 ; virtual bool GetCalcTool( std::string& sTool) = 0 ; virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2) = 0 ; virtual bool GetCalcPositions( const Point3d& ptP, double dAngA, double dAngB, int& nStat, double& dX, double& dY, double& dZ) = 0 ; virtual bool VerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) = 0 ; // Tools virtual bool GetToolParam( const std::string& sName, int nType, int& nVal) const = 0 ; virtual bool GetToolParam( const std::string& sName, int nType, double& dVal) const = 0 ; virtual bool GetToolParam( const std::string& sName, int nType, std::string& sVal) const = 0 ; // Operations virtual int AddMachining( const std::string& sName, const std::string& sMachining) = 0 ; virtual bool SetMachiningParam( int nType, bool bVal) = 0 ; virtual bool SetMachiningParam( int nType, int nVal) = 0 ; virtual bool SetMachiningParam( int nType, double dVal) = 0 ; virtual bool SetMachiningParam( int nType, const std::string& sVal) = 0 ; virtual bool SetMachiningGeometry( const SELVECTOR& vIds) = 0 ; virtual bool Apply( void) = 0 ; } ; //----------------------------------------------------------------------------- extern "C" { EMK_EXPORT IMachMgr* CreateMachMgr(void) ; }