diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index fb07e83..9dac4fb 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Processor.cpp b/Processor.cpp index 9519e53..0087b5f 100644 --- a/Processor.cpp +++ b/Processor.cpp @@ -398,6 +398,13 @@ Processor::ProcessMachining( int nOpId, int nOpInd) bool Processor::ProcessClPath( int nClPathId, int nClPathInd, int nOpId, int nOpInd) { + // verifico se Path in doppio + int nDblPathId = GDB_ID_NULL ; + int nDblId = m_pGeomDB->GetFirstNameInGroup( nOpId, MCH_DBL) ; + if ( nDblId != GDB_ID_NULL) { + string sCLPathName ; m_pGeomDB->GetName( nClPathId, sCLPathName) ; + nDblPathId = m_pGeomDB->GetFirstNameInGroup( nDblId, sCLPathName) ; + } // Recupero punti di inizio e fine del percorso Point3d ptStart ; m_pGeomDB->GetInfo( nClPathId, KEY_START, ptStart) ; @@ -424,7 +431,7 @@ Processor::ProcessClPath( int nClPathId, int nClPathInd, int nOpId, int nOpInd) int nAS = 0 ; m_pGeomDB->GetInfo( nClPathId, KEY_AS_TOT, nAS) ; // Emetto inizio percorso di lavoro - if ( ! OnPathStart( nClPathId, nClPathInd, nAS, ptStart, ptEnd, vtExtr, + if ( ! OnPathStart( nClPathId, nClPathInd, nDblPathId, nAS, ptStart, ptEnd, vtExtr, ptMin, ptMax, vAxMin, vAxMax, dElev, vActiveExit)) return false ; @@ -963,18 +970,25 @@ Processor::OnMachiningEnd( void) { // chiamo la funzione di fine lavorazione bool bOk = CallOnMachiningEnd() ; + // reset eventuale Path in double + bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_DBLPATHID) ; return bOk ; } //---------------------------------------------------------------------------- bool -Processor::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart, const Point3d& ptEnd, +Processor::OnPathStart( int nClPathId, int nClPathInd, int nDblPathId, 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 INTVECTOR& vActiveExit) { // assegno identificativo e indice percorso di lavorazione bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PATHID, nClPathId) ; bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PATHIND, nClPathInd) ; + // assegno identificativo eventuale percorso in doppio + if ( nDblPathId == GDB_ID_NULL) + bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_DBLPATHID) ; + else + bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_DBLPATHID, nDblPathId) ; // assegno numero di dati ausiliari iniziali bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_AUXTOT, nAS) ; // assegno punti iniziale e finale e versore estrusione del percorso originale diff --git a/Processor.h b/Processor.h index 80d5dac..6fbec04 100644 --- a/Processor.h +++ b/Processor.h @@ -54,7 +54,7 @@ class Processor bool OnMachiningStart( int nOpId, int nOpInd, double dSpeed, const Point3d& ptMin, const Point3d& ptMax, const DBLVECTOR& vAxMin, const DBLVECTOR& vAxMax) ; bool OnMachiningEnd( void) ; - bool OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart, const Point3d& ptEnd, + bool OnPathStart( int nClPathId, int nClPathInd, int nDblPathId, 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 INTVECTOR& vActiveExit) ; bool OnPathEnd( int nAE) ;