EgtMachKernel (NewLink) :
- in SimulatorSP e SimulatorMP aggiunta gestione lavorazioni in doppio per OnPathStart.
This commit is contained in:
+18
-4
@@ -960,6 +960,13 @@ SimulatorMP::FindAndManagePathStart( int& nStatus)
|
||||
// se trovato nuovo CLpath con entità, gestisco inizio percorso di lavoro
|
||||
if ( m_nEntId != GDB_ID_NULL) {
|
||||
++ m_nCLPathInd ;
|
||||
// verifico se Path in doppio
|
||||
int nDBLPathId = GDB_ID_NULL ;
|
||||
int nDBLId = m_pGeomDB->GetFirstNameInGroup( m_nOpId, MCH_DBL) ;
|
||||
if ( nDBLId != GDB_ID_NULL) {
|
||||
string sCLPathName ; m_pGeomDB->GetName( m_nCLPathId, sCLPathName) ;
|
||||
nDBLPathId = m_pGeomDB->GetFirstNameInGroup( nDBLId, sCLPathName) ;
|
||||
}
|
||||
// recupero punti di inizio e fine percorso
|
||||
Point3d ptStart ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_START, ptStart) ;
|
||||
@@ -990,7 +997,7 @@ 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,
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, nDBLPathId, m_nAuxSTot, ptStart, ptEnd, vtExtr,
|
||||
ptMin, ptMax, vAxMin, vAxMax, dElev, vActiveExit)) {
|
||||
nStatus = CalcStatusOnError( ERR_NONE) ;
|
||||
return false ;
|
||||
@@ -1961,6 +1968,8 @@ SimulatorMP::OnMachiningEnd( void)
|
||||
{
|
||||
// chiamo la funzione di fine lavorazione
|
||||
bool bOk = CallFunction( ON_SIMUL_MACHINING_END, true) ;
|
||||
// reset eventuale Path in double
|
||||
bOk = bOk && m_pMachine->LuaResetGlobVar( GLOB_VAR + GVAR_DBLPATHID) ;
|
||||
// forzo aggiornamento posizione assi (possono essere stati mossi nello script)
|
||||
UpdateAxesPos() ;
|
||||
return bOk ;
|
||||
@@ -1968,13 +1977,18 @@ 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 INTVECTOR& vActiveExit)
|
||||
SimulatorMP::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 percorso di lavorazione 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
|
||||
|
||||
Reference in New Issue
Block a user