EgtMachKernel :
- assegnazione punto start ed estrusione anche per foratura e taglio con lama - emissione degli stessi anche in simulazione.
This commit is contained in:
@@ -832,6 +832,10 @@ Drilling::GenerateHoleCl( int nInd, const SelData& nCircId, const string& sPName
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str()) ;
|
||||
return true ;
|
||||
}
|
||||
// assegno il vettore estrazione al gruppo del percorso
|
||||
m_pGeomDB->SetInfo( nPathId, KEY_EXTR, hole.vtDir) ;
|
||||
// assegno il punto di inizio al gruppo del percorso
|
||||
m_pGeomDB->SetInfo( nPathId, KEY_START, hole.ptIni) ;
|
||||
// limito lunghezza foro a massima lavorazione della punta
|
||||
if ( hole.dLen > m_TParams.m_dMaxMat + EPS_SMALL) {
|
||||
hole.dLen = m_TParams.m_dMaxMat ;
|
||||
|
||||
@@ -1402,6 +1402,10 @@ Sawing::GenerateLineCl( const ICurveLine* pLine, const Vector3d& vtTool, const V
|
||||
return false ;
|
||||
m_pGeomDB->SetName( nPxId, sName) ;
|
||||
m_pGeomDB->SetMaterial( nPxId, BLUE) ;
|
||||
// assegno il vettore estrazione al gruppo del percorso
|
||||
m_pGeomDB->SetInfo( nPxId, KEY_EXTR, Vector3d( 0, 0, 1)) ;
|
||||
// assegno il punto di inizio al gruppo del percorso
|
||||
m_pGeomDB->SetInfo( nPxId, KEY_START, pLine->GetStart()) ;
|
||||
// Imposto dati comuni
|
||||
SetPathId( nPxId) ;
|
||||
SetToolDir( vtTool) ;
|
||||
|
||||
+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 ;
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class Simulator
|
||||
bool OnToolDeselect( const std::string& sNextHead, int nNextExit, const std::string& sNextTcPos) ;
|
||||
bool OnMachiningStart( int nOpId, int nOpInd) ;
|
||||
bool OnMachiningEnd( void) ;
|
||||
bool OnPathStart( int nClPathId, int nClPathInd) ;
|
||||
bool OnPathStart( int nClPathId, int nClPathInd, const Point3d& ptStart, const Vector3d& vtExtr) ;
|
||||
bool OnPathEnd( void) ;
|
||||
bool OnMoveStart( const CamData* pCamData) ;
|
||||
bool OnMoveEnd( void) ;
|
||||
|
||||
Reference in New Issue
Block a user