EgtExecutor :

- modifiche varie per OmagCut.
This commit is contained in:
Dario Sassi
2015-09-19 08:27:43 +00:00
parent b2469b944d
commit d7c8a61456
5 changed files with 202 additions and 14 deletions
+85 -3
View File
@@ -236,18 +236,18 @@ ExeGetNextRawPart( int nRawId)
//-----------------------------------------------------------------------------
int
ExeAddRawPart( Point3d ptOrig, double dWidth, double dLength, double dHeight, Color cCol)
ExeAddRawPart( Point3d ptOrig, double dLength, double dWidth, double dHeight, Color cCol)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL)
// inserisco grezzo nella macchinata corrente
int nId = pGseCtx->m_pMachMgr->AddRawPart( ptOrig, dWidth, dLength, dHeight, cCol) ;
int nId = pGseCtx->m_pMachMgr->AddRawPart( ptOrig, dLength, dWidth, dHeight, cCol) ;
ExeSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtAddRawPart({" + ToString( ptOrig) + "}," +
ToString( dWidth) + "," +
ToString( dLength) + "," +
ToString( dWidth) + "," +
ToString( dHeight) + ",{" +
ToString( cCol) + "})" +
" -- Id=" + ToString( nId) ;
@@ -279,6 +279,28 @@ ExeAddRawPartWithPart( int nPartId, int nCrvId, double dOverMat, Color cCol)
return nId ;
}
//-----------------------------------------------------------------------------
bool
ExeModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// modifico la lunghezza del grezzo
bool bOk = pGseCtx->m_pMachMgr->ModifyRawPartSize( nRawId, dLength, dWidth, dHeight) ;
ExeSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtModifyRawPartSize(" + ToString( nRawId) + "," +
ToString( dLength) + "," +
ToString( dWidth) + "," +
ToString( dHeight) + ")" +
" -- Ok=" + ToString( bOk) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
}
// restituisco il risultato
return bOk ;
}
//-----------------------------------------------------------------------------
bool
ExeModifyRawPartHeight( int nRawId, double dHeight)
@@ -522,6 +544,26 @@ ExeSetTable( const std::string& sTable)
return pGseCtx->m_pMachMgr->SetTable( sTable) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetTableRef1( Point3d& ptPos)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// recupero il riferimento della tavola corrente della macchinata corrente
return pGseCtx->m_pMachMgr->GetTableRef1( ptPos) ;
}
//-----------------------------------------------------------------------------
bool
ExeShowOnlyTable( bool bVal)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// visualizzo solo la tavola corrente della macchinata corrente
return pGseCtx->m_pMachMgr->ShowOnlyTable( bVal) ;
}
//-----------------------------------------------------------------------------
int
ExeAddSubPiece( const string& sName, const Point3d& ptPos, double dAngRotDeg)
@@ -618,6 +660,16 @@ ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit)
return pGseCtx->m_pMachMgr->SetCalcTool( sTool, sHead, nExit) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetCalcTool( std::string& sTool)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// restituisco il nome dell'utensile corrente per il calcolo sulla macchina della macchinata corrente
return pGseCtx->m_pMachMgr->GetCalcTool( sTool) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
@@ -650,6 +702,36 @@ ExeVerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAng
return pGseCtx->m_pMachMgr->VerifyOutOfStroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetToolParam( const string& sName, int nType, int& nVal)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// recupero il parametro dell'utensile
return pGseCtx->m_pMachMgr->GetToolParam( sName, nType, nVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetToolParam( const string& sName, int nType, double& dVal)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// recupero il parametro dell'utensile
return pGseCtx->m_pMachMgr->GetToolParam( sName, nType, dVal) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetToolParam( const string& sName, int nType, string& sVal)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// recupero il parametro dell'utensile
return pGseCtx->m_pMachMgr->GetToolParam( sName, nType, sVal) ;
}
//-----------------------------------------------------------------------------
int
ExeAddMachining( const string& sName, const std::string& sMachining)