EgtMachKernel 2.4e5 :

- aggiunti dati EMT.MOVEID e EMT.MOVEIND ai parametri passati agli script di movimento in Generazione e Stima.
This commit is contained in:
DarioS
2022-05-20 15:56:08 +02:00
parent 9bb22b11bd
commit 8a780e6fc7
3 changed files with 25 additions and 12 deletions
+20 -9
View File
@@ -447,13 +447,13 @@ Processor::ProcessClEnt( int nEntId, int nEntInd, int nClPathId, int nClPathInd,
int nMove = pCamData->GetMoveType() ;
switch ( nMove) {
case 0 : // rapido
if ( ! OnRapid( nMove, AxesEnd, pCamData->GetAxesMask(),
if ( ! OnRapid( nEntId, nEntInd, nMove, AxesEnd, pCamData->GetAxesMask(),
pCamData->GetToolDir(), pCamData->GetCorrDir(), pCamData->GetBackAuxDir(),
pCamData->GetFlag(), pCamData->GetFlag2(), pCamData->GetIndex()))
return false ;
break ;
case 1 : // linea
if ( ! OnLinear( nMove, AxesEnd,
if ( ! OnLinear( nEntId, nEntInd, nMove, AxesEnd,
pCamData->GetToolDir(), pCamData->GetCorrDir(), pCamData->GetBackAuxDir(),
pCamData->GetFeed(), pCamData->GetFlag(), pCamData->GetFlag2(), pCamData->GetIndex()))
return false ;
@@ -462,7 +462,8 @@ Processor::ProcessClEnt( int nEntId, int nEntInd, int nClPathId, int nClPathInd,
case 3 : // arco CCW
Point3d ptMid( AxesEnd[0], AxesEnd[1], AxesEnd[2]) ;
ptMid.Rotate( pCamData->GetAxesCen(), pCamData->GetAxesNormDir(), - pCamData->GetAxesAngCen() / 2) ;
if ( ! OnArc( nMove, AxesEnd, pCamData->GetAxesCen(), ptMid, pCamData->GetAxesRad(), pCamData->GetAxesAngCen(),
if ( ! OnArc( nEntId, nEntInd, nMove, AxesEnd,
pCamData->GetAxesCen(), ptMid, pCamData->GetAxesRad(), pCamData->GetAxesAngCen(),
pCamData->GetToolDir(), pCamData->GetCorrDir(), pCamData->GetBackAuxDir(),
pCamData->GetFeed(), pCamData->GetFlag(), pCamData->GetFlag2(), pCamData->GetIndex()))
return false ;
@@ -954,14 +955,17 @@ Processor::OnPathEndAux( int nInd, const string& sAE)
//----------------------------------------------------------------------------
bool
Processor::OnRapid( int nMove, const DBLVECTOR& AxesEnd, int nAxesMask,
Processor::OnRapid( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd, int nAxesMask,
const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux,
int nFlag, int nFlag2, int nIndex)
{
// cancello variabili estranee
ResetArcData() ;
// assegno Id e indice entità di movimento
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEID, nEntId) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEIND, nEntInd) ;
// assegno il tipo di movimento
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVE, nMove) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVE, nMove) ;
// assegno il valore degli assi
int nNumAxes = int( AxesEnd.size()) ;
for ( int i = 1 ; i <= MAX_AXES ; ++ i) {
@@ -991,14 +995,17 @@ Processor::OnRapid( int nMove, const DBLVECTOR& AxesEnd, int nAxesMask,
//----------------------------------------------------------------------------
bool
Processor::OnLinear( int nMove, const DBLVECTOR& AxesEnd,
Processor::OnLinear( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd,
const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux,
double dFeed, int nFlag, int nFlag2, int nIndex)
{
// cancello variabili estranee
ResetArcData() ;
// assegno Id e indice entità di movimento
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEID, nEntId) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEIND, nEntInd) ;
// assegno il tipo di movimento
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVE, nMove) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVE, nMove) ;
// assegno il valore degli assi
int nNumAxes = int( AxesEnd.size()) ;
for ( int i = 1 ; i <= MAX_AXES ; ++ i) {
@@ -1028,12 +1035,16 @@ Processor::OnLinear( int nMove, const DBLVECTOR& AxesEnd,
//----------------------------------------------------------------------------
bool
Processor::OnArc( int nMove, const DBLVECTOR& AxesEnd, const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen,
Processor::OnArc( int nEntId, int nEntInd, int nMove, const DBLVECTOR& AxesEnd,
const Point3d& ptCen, const Point3d& ptMid, double dRad, double dAngCen,
const Vector3d& vtTool, const Vector3d& vtCorr, const Vector3d& vtAux,
double dFeed, int nFlag, int nFlag2, int nIndex)
{
// assegno Id e indice entità di movimento
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEID, nEntId) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVEIND, nEntInd) ;
// assegno il tipo di movimento
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVE, nMove) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_MOVE, nMove) ;
// assegno il valore degli assi
int nNumAxes = int( AxesEnd.size()) ;
for ( int i = 1 ; i <= MAX_AXES ; ++ i) {