From d4261f9fab3791975f3516efb8c4f20f8ea32df0 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 31 Oct 2015 09:47:51 +0000 Subject: [PATCH] Include : - modifiche varie. --- EInAPI.h | 15 ++++++++------ EMkMachMgr.h | 56 +++++++++++++++++++++++++++++---------------------- EXeExecutor.h | 56 +++++++++++++++++++++++++++++---------------------- 3 files changed, 73 insertions(+), 54 deletions(-) diff --git a/EInAPI.h b/EInAPI.h index c9004b1..37bffab 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -490,17 +490,20 @@ EIN_EXPORT BOOL __stdcall EgtGetTableRef1( double ptPos[3]) ; EIN_EXPORT BOOL __stdcall EgtGetTableArea1( int* pnAreaId) ; EIN_EXPORT BOOL __stdcall EgtShowOnlyTable( bool bVal) ; // Tools DataBase +EIN_EXPORT BOOL __stdcall EgtTdbGetToolNewName( const wchar_t* wsName, wchar_t*& wsNewName) ; EIN_EXPORT BOOL __stdcall EgtTdbAddTool( const wchar_t* wsName, int nType) ; EIN_EXPORT BOOL __stdcall EgtTdbCopyTool( const wchar_t* wsSource, const wchar_t* wsName) ; EIN_EXPORT BOOL __stdcall EgtTdbRemoveTool( const wchar_t* wsName) ; EIN_EXPORT BOOL __stdcall EgtTdbGetFirstTool( int nFamily, wchar_t*& wsName, int* pnType) ; EIN_EXPORT BOOL __stdcall EgtTdbGetNextTool( int nFamily, wchar_t*& wsName, int* pnType) ; -EIN_EXPORT BOOL __stdcall EgtTdbSetToolParamInt( const wchar_t* wsName, int nType, int nVal) ; -EIN_EXPORT BOOL __stdcall EgtTdbSetToolParamDouble( const wchar_t* wsName, int nType, double dVal) ; -EIN_EXPORT BOOL __stdcall EgtTdbSetToolParamString( const wchar_t* wsName, int nType, const wchar_t* wsVal) ; -EIN_EXPORT BOOL __stdcall EgtTdbGetToolParamInt( const wchar_t* wsName, int nType, int* pnVal) ; -EIN_EXPORT BOOL __stdcall EgtTdbGetToolParamDouble( const wchar_t* wsName, int nType, double* pdVal) ; -EIN_EXPORT BOOL __stdcall EgtTdbGetToolParamString( const wchar_t* wsName, int nType, wchar_t*& wsVal) ; +EIN_EXPORT BOOL __stdcall EgtTdbSetCurrTool( const wchar_t* wsName) ; +EIN_EXPORT BOOL __stdcall EgtTdbSaveCurrTool( void) ; +EIN_EXPORT BOOL __stdcall EgtTdbSetCurrToolParamInt( int nType, int nVal) ; +EIN_EXPORT BOOL __stdcall EgtTdbSetCurrToolParamDouble( int nType, double dVal) ; +EIN_EXPORT BOOL __stdcall EgtTdbSetCurrToolParamString( int nType, const wchar_t* wsVal) ; +EIN_EXPORT BOOL __stdcall EgtTdbGetCurrToolParamInt( int nType, int* pnVal) ; +EIN_EXPORT BOOL __stdcall EgtTdbGetCurrToolParamDouble( int nType, double* pdVal) ; +EIN_EXPORT BOOL __stdcall EgtTdbGetCurrToolParamString( int nType, wchar_t*& wsVal) ; EIN_EXPORT BOOL __stdcall EgtTdbSave( void) ; // Simulation EIN_EXPORT BOOL __stdcall EgtSimStart( void) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index cb7e103..3fc5171 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -73,37 +73,26 @@ class __declspec( novtable) IMachMgr virtual bool SetTable( const std::string& sTable) = 0 ; virtual bool GetTableRef1( Point3d& ptPos) = 0 ; virtual bool GetTableArea1( int& nAreaId) = 0 ; - virtual int AddSubPiece( const std::string& sName, const Point3d& ptPos, double dAngRotDeg) = 0 ; + virtual int AddFixture( 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 ResetAllAxesPos( void) = 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 ; - // Tool DataBase + // Tools DataBase + virtual bool TdbGetToolNewName( std::string& sName) = 0 ; virtual bool TdbAddTool( const std::string& sName, int nType) = 0 ; virtual bool TdbCopyTool( const std::string& sSource, const std::string& sName) = 0 ; virtual bool TdbRemoveTool( const std::string& sName) = 0 ; virtual bool TdbGetFirstTool( int nFamily, std::string& sName, int& nType) = 0 ; virtual bool TdbGetNextTool( int nFamily, std::string& sName, int& nType) = 0 ; - virtual bool TdbSetToolParam( const std::string& sName, int nType, int nVal) = 0 ; - virtual bool TdbSetToolParam( const std::string& sName, int nType, double dVal) = 0 ; - virtual bool TdbSetToolParam( const std::string& sName, int nType, const std::string& sVal) = 0 ; - virtual bool TdbGetToolParam( const std::string& sName, int nType, int& nVal) const = 0 ; - virtual bool TdbGetToolParam( const std::string& sName, int nType, double& dVal) const = 0 ; - virtual bool TdbGetToolParam( const std::string& sName, int nType, std::string& sVal) const = 0 ; + virtual bool TdbSetCurrTool( const std::string& sName) = 0 ; + virtual bool TdbSaveCurrTool( void) = 0 ; + virtual bool TdbSetCurrToolParam( int nType, int nVal) = 0 ; + virtual bool TdbSetCurrToolParam( int nType, double dVal) = 0 ; + virtual bool TdbSetCurrToolParam( int nType, const std::string& sVal) = 0 ; + virtual bool TdbGetCurrToolParam( int nType, int& nVal) const = 0 ; + virtual bool TdbGetCurrToolParam( int nType, double& dVal) const = 0 ; + virtual bool TdbGetCurrToolParam( int nType, std::string& sVal) const = 0 ; virtual bool TdbSave( void) const = 0 ; + // Machinings DataBase + // ... // Operations : general virtual int GetOperationCount( void) const = 0 ; virtual int GetFirstOperation( void) const = 0 ; @@ -133,6 +122,25 @@ class __declspec( novtable) IMachMgr virtual bool SimMove( void) = 0 ; virtual bool SimSetStep( double dStep) = 0 ; virtual bool SimStop( void) = 0 ; + // Generation + virtual bool Generate( const std::string& sCncFile) = 0 ; + // Machine Calc + 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 ; + // Machine Move + 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 ResetAllAxesPos( void) = 0 ; + virtual bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) = 0 ; + virtual bool ResetHeadSet( const std::string& sHead) = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EXeExecutor.h b/EXeExecutor.h index 7bc0574..931f8b2 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -476,7 +476,7 @@ EXE_EXPORT int ExeGetMachGroupId( const std::string& sName) ; EXE_EXPORT bool ExeSetCurrMachGroup( int nMGroupId) ; EXE_EXPORT bool ExeResetCurrMachGroup( void) ; EXE_EXPORT int ExeGetCurrMachGroup( void) ; -// Raw Parts +// Raw Parts & Parts EXE_EXPORT int ExeGetRawPartCount( void) ; EXE_EXPORT int ExeGetFirstRawPart( void) ; EXE_EXPORT int ExeGetNextRawPart( int nRawId) ; @@ -501,35 +501,25 @@ EXE_EXPORT bool ExeSetTable( const std::string& sTable) ; EXE_EXPORT bool ExeGetTableRef1( Point3d& ptPos) ; EXE_EXPORT bool ExeGetTableArea1( int& nAreaId) ; EXE_EXPORT bool ExeShowOnlyTable( bool bVal) ; -EXE_EXPORT int ExeAddSubPiece( const std::string& sName, const Point3d& ptPos, double dAngRotDeg) ; -// Machine Calc -EXE_EXPORT bool ExeSetAxisPos( const std::string& sAxis, double dVal) ; -EXE_EXPORT bool ExeGetAxisPos( const std::string& sAxis, double* pdVal) ; -EXE_EXPORT bool ExeGetAxisHomePos( const std::string& sAxis, double* pdHomeVal) ; -EXE_EXPORT bool ExeResetAxisPos( const std::string& sAxis) ; -EXE_EXPORT bool ExeLoadTool( const std::string& sHead, int nExit, const std::string& sTool) ; -EXE_EXPORT bool ExeResetHeadSet( const std::string& sHead) ; -EXE_EXPORT bool ExeSetCalcTable( const std::string& sTable) ; -EXE_EXPORT bool ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) ; -EXE_EXPORT bool ExeGetCalcTool( std::string& sTool) ; -EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, - int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2) ; -EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, double dAngA, double dAngB, - int& nStat, double& dX, double& dY, double& dZ) ; -EXE_EXPORT bool ExeVerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) ; -// Tool DataBase +EXE_EXPORT int ExeAddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg) ; +// Tools Database +EXE_EXPORT bool ExeTdbGetToolNewName( std::string& sName) ; EXE_EXPORT bool ExeTdbAddTool( const std::string& sName, int nType) ; EXE_EXPORT bool ExeTdbCopyTool( const std::string& sSource, const std::string& sName) ; EXE_EXPORT bool ExeTdbRemoveTool( const std::string& sName) ; EXE_EXPORT bool ExeTdbGetFirstTool( int nFamily, std::string& sName, int& nType) ; EXE_EXPORT bool ExeTdbGetNextTool( int nFamily, std::string& sName, int& nType) ; -EXE_EXPORT bool ExeTdbSetToolParam( const std::string& sName, int nType, int nVal) ; -EXE_EXPORT bool ExeTdbSetToolParam( const std::string& sName, int nType, double dVal) ; -EXE_EXPORT bool ExeTdbSetToolParam( const std::string& sName, int nType, const std::string& sVal) ; -EXE_EXPORT bool ExeTdbGetToolParam( const std::string& sName, int nType, int& nVal) ; -EXE_EXPORT bool ExeTdbGetToolParam( const std::string& sName, int nType, double& dVal) ; -EXE_EXPORT bool ExeTdbGetToolParam( const std::string& sName, int nType, std::string& sVal) ; +EXE_EXPORT bool ExeTdbSetCurrTool( const std::string& sName) ; +EXE_EXPORT bool ExeTdbSaveCurrTool( void) ; +EXE_EXPORT bool ExeTdbSetCurrToolParam( int nType, int nVal) ; +EXE_EXPORT bool ExeTdbSetCurrToolParam( int nType, double dVal) ; +EXE_EXPORT bool ExeTdbSetCurrToolParam( int nType, const std::string& sVal) ; +EXE_EXPORT bool ExeTdbGetCurrToolParam( int nType, int& nVal) ; +EXE_EXPORT bool ExeTdbGetCurrToolParam( int nType, double& dVal) ; +EXE_EXPORT bool ExeTdbGetCurrToolParam( int nType, std::string& sVal) ; EXE_EXPORT bool ExeTdbSave( void) ; +// Machinings Database +// ... // Operations EXE_EXPORT int ExeGetFirstOperation( void) ; EXE_EXPORT int ExeGetNextOperation( int nId) ; @@ -549,6 +539,24 @@ EXE_EXPORT bool ExeSimMove( void) ; EXE_EXPORT bool ExeSimHome( void) ; EXE_EXPORT bool ExeSimSetStep( double dStep) ; EXE_EXPORT bool ExeSimStop( void) ; +// Generation +EXE_EXPORT bool ExeGenerate( const std::string& sCncFile) ; +// Machine Calc +EXE_EXPORT bool ExeSetCalcTable( const std::string& sTable) ; +EXE_EXPORT bool ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) ; +EXE_EXPORT bool ExeGetCalcTool( std::string& sTool) ; +EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, + int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2) ; +EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, double dAngA, double dAngB, + int& nStat, double& dX, double& dY, double& dZ) ; +EXE_EXPORT bool ExeVerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) ; +// Machine Move +EXE_EXPORT bool ExeSetAxisPos( const std::string& sAxis, double dVal) ; +EXE_EXPORT bool ExeGetAxisPos( const std::string& sAxis, double* pdVal) ; +EXE_EXPORT bool ExeGetAxisHomePos( const std::string& sAxis, double* pdHomeVal) ; +EXE_EXPORT bool ExeResetAxisPos( const std::string& sAxis) ; +EXE_EXPORT bool ExeLoadTool( const std::string& sHead, int nExit, const std::string& sTool) ; +EXE_EXPORT bool ExeResetHeadSet( const std::string& sHead) ; // Scene EXE_EXPORT bool ExeInitScene( HWND hWnd, int nDriver, bool b2Buff, int nColorBits, int nDepthBits) ;