EgtMachKernel 1.6r7 :
- possibilità di collegare e scollegare fixtures da gruppi macchina (come i grezzi) - aggiunto richiamo funzione script OnSetHead.
This commit is contained in:
+16
-1
@@ -30,7 +30,11 @@ using namespace std ;
|
||||
//----------------------------------------------------------------------------
|
||||
static const string EMC_VAR = "EMC" ; // tabella variabili locali per calcolo
|
||||
static const string EVAR_TABNAME = ".TABNAME" ; // (string) nome della tavola macchina
|
||||
static const string EVAR_HEAD = ".HEAD" ; // (string) nome della testa
|
||||
static const string EVAR_EXIT = ".EXIT" ; // (int) numero dell'uscita
|
||||
static const string EVAR_TOOL = ".TOOL" ; // (string) nome dell'utensile
|
||||
static const string ON_SET_TABLE = "OnSetTable" ;
|
||||
static const string ON_SET_HEAD = "OnSetHead" ;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -173,6 +177,17 @@ Machine::SetCurrTool( const string& sTool, const string& sHead, int nExit)
|
||||
m_vtCalcADir = pHead->GetADir() ;
|
||||
m_dCalcTLen = dTLen ;
|
||||
m_dCalcTRad = dTDiam / 2 ;
|
||||
// lancio eventuale funzione lua di personalizzazione
|
||||
if ( LuaExistsFunction( ON_SET_HEAD)) {
|
||||
bool bOk = LuaCreateGlobTable( EMC_VAR) ;
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_HEAD, sHead) ;
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_EXIT, nExit) ;
|
||||
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_TOOL, sTool) ;
|
||||
bOk = bOk && LuaCallFunction( ON_SET_HEAD) ;
|
||||
bOk = bOk && LuaResetGlobVar( EMC_VAR) ;
|
||||
if ( ! bOk)
|
||||
return false ;
|
||||
}
|
||||
// determino la catena cinematica
|
||||
return CalculateKinematicChain() ;
|
||||
}
|
||||
@@ -557,7 +572,7 @@ Machine::GetMyAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
}
|
||||
|
||||
// direzione primo asse rotante
|
||||
Vector3d vtAx1 = m_vCalcRotAx[0].vtDir ;
|
||||
Vector3d vtAx1 = RotAx1.vtDir ;
|
||||
// se asse di tavola, ne inverto la direzione
|
||||
if ( ! RotAx1.bHead)
|
||||
vtAx1.Invert() ;
|
||||
|
||||
Reference in New Issue
Block a user