EgtMachKernel :
- assegnazione punto start ed estrusione anche per foratura e taglio con lama - emissione degli stessi anche in simulazione.
This commit is contained in:
+26
-4
@@ -130,9 +130,15 @@ Simulator::Start( void)
|
||||
m_nEntId = m_pGeomDB->GetFirstInGroup( m_nCLPathId) ;
|
||||
m_nEntInd = 0 ;
|
||||
m_dCoeff = 0 ;
|
||||
// recupero punto di inizio del percorso
|
||||
Point3d ptStart ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_START, ptStart) ;
|
||||
// recupero versore estrusione associato al percorso (normale al piano di interpolazione)
|
||||
Vector3d vtExtr ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_EXTR, vtExtr) ;
|
||||
// richiamo gestione evento inizio percorso di lavoro
|
||||
++ m_nCLPathInd ;
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd))
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, ptStart, vtExtr))
|
||||
return false ;
|
||||
|
||||
return true ;
|
||||
@@ -171,9 +177,15 @@ Simulator::Move( int& nStatus)
|
||||
}
|
||||
// se trovato nuovo CLpath
|
||||
if ( m_nEntId != GDB_ID_NULL) {
|
||||
// recupero punto di inizio del percorso
|
||||
Point3d ptStart ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_START, ptStart) ;
|
||||
// recupero versore estrusione associato al percorso (normale al piano di interpolazione)
|
||||
Vector3d vtExtr ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_EXTR, vtExtr) ;
|
||||
// richiamo gestione evento inizio percorso di lavoro
|
||||
++ m_nCLPathInd ;
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd)) {
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, ptStart, vtExtr)) {
|
||||
nStatus = MCH_SIM_ERR ;
|
||||
return false ;
|
||||
}
|
||||
@@ -274,8 +286,15 @@ Simulator::Move( int& nStatus)
|
||||
m_dCoeff = 0 ;
|
||||
// richiamo gestione evento inizio percorso di lavoro
|
||||
if ( m_nEntId != GDB_ID_NULL) {
|
||||
// recupero punto di inizio del percorso
|
||||
Point3d ptStart ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_START, ptStart) ;
|
||||
// recupero versore estrusione associato al percorso (normale al piano di interpolazione)
|
||||
Vector3d vtExtr ;
|
||||
m_pGeomDB->GetInfo( m_nCLPathId, KEY_EXTR, vtExtr) ;
|
||||
// richiamo gestione evento inizio percorso di lavoro
|
||||
++ m_nCLPathInd ;
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd)) {
|
||||
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, ptStart, vtExtr)) {
|
||||
nStatus = MCH_SIM_ERR ;
|
||||
return false ;
|
||||
}
|
||||
@@ -765,11 +784,14 @@ Simulator::OnMachiningEnd( void)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::OnPathStart( int nClPathId, int nClPathInd)
|
||||
Simulator::OnPathStart( int nClPathId, int nClPathInd, const Point3d& ptStart, const Vector3d& vtExtr)
|
||||
{
|
||||
// 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 punto iniziale e versore estrusione
|
||||
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_START, ptStart) ;
|
||||
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_EXTR, vtExtr) ;
|
||||
// verifico esistenza funzione
|
||||
if ( ! m_pMachine->LuaExistsFunction( ON_SIMUL_PATH_START))
|
||||
return bOk ;
|
||||
|
||||
Reference in New Issue
Block a user