EgtExecutor 1.6e7 :

- aggiustamenti vari per macchina e lavorazioni.
This commit is contained in:
Dario Sassi
2015-05-26 06:50:52 +00:00
parent 63d85b005a
commit 785c9add4b
4 changed files with 40 additions and 5 deletions
+4
View File
@@ -463,6 +463,8 @@ ExeGroupDump( int nId, string& sDump)
sDump = "Group " + ToString( nId) + "\r\n" ;
// preparo gli attributi
pGeomDB->DumpAttributes( nId, sDump, "\r\n") ;
// preparo ObjUser
pGeomDB->DumpObjUser( nId, sDump, "\r\n") ;
// numero di nodi (figli)
int nNodes = pGeomDB->GetGroupObjs( nId) ;
sDump += "Nodes : " + ToString( nNodes) + "\r\n" ;
@@ -505,6 +507,8 @@ ExeGeoObjDump( int nId, string& sDump)
sDump = pGeoObj->GetTitle() + " " + ToString( nId) + "\r\n" ;
// preparo gli attributi
pGeomDB->DumpAttributes( nId, sDump, "\r\n") ;
// preparo ObjUser
pGeomDB->DumpObjUser( nId, sDump, "\r\n") ;
// recupero i dati geometrici
if ( ! pGeoObj->Dump( sDump, "\r\n"))
return false ;
+13 -3
View File
@@ -610,13 +610,13 @@ ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit)
//-----------------------------------------------------------------------------
bool
ExeGetCalcAngles( const Vector3d& vtDirT,
ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// calcolo gli angoli macchina dalla direzione fresa passata
return pGseCtx->m_pMachMgr->GetCalcAngles( vtDirT, nStat, dAngA1, dAngB1, dAngA2, dAngB2) ;
// calcolo gli angoli macchina dalle direzioni fresa e ausiliaria passate
return pGseCtx->m_pMachMgr->GetCalcAngles( vtDirT, vtDirA, nStat, dAngA1, dAngB1, dAngA2, dAngB2) ;
}
//-----------------------------------------------------------------------------
@@ -639,3 +639,13 @@ ExeVerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAng
// verifica l'extracorsa degli assi
return pGseCtx->m_pMachMgr->VerifyOutOfStroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
}
//-----------------------------------------------------------------------------
int
ExeAddDrilling( const string& sName)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// verifica l'extracorsa degli assi
return pGseCtx->m_pMachMgr->AddDrilling( sName) ;
}
BIN
View File
Binary file not shown.
+23 -2
View File
@@ -668,13 +668,15 @@ LuaSetCalcTool( lua_State* L)
static int
LuaGetCalcAngles( lua_State* L)
{
// 1 parametro : vtDirT
// 1 o 2 parametri : vtDirT, vtDirA
Vector3d vtDirT ;
LuaCheckParam( L, 1, vtDirT)
Vector3d vtDirA ;
LuaGetParam( L, 2, vtDirA) ;
LuaClearStack( L) ;
// imposto la tavola corrente per il calcolo
int nStat ; double dAngA1 ; double dAngB1 ; double dAngA2 ; double dAngB2 ;
bool bOk = ExeGetCalcAngles( vtDirT, nStat, dAngA1, dAngB1, dAngA2, dAngB2) ;
bool bOk = ExeGetCalcAngles( vtDirT, vtDirA, nStat, dAngA1, dAngB1, dAngA2, dAngB2) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
@@ -752,6 +754,24 @@ LuaVerifyOutOfStroke( lua_State* L)
}
}
//-------------------------------------------------------------------------------
static int
LuaAddDrilling( lua_State* L)
{
// 1 parametro : sName
string sName ;
LuaCheckParam( L, 1, sName)
LuaClearStack( L) ;
// aggiungo la lavorazione
int nId = ExeAddDrilling( sName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
else
LuaSetReturn( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
bool
LuaInstallMachMgr( LuaMgr& luaMgr)
@@ -797,6 +817,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcAngles", LuaGetCalcAngles) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcPositions", LuaGetCalcPositions) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVerifyOutOfStroke", LuaVerifyOutOfStroke) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtAddDrilling", LuaAddDrilling) ;
return bOk ;
}