EgtMachKernel 3.1d5 :

- aggiunta impostazione variabile EMT.DBLPATHID anche per generazione e simulazione quando è il caso.
This commit is contained in:
Dario Sassi
2026-04-17 11:50:52 +02:00
parent 20b56583c3
commit 614532c2a0
3 changed files with 17 additions and 3 deletions
BIN
View File
Binary file not shown.
+16 -2
View File
@@ -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
+1 -1
View File
@@ -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) ;