EgtMachKernel 1.6x5 :

- ora OnSpecialApplyDisposition gestisce anche TcPos
- aggiunta possibilità di richiamo OnPostApplyMachining al termine ricalcolo lavorazione
- aggiunta funzione Lua EmtGetAxesPos
- piccole migliorie a simulazione.
This commit is contained in:
Dario Sassi
2017-01-03 09:18:22 +00:00
parent 3587b88a61
commit d9c080c6d6
14 changed files with 142 additions and 21 deletions
+26
View File
@@ -190,3 +190,29 @@ Machine::LuaEmtAddLinearMove( lua_State* L)
LuaSetParam( L) ;
return 1 ;
}
//----------------------------------------------------------------------------
int
Machine::LuaEmtGetAxesPos( lua_State* L)
{
// 1 parametri : nClEntId
int nClEntId ;
LuaCheckParam( L, 1, nClEntId)
LuaClearStack( L) ;
// verifico ci sia una macchina attiva valida
if ( m_pMchLua == nullptr ||
m_pMchLua->m_pMchMgr == nullptr || m_pMchLua->m_pGeomDB == nullptr)
return luaL_error( L, " Unknown Machine") ;
// recupero l'oggetto CamData
const CamData* pCamData = GetCamData( m_pMchLua->m_pGeomDB->GetUserObj( nClEntId)) ;
bool bOk = ( pCamData != nullptr) ;
bOk = bOk && pCamData->GetAxesStatus() == CamData::AS_OK ;
if ( bOk) {
DBLVECTOR AxesVal = pCamData->GetAxesVal() ;
LuaSetParam( L, AxesVal) ;
}
else
LuaSetParam( L) ;
return 1 ;
}