EgtMachKernel :

- aggiunta gestione gruppi a forare con uscite selezionabili per anteprima, simulazione, stima e generazione.
This commit is contained in:
Dario Sassi
2025-02-04 14:52:06 +01:00
parent 4d1757ae30
commit 0b5fe6a619
14 changed files with 276 additions and 185 deletions
+8 -2
View File
@@ -980,6 +980,9 @@ SimulatorMP::FindAndManagePathStart( int& nStatus)
// recupero massima elevazione
double dElev = 0 ;
m_pGeomDB->GetInfo( m_nCLPathId, KEY_ELEV, dElev) ;
// recupero eventuale attivazione uscite (gruppi a forare)
INTVECTOR vActiveExit ;
m_pGeomDB->GetInfo( m_nCLPathId, KEY_DRACEX, vActiveExit) ;
// recupero il numero di eventi ausiliari di inizio
if ( ! m_pGeomDB->GetInfo( m_nCLPathId, KEY_AS_TOT, m_nAuxSTot))
m_nAuxSTot = 0 ;
@@ -988,7 +991,8 @@ SimulatorMP::FindAndManagePathStart( int& nStatus)
m_nAuxEInd = 0 ;
m_nAuxETot = 0 ;
// richiamo gestione evento inizio percorso di lavoro
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, m_nAuxSTot, ptStart, ptEnd, vtExtr, ptMin, ptMax, vAxMin, vAxMax, dElev)) {
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, m_nAuxSTot, ptStart, ptEnd, vtExtr,
ptMin, ptMax, vAxMin, vAxMax, dElev, vActiveExit)) {
nStatus = CalcStatusOnError( ERR_NONE) ;
return false ;
}
@@ -1945,7 +1949,7 @@ SimulatorMP::OnMachiningEnd( void)
bool
SimulatorMP::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart, const Point3d& ptEnd,
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax,
const DBLVECTOR& vAxMin, const DBLVECTOR& vAxMax, double dElev)
const DBLVECTOR& vAxMin, const DBLVECTOR& vAxMax, double dElev, const INTVECTOR& vActiveExit)
{
// assegno identificativo e indice percorso di lavorazione
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PATHID, nClPathId) ;
@@ -1964,6 +1968,8 @@ SimulatorMP::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d&
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PAXMAX, vAxMax) ;
// assegno la massima elevazione
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_ELEV, dElev) ;
// assegno uscite attive per gruppi a forare
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_DRACEX, vActiveExit) ;
// chiamo la funzione di inizio percorso di lavorazione
bOk = bOk && CallFunction( ON_SIMUL_PATH_START, true) ;
// forzo aggiornamento posizione assi (possono essere stati mossi nello script)