EgtMachKernel 1.8d9 :

- aggiunta EMT.ELEV ( elevazione massima) ai dati di OnStartPath di Generatore e Simulatore.
This commit is contained in:
Dario Sassi
2017-05-01 13:05:14 +00:00
parent 8903b225a8
commit 07cc0270cc
12 changed files with 55 additions and 6 deletions
+2
View File
@@ -1154,6 +1154,8 @@ Chiseling::ProcessPath( int nPathId, int nPvId, int nClId)
m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ;
// assegno il punto di inizio al gruppo del percorso
m_pGeomDB->SetInfo( nPxId, KEY_START, vSqHole[i].ptIni) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// assegno al gruppo l'ingombro del percorso di scalpellatura
BBox3d b3Grp ;
m_pGeomDB->GetGlobalBBox( nPxId, b3Grp) ;
+2
View File
@@ -870,6 +870,8 @@ Drilling::GenerateHoleCl( int nInd, const SelData& nCircId, const string& sPName
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) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPathId, KEY_ELEV, hole.dLen) ;
// foro normale
if ( m_Params.m_dStep < EPS_SMALL ||
m_Params.m_dStep > hole.dLen - EPS_SMALL) {
BIN
View File
Binary file not shown.
+2
View File
@@ -1119,6 +1119,8 @@ GenMachining::ProcessPath( int nPathId, int nPvId, int nClId)
m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ;
// assegno il punto di inizio al gruppo del percorso
m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// Imposto dati comuni
SetPathId( nPxId) ;
+7 -2
View File
@@ -346,11 +346,14 @@ Generator::ProcessClPath( int nClPathId, int nClPathInd, int nOpId, int nOpInd)
Point3d ptMin, ptMax ;
m_pGeomDB->GetInfo( nClPathId, KEY_PMIN, ptMin) ;
m_pGeomDB->GetInfo( nClPathId, KEY_PMAX, ptMax) ;
// Recupero massima elevazione
double dElev = 0 ;
m_pGeomDB->GetInfo( nClPathId, KEY_ELEV, dElev) ;
// Recupero il numero di eventi ausiliari iniziali
int nAS = 0 ;
m_pGeomDB->GetInfo( nClPathId, KEY_AS_TOT, nAS) ;
// Emetto inizio percorso di lavoro
if ( ! OnPathStart( nClPathId, nClPathInd, nAS, ptStart, vtExtr, ptMin, ptMax))
if ( ! OnPathStart( nClPathId, nClPathInd, nAS, ptStart, vtExtr, ptMin, ptMax, dElev))
return false ;
// Emissione eventuali dati ausiliari di inizio
@@ -821,7 +824,7 @@ Generator::OnMachiningEnd( void)
//----------------------------------------------------------------------------
bool
Generator::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart,
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax)
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax, double dElev)
{
// assegno identificativo e indice percorso di lavorazione
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PATHID, nClPathId) ;
@@ -834,6 +837,8 @@ Generator::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& p
// assegno punti estremi dell'ingombro del percorso di lavorazione
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PMIN, ptMin) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PMAX, ptMax) ;
// assegno la massima elevazione
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_ELEV, dElev) ;
// chiamo la funzione di inizio percorso di lavorazione
bOk = bOk && m_pMachine->LuaCallFunction( ON_PATH_START) ;
return bOk ;
+1 -1
View File
@@ -52,7 +52,7 @@ class Generator
bool OnMachiningStart( int nOpId, int nOpInd, double dSpeed) ;
bool OnMachiningEnd( void) ;
bool OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart,
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax) ;
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax, double dElev) ;
bool OnPathEnd( int nAE) ;
bool OnPathStartAux( int nInd, const std::string& sAS) ;
bool OnPathEndAux( int nInd, const std::string& sAE) ;
+2
View File
@@ -1343,6 +1343,8 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ;
// assegno il punto di inizio al gruppo del percorso
m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// Imposto dati comuni
SetPathId( nPxId) ;
+1
View File
@@ -73,6 +73,7 @@ static const std::string GVAR_START = ".START" ; // (Point3d) punto iniz
static const std::string GVAR_EXTR = ".EXTR" ; // (Vector3d)versore estrusione
static const std::string GVAR_PMIN = ".PMIN" ; // (Point3d) punto minimo di ingombro del percorso di lavorazione
static const std::string GVAR_PMAX = ".PMAX" ; // (Point3d) punto massimo di ingombro del percorso di lavorazione
static const std::string GVAR_ELEV = ".ELEV" ; // (double) massima elevazione
static const std::string GVAR_AUXTOT = ".AUXTOT" ; // (int) numero totale dati ausiliari inizio/fine percorso di lavorazione
static const std::string GVAR_AUXIND = ".AUXIND" ; // (int) indice dato ausiliario inizio/fine percorso di lavorazione
static const std::string GVAR_AUX = ".AUX" ; // (string) dato ausiliario inizio/fine percorso di lavorazione
+2
View File
@@ -1166,6 +1166,8 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId)
m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ;
// assegno il punto di inizio al gruppo del percorso
m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// Imposto dati comuni
SetPathId( nPxId) ;
+28
View File
@@ -1421,6 +1421,8 @@ Sawing::GenerateLineCl( const ICurveLine* pLine, const Vector3d& vtTool, const V
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()) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// Imposto dati comuni
SetPathId( nPxId) ;
SetToolDir( vtTool) ;
@@ -1955,6 +1957,13 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
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
Point3d ptStart ; pArc->GetStartPoint( ptStart) ;
m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// Imposto dati comuni
SetPathId( nPxId) ;
SetCorrAuxDir( vtCorr) ;
@@ -2167,6 +2176,12 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
return false ;
}
// assegno al gruppo l'ingombro del percorso di lavoro
BBox3d b3Grp ;
m_pGeomDB->GetGlobalBBox( nPxId, b3Grp) ;
m_pGeomDB->SetInfo( nPxId, KEY_PMIN, b3Grp.GetMin()) ;
m_pGeomDB->SetInfo( nPxId, KEY_PMAX, b3Grp.GetMax()) ;
return true ;
}
@@ -2603,6 +2618,13 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
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
Point3d ptStart ; pArc->GetStartPoint( ptStart) ;
m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ;
// assegno l'elevazione massima
m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ;
// Imposto dati comuni
SetPathId( nPxId) ;
// recupero distanza di sicurezza
@@ -2830,6 +2852,12 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
return false ;
}
// assegno al gruppo l'ingombro del percorso di lavoro
BBox3d b3Grp ;
m_pGeomDB->GetGlobalBBox( nPxId, b3Grp) ;
m_pGeomDB->SetInfo( nPxId, KEY_PMIN, b3Grp.GetMin()) ;
m_pGeomDB->SetInfo( nPxId, KEY_PMAX, b3Grp.GetMax()) ;
return true ;
}
+7 -2
View File
@@ -598,6 +598,9 @@ Simulator::FindAndManagePathStart( int& nStatus)
Point3d ptMin, ptMax ;
m_pGeomDB->GetInfo( m_nCLPathId, KEY_PMIN, ptMin) ;
m_pGeomDB->GetInfo( m_nCLPathId, KEY_PMAX, ptMax) ;
// recupero massima elevazione
double dElev = 0 ;
m_pGeomDB->GetInfo( m_nCLPathId, KEY_ELEV, dElev) ;
// recupero il numero di eventi ausiliari di inizio
if ( ! m_pGeomDB->GetInfo( m_nCLPathId, KEY_AS_TOT, m_nAuxSTot))
m_nAuxSTot = 0 ;
@@ -606,7 +609,7 @@ Simulator::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, vtExtr, ptMin, ptMax)) {
if ( ! OnPathStart( m_nCLPathId, m_nCLPathInd, m_nAuxSTot, ptStart, vtExtr, ptMin, ptMax, dElev)) {
nStatus = MCH_SIM_ERR ;
return false ;
}
@@ -1001,7 +1004,7 @@ Simulator::OnMachiningEnd( void)
//----------------------------------------------------------------------------
bool
Simulator::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart,
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax)
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax, double dElev)
{
// assegno identificativo e indice percorso di lavorazione
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PATHID, nClPathId) ;
@@ -1014,6 +1017,8 @@ Simulator::OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& p
// assegno punti estremi dell'ingombro del percorso di lavorazione
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PMIN, ptMin) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_PMAX, ptMax) ;
// assegno la massima elevazione
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_ELEV, dElev) ;
// verifico esistenza funzione
if ( ! m_pMachine->LuaExistsFunction( ON_SIMUL_PATH_START))
return bOk ;
+1 -1
View File
@@ -63,7 +63,7 @@ class Simulator
bool OnPathStartAux( int nInd, const std::string& sAS) ;
bool OnPathEndAux( int nInd, const std::string& sAE) ;
bool OnPathStart( int nClPathId, int nClPathInd, int nAS, const Point3d& ptStart,
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax) ;
const Vector3d& vtExtr, const Point3d& ptMin, const Point3d& ptMax, double dElev) ;
bool OnPathEnd( int nAE) ;
bool OnMoveStart( const CamData* pCamData) ;
bool OnMoveEnd( void) ;