From 17c7be3a56a968ca2daabfb888cff1da8b2e6228 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 22 Nov 2021 11:10:03 +0100 Subject: [PATCH] =?UTF-8?q?EgtMachKernel=202.3k2=20:=20-=20nella=20gestion?= =?UTF-8?q?e=20link=20tra=20lavorazioni=20aggiunta=20possibilit=C3=A0=20di?= =?UTF-8?q?=20utilizzo=20script=20OnSpecialGetMaxZ=20che=20determina=20la?= =?UTF-8?q?=20Zmassima=20raggiungibile=20nel=20collegamento=20in=20funzion?= =?UTF-8?q?e=20delle=20posizioni=20testa=20iniziale=20e=20finale.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EgtMachKernel.rc | Bin 11782 -> 11782 bytes Operation.cpp | 375 +++++++++++++++++++++++++++++++++++------------ Operation.h | 20 ++- OutputConst.h | 267 ++++++++++++++++----------------- 4 files changed, 429 insertions(+), 233 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 73bec79e8407069b04d5e0b1153d10dc584d8d78..7828b774d707dc88880b89749d9b7176531b5c4f 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFx_^ItYwW=5mQj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHP01iS delta 97 zcmZpRX^YwLhmFy2^ItYwW=6xwj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHOf?`f diff --git a/Operation.cpp b/Operation.cpp index 646112f..20d7a26 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -1111,34 +1111,19 @@ Operation::CalcAndSetAxesBBox( void) //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- bool -Operation::GetInitialAxesValues( DBLVECTOR& vAxVal) const +Operation::GetInitialAxesValues( bool bSkipClimb, DBLVECTOR& vAxVal) const { - if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) - return false ; - // recupero gruppo per geometria di lavorazione (Cutter Location) - int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ; - if ( nClId == GDB_ID_NULL) - return false ; - // recupero il primo percorso CL - int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ; - // restituisco i valori iniziali degli assi di questo percorso di lavorazione - return GetClPathInitialAxesValues( nClPathId, vAxVal) ; + const CamData* pCamData = GetInitialCamData( bSkipClimb) ; + vAxVal = ( pCamData != nullptr ? pCamData->GetAxesVal() : DBLVECTOR()) ; + return ( vAxVal.size() > 0) ; } //---------------------------------------------------------------------------- bool -Operation::GetClPathInitialAxesValues( int nClPathId, DBLVECTOR& vAxVal) const +Operation::GetClPathInitialAxesValues( int nClPathId, bool bSkipClimb, DBLVECTOR& vAxVal) const { - if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) - return false ; - // recupero la prima entità di questo percorso - int nEntId = m_pGeomDB->GetFirstInGroup( nClPathId) ; - // recupero i dati Cam dell'entità - CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ; - if ( pCamData == nullptr) - return false ; - // assegno i valori degli assi - vAxVal = pCamData->GetAxesVal() ; + const CamData* pCamData = GetClPathInitialCamData( nClPathId, bSkipClimb) ; + vAxVal = ( pCamData != nullptr ? pCamData->GetAxesVal() : DBLVECTOR()) ; return ( vAxVal.size() > 0) ; } @@ -1146,24 +1131,115 @@ Operation::GetClPathInitialAxesValues( int nClPathId, DBLVECTOR& vAxVal) const bool Operation::GetFinalAxesValues( bool bSkipRise, DBLVECTOR& vAxVal) const { - if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) - return false ; - // recupero gruppo per geometria di lavorazione (Cutter Location) - int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ; - if ( nClId == GDB_ID_NULL) - return false ; - // recupero l'ultimo percorso CL - int nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ; - // restituisco i valori finali degli assi di questo percorso di lavorazione - return GetClPathFinalAxesValues( nClPathId, bSkipRise, vAxVal) ; + const CamData* pCamData = GetFinalCamData( bSkipRise) ; + vAxVal = ( pCamData != nullptr ? pCamData->GetAxesVal() : DBLVECTOR()) ; + return ( vAxVal.size() > 0) ; } //---------------------------------------------------------------------------- bool Operation::GetClPathFinalAxesValues( int nClPathId, bool bSkipRise, DBLVECTOR& vAxVal) const +{ + const CamData* pCamData = GetClPathFinalCamData( nClPathId, bSkipRise) ; + vAxVal = ( pCamData != nullptr ? pCamData->GetAxesVal() : DBLVECTOR()) ; + return ( vAxVal.size() > 0) ; +} + +//---------------------------------------------------------------------------- +bool +Operation::GetInitialToolDir( bool bSkipClimb, Vector3d& vtTool) const +{ + const CamData* pCamData = GetInitialCamData( bSkipClimb) ; + vtTool = ( pCamData != nullptr ? pCamData->GetToolDir() : V_NULL) ; + return ( ! vtTool.IsSmall()) ; +} + +//---------------------------------------------------------------------------- +bool +Operation::GetClPathInitialToolDir( int nClPathId, bool bSkipClimb, Vector3d& vtTool) const +{ + const CamData* pCamData = GetClPathInitialCamData( nClPathId, bSkipClimb) ; + vtTool = ( pCamData != nullptr ? pCamData->GetToolDir() : V_NULL) ; + return ( ! vtTool.IsSmall()) ; +} + +//---------------------------------------------------------------------------- +bool +Operation::GetFinalToolDir( bool bSkipRise, Vector3d& vtTool) const +{ + const CamData* pCamData = GetFinalCamData( bSkipRise) ; + vtTool = ( pCamData != nullptr ? pCamData->GetToolDir() : V_NULL) ; + return ( ! vtTool.IsSmall()) ; +} + +//---------------------------------------------------------------------------- +bool +Operation::GetClPathFinalToolDir( int nClPathId, bool bSkipRise, Vector3d& vtTool) const +{ + const CamData* pCamData = GetClPathFinalCamData( nClPathId, bSkipRise) ; + vtTool = ( pCamData != nullptr ? pCamData->GetToolDir() : V_NULL) ; + return ( ! vtTool.IsSmall()) ; +} + +//---------------------------------------------------------------------------- +const CamData* +Operation::GetInitialCamData( bool bSkipClimb) const { if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) - return false ; + return nullptr ; + // recupero gruppo per geometria di lavorazione (Cutter Location) + int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ; + if ( nClId == GDB_ID_NULL) + return nullptr ; + // recupero il primo percorso CL + int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ; + // recupero i dati Cam della prima entità del percorso + return GetClPathInitialCamData( nClPathId, bSkipClimb) ; +} + +//---------------------------------------------------------------------------- +const CamData* +Operation::GetClPathInitialCamData( int nClPathId, bool bSkipClimb) const +{ + if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) + return nullptr ; + // recupero la prima entità di questo percorso + int nEntId = m_pGeomDB->GetFirstInGroup( nClPathId) ; + // se richiesto di ignorare le entità CLIMB + if ( bSkipClimb) { + while ( nEntId != GDB_ID_NULL) { + string sName ; + if ( ! m_pGeomDB->GetName( nEntId, sName) || sName != MCH_CL_CLIMB) + break ; + nEntId = m_pGeomDB->GetNext( nEntId) ; + } + } + // recupero i dati Cam dell'entità + return GetCamData( m_pGeomDB->GetUserObj( nEntId)) ; +} + +//---------------------------------------------------------------------------- +const CamData* +Operation::GetFinalCamData( bool bSkipRise) const +{ + if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) + return nullptr ; + // recupero gruppo per geometria di lavorazione (Cutter Location) + int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ; + if ( nClId == GDB_ID_NULL) + return nullptr ; + // recupero l'ultimo percorso CL + int nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ; + // recupero i dati Cam dell'ultima entità del percorso + return GetClPathFinalCamData( nClPathId, bSkipRise) ; +} + +//---------------------------------------------------------------------------- +const CamData* +Operation::GetClPathFinalCamData( int nClPathId, bool bSkipRise) const +{ + if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) + return nullptr ; // recupero l'ultima entità di questo percorso int nEntId = m_pGeomDB->GetLastInGroup( nClPathId) ; // se richiesto di ignorare le entità RISE @@ -1176,12 +1252,7 @@ Operation::GetClPathFinalAxesValues( int nClPathId, bool bSkipRise, DBLVECTOR& v } } // recupero i dati Cam dell'entità - CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ; - if ( pCamData == nullptr) - return false ; - // assegno i valori degli assi - vAxVal = pCamData->GetAxesVal() ; - return ( vAxVal.size() > 0) ; + return GetCamData( m_pGeomDB->GetUserObj( nEntId)) ; } //---------------------------------------------------------------------------- @@ -1792,16 +1863,20 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink) if ( bVerifyPreviousLink) { // recupero se ZHome è in basso bool bZHomeDown = GetZHomeDown() ; + // recupero quota di home in Z + double dHomeZ ; + if ( ! m_pMchMgr->GetCurrAxisHomePos( 2, dHomeZ)) + return false ; // elimino eventuali CLIMB già presenti RemoveClimb( m_pGeomDB->GetFirstGroupInGroup( nClId)) ; // recupero posizione iniziale lavorazione DBLVECTOR vAxIni ; - if ( ! GetInitialAxesValues( vAxIni)) + if ( ! GetInitialAxesValues( false, vAxIni)) return false ; // se necessaria, aggiungo risalita parziale double dDeltaZ = ( vAxIni[2] - vAxVal[2]) ; - if ( ( ! bZHomeDown && dDeltaZ > 100 * EPS_SMALL) || - ( bZHomeDown && dDeltaZ < -100 * EPS_SMALL)) { + if ( ( ! bZHomeDown && dDeltaZ > 100 * EPS_SMALL && vAxIni[2] <= dHomeZ) || + ( bZHomeDown && dDeltaZ < -100 * EPS_SMALL && vAxIni[2] >= dHomeZ)) { if ( ! pPrevOp->AddRise( vAxVal, dDeltaZ, GDB_ID_NULL, bZHomeDown)) return false ; // aggiorno quota in Z della posizione iniziale ( anche se verrà aggiornata solo in seguito) @@ -1809,51 +1884,49 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink) } // Verifico non ci sia collisione a HomeZ bool bToZmax = false ; - double dHomeZ ; - if ( m_pMchMgr->GetCurrAxisHomePos( 2, dHomeZ)) { - DBLVECTOR vAxVal2 = vAxVal ; vAxVal2[2] = dHomeZ ; - DBLVECTOR vAxIni2 = vAxIni ; vAxIni2[2] = dHomeZ ; - if ( ! TestCollisionAvoid( vAxVal2, vAxIni2)) { - // se ammessa risalita aggiuntiva - double dExtraZ, dMaxAngV ; - if ( GetExtraZ( dHomeZ, dExtraZ, dMaxAngV)) { - if ( vAxVal2.size() < 5 || ( abs( vAxVal2[4]) < dMaxAngV && abs( vAxIni2[4]) < dMaxAngV)) { - double dMyHomeZ = dHomeZ + dExtraZ ; - vAxVal2[2] = dMyHomeZ ; - vAxIni2[2] = dMyHomeZ ; - if ( TestCollisionAvoid( vAxVal2, vAxIni2)) - dHomeZ = dMyHomeZ ; - else - bToZmax = true ; - } + DBLVECTOR vAxVal2 = vAxVal ; vAxVal2[2] = dHomeZ ; + DBLVECTOR vAxIni2 = vAxIni ; vAxIni2[2] = dHomeZ ; + if ( ! TestCollisionAvoid( vAxVal2, vAxIni2)) { + // se ammessa risalita aggiuntiva + Vector3d vtTprev ; pPrevOp->GetFinalToolDir( false, vtTprev) ; + Vector3d vtTcurr ; GetInitialToolDir( false, vtTcurr) ; + double dExtraZ ; + if ( GetExtraZ( vAxVal2, vtTprev, vAxIni2, vtTcurr, dHomeZ, dExtraZ)) { + if ( abs( dExtraZ) > EPS_SMALL) { + double dMyHomeZ = dHomeZ + dExtraZ ; + vAxVal2[2] = dMyHomeZ ; + vAxIni2[2] = dMyHomeZ ; + if ( TestCollisionAvoid( vAxVal2, vAxIni2)) + dHomeZ = dMyHomeZ ; else bToZmax = true ; } - // se altrimenti ammessa rotazione a Zmax e richiesta rotazione - else if ( GetRotationAtZmax() && - (( vAxVal2.size() >= 4 && abs( vAxVal2[3] - vAxIni2[3]) > 5) || - ( vAxVal2.size() >= 5 && abs( vAxVal2[4] - vAxIni2[4]) > 5))) { - // verifico se va bene rotazione assi iniziale e poi movimento - DBLVECTOR vAxMid2 = vAxVal2 ; - vAxMid2[3] = vAxIni2[3] ; - if ( vAxVal2.size() >= 5) - vAxMid2[4] = vAxIni2[4] ; - if ( TestCollisionAvoid( vAxVal2, vAxMid2) && - TestCollisionAvoid( vAxMid2, vAxIni2) && - pPrevOp->AddRise( vAxVal2) && - pPrevOp->AddSpecialRise( vAxMid2, true, GDB_ID_NULL, 5)) { - vAxVal = vAxMid2 ; - bMaxZ = true ; - } - else - return false ; + else + bToZmax = true ; + } + // se altrimenti ammessa rotazione a Zmax e richiesta rotazione + else if ( GetRotationAtZmax() && + (( vAxVal2.size() >= 4 && abs( vAxVal2[3] - vAxIni2[3]) > 5) || + ( vAxVal2.size() >= 5 && abs( vAxVal2[4] - vAxIni2[4]) > 5))) { + // verifico se va bene rotazione assi iniziale e poi movimento + DBLVECTOR vAxMid2 = vAxVal2 ; + vAxMid2[3] = vAxIni2[3] ; + if ( vAxVal2.size() >= 5) + vAxMid2[4] = vAxIni2[4] ; + if ( TestCollisionAvoid( vAxVal2, vAxMid2) && + TestCollisionAvoid( vAxMid2, vAxIni2) && + pPrevOp->AddRise( vAxVal2) && + pPrevOp->AddSpecialRise( vAxMid2, true, GDB_ID_NULL, 5)) { + vAxVal = vAxMid2 ; + bMaxZ = true ; } else return false ; } + // altrimenti impossibile + else + return false ; } - else - return false ; // Se già a Zmax if ( bMaxZ) { // non devo fare alcunché @@ -1921,7 +1994,8 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink) // recupero le nuove quote finali (per calcolare il corretto delta) pPrevOp->GetFinalAxesValues( false, vAxVal) ; // aggiungo risalita a Zsafe - if ( ! pPrevOp->AddRise( vAxVal, dSafeZ - vAxVal[2], GDB_ID_NULL, bZHomeDown)) + double dDelta = ( ! bZHomeDown ? max( dSafeZ - vAxVal[2], 0.) : min( dSafeZ - vAxVal[2], 0.)) ; + if ( ! pPrevOp->AddRise( vAxVal, dDelta, GDB_ID_NULL, bZHomeDown)) return false ; // aggiorno quota iniziale in Z vAxIni[2] = dSafeZ ; @@ -2042,6 +2116,16 @@ Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation* double dHomeZ ; if ( ! m_pMchMgr->GetCurrAxisHomePos( 2, dHomeZ)) return false ; + // aggiungo eventuale ExtraZ + const CamData* pCamDataPrev = GetClPathFinalCamData( nPrevClPathId, true) ; + const DBLVECTOR& vAxPrev = ( pCamDataPrev != nullptr ? pCamDataPrev->GetAxesVal() : DBLVECTOR()) ; + const Vector3d& vtTprev = ( pCamDataPrev != nullptr ? pCamDataPrev->GetToolDir() : V_NULL) ; + const Vector3d& vtTcurr = pCamData->GetToolDir() ; + double dExtraZ ; + if ( GetExtraZ( vAxPrev, vtTprev, vAxCurr, vtTcurr, dHomeZ, dExtraZ)) { + if ( abs( dExtraZ) > EPS_SMALL) + dHomeZ += dExtraZ ; + } // modifico quella originale (è la prima del percorso) m_pGeomDB->SetName( nEntId, MCH_CL_CLIMB) ; DBLVECTOR vAxNew = vAxCurr ; @@ -2115,14 +2199,15 @@ Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation* } // risalita sopra fine percorso precedente DBLVECTOR vAxNew1 ; + double dDelta = ( ! bZHomeDown ? max( dSafeZ - vAxPrev[2], 0.) : min( dSafeZ - vAxPrev[2], 0.)) ; if ( nPrevClPathId == GDB_ID_NULL) { if ( pPrevOp == nullptr || ! pPrevOp->RemoveRise() || - ! pPrevOp->AddRise( vAxNew1, dSafeZ - vAxPrev[2], GDB_ID_NULL, bZHomeDown)) + ! pPrevOp->AddRise( vAxNew1, dDelta, GDB_ID_NULL, bZHomeDown)) return false ; } else { - if ( ! AddRise( vAxNew1, dSafeZ - vAxPrev[2], nPrevClPathId, bZHomeDown)) + if ( ! AddRise( vAxNew1, dDelta, nPrevClPathId, bZHomeDown)) return false ; } // aggiungo posizione elevata prima dell'inizio del percorso corrente @@ -2167,7 +2252,8 @@ Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation* return true ; // aggiungo risalita alla fine del precedente percorso DBLVECTOR vAxNew ; - if ( ! AddRise( vAxNew, vAxCurr[2] - vAxPrev[2], nPrevClPathId, bZHomeDown)) + double dDelta = ( ! bZHomeDown ? max( vAxCurr[2] - vAxPrev[2], 0.) : min( vAxCurr[2] - vAxPrev[2], 0.)) ; + if ( ! AddRise( vAxNew, dDelta, nPrevClPathId, bZHomeDown)) return false ; } // altrimenti Z corrente minore della precedente @@ -2570,24 +2656,56 @@ Operation::CalcDeltaZForHeadRotation( const DBLVECTOR& vAxStart, const DBLVECTOR //---------------------------------------------------------------------------- bool -Operation::GetExtraZ( double dSafeZ, double& dExtraZ, double& dMaxAngV) const +Operation::GetExtraZ( const DBLVECTOR& vAx1, const Vector3d& vtTool1, + const DBLVECTOR& vAx2, const Vector3d& vtTool2, + double dSafeZ, double& dExtraZ) const { // Recupero macchina corrente Machine* pMch = ( m_pMchMgr != nullptr ? m_pMchMgr->GetCurrMachine() : nullptr) ; if ( pMch == nullptr) - return 0 ; - // Se testa con Info ZEXTRA la recupero e la limito alla corsa dell'asse + return false ; + + // Flag per posizione sicura in alto o in basso int nHeadId = pMch->GetCurrHead() ; + bool bZHomeDown ; + if ( ! m_pGeomDB->GetInfo( nHeadId, MCH_ZHOMEDOWN, bZHomeDown)) + bZHomeDown = false ; + + // Estremi dell'asse Z (asse 3, quindi indice 2) + double dAxZmax ; pMch->GetCurrAxisMax( 2, dAxZmax) ; + double dAxZmin ; pMch->GetCurrAxisMin( 2, dAxZmin) ; + + // Se definito e correttamente eseguito script SpecialGetMaxZ + double dMaxZ ; + if ( SpecialGetMaxZ( vAx1, vtTool1, vAx2, vtTool2, dMaxZ)) { + // se caso standard + if ( ! bZHomeDown) { + dExtraZ = min( dMaxZ, dAxZmax) - dSafeZ ; + return ( dExtraZ > EPS_SMALL) ; + } + // altrimenti caso con posizione sicura in basso (teste da sotto) + else { + dExtraZ = max( dMaxZ, dAxZmin) - dSafeZ ; + return ( dExtraZ < EPS_SMALL) ; + } + } + + // Altrimenti verifico se testa ha Info ZEXTRA DBLVECTOR vdVal ; - if ( m_pGeomDB->GetInfo( nHeadId, MCH_ZEXTRA, vdVal) && vdVal.size() >= 1 && vdVal[0] > EPS_SMALL) { - // angolo limite per applicare questo allontanamento extra - dMaxAngV = 30 ; - if ( vdVal.size() >= 2) - dMaxAngV = vdVal[1] ; - // flag per posizione sicura in alto o in basso - bool bZHomeDown ; - if ( ! m_pGeomDB->GetInfo( nHeadId, MCH_ZHOMEDOWN, bZHomeDown)) - bZHomeDown = false ; + if ( ! m_pGeomDB->GetInfo( nHeadId, MCH_ZEXTRA, vdVal) || vdVal.empty() || vdVal[0] < EPS_SMALL) + return false ; + // angolo verticale limite per applicare questo allontanamento extra + double dMaxAngV = 30 ; + if ( vdVal.size() >= 2) + dMaxAngV = vdVal[1] ; + // angolo verticale + double dAngV = 0 ; + if ( vAx1.size() >= 5 && vAx2.size() >= 5) + dAngV = max( abs( vAx1[4]), abs( vAx2[4])) ; + else if ( vAx2.size() >= 5) + dAngV = abs( vAx2[4]) ; + // verifica angolo verticale + if ( dAngV < dMaxAngV) { // se caso standard if ( ! bZHomeDown) { double dZmax ; @@ -2603,7 +2721,70 @@ Operation::GetExtraZ( double dSafeZ, double& dExtraZ, double& dMaxAngV) const return ( dExtraZ < EPS_SMALL) ; } } - return false ; + // Lascio provare a Zmax + dExtraZ = 0 ; + return true ; +} + +//---------------------------------------------------------------------------- +bool +Operation::SpecialGetMaxZ( const DBLVECTOR& vAx1, const Vector3d& vtTool1, + const DBLVECTOR& vAx2, const Vector3d& vtTool2, + double& dMaxZ) const +{ + // recupero la macchina corrente + Machine* pMch = ( m_pMchMgr != nullptr ? m_pMchMgr->GetCurrMachine() : nullptr) ; + if ( pMch == nullptr) + return false ; + + // verifico numero assi + int nNumAx1 = int( vAx1.size()) ; + int nNumAx2 = int( vAx2.size()) ; + if ( nNumAx1 != nNumAx2 && nNumAx1 != 0 && ! vtTool1.IsSmall()) + return false ; + + // costanti + static const string EMC_VAR = "EMC" ; // tabella variabili locali per calcolo + static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok) + static const string EVAR_MAXZ = ".MAXZ" ; // OUT (double) valore Zmax + static const string ON_SPECIAL_GETMAXZ = "OnSpecialGetMaxZ" ; + + // verifico definizione funzione + if ( ! pMch->LuaExistsFunction( ON_SPECIAL_GETMAXZ)) + return false ; + + // avvio + bool bOk = true ; + int nErr = 99 ; + // imposto valori parametri + bOk = bOk && pMch->LuaCreateGlobTable( EMC_VAR) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_TOOL, GetToolName()) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_HEAD, GetHeadName()) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_EXIT, GetExitNbr()) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_TCPOS, GetToolTcPos()) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_MCHID, GetOwner()) ; + // valori degli assi + for ( int i = 1 ; i <= nNumAx1 ; ++ i) + bOk = bOk && pMch->LuaSetGlobVar( GetGlobVarAxisPrev( i, EMC_VAR), vAx1[i-1]) ; + for ( int i = 1 ; i <= nNumAx2 ; ++ i) + bOk = bOk && pMch->LuaSetGlobVar( GetGlobVarAxisValue( i, EMC_VAR), vAx2[i-1]) ; + // direzioni utensile + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_TDIRP, vtTool1) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + GVAR_TDIR, vtTool2) ; + // eseguo + bOk = bOk && pMch->LuaCallFunction( ON_SPECIAL_GETMAXZ, false) ; + // recupero valori parametri obbligatori + bOk = bOk && pMch->LuaGetGlobVar( EMC_VAR + EVAR_ERROR, nErr) ; + bOk = bOk && pMch->LuaGetGlobVar( EMC_VAR + EVAR_MAXZ, dMaxZ) ; + // reset + bOk = bOk && pMch->LuaResetGlobVar( EMC_VAR) ; + // segnalo errori + if ( nErr != 0) { + bOk = false ; + string sOut = " Error in " + ON_SPECIAL_GETMAXZ + " (" + ToString( nErr) + ")" ; + LOG_ERROR( GetEMkLogger(), sOut.c_str()) + } + return bOk ; } //---------------------------------------------------------------------------- @@ -2613,7 +2794,7 @@ Operation::GetRotationAtZmax( void) const // Recupero macchina corrente Machine* pMch = ( m_pMchMgr != nullptr ? m_pMchMgr->GetCurrMachine() : nullptr) ; if ( pMch == nullptr) - return 0 ; + return false ; // Se testa con Info ROTATZMAX la recupero e restituisco abilitazione rotazione a Zmax int nHeadId = pMch->GetCurrHead() ; int nVal = 0 ; diff --git a/Operation.h b/Operation.h index 3a65767..99d3b3a 100644 --- a/Operation.h +++ b/Operation.h @@ -93,10 +93,18 @@ class Operation : public IUserObj bool CalcAndSetBBox( int nClId) ; bool CalcAndSetAxesBBox( void) ; - bool GetInitialAxesValues( DBLVECTOR& vAxVal) const ; - bool GetClPathInitialAxesValues( int nClPathId, DBLVECTOR& vAxVal) const ; + bool GetInitialAxesValues( bool bSkipClimb, DBLVECTOR& vAxVal) const ; + bool GetClPathInitialAxesValues( int nClPathId, bool bSkipClimb, DBLVECTOR& vAxVal) const ; bool GetFinalAxesValues( bool bSkipRise, DBLVECTOR& vAxVal) const ; bool GetClPathFinalAxesValues( int nClPathId, bool bSkipRise, DBLVECTOR& vAxVal) const ; + bool GetInitialToolDir( bool bSkipClimb, Vector3d& vtTool) const ; + bool GetClPathInitialToolDir( int nClPathId, bool bSkipClimb, Vector3d& vtTool) const ; + bool GetFinalToolDir( bool bSkipRise, Vector3d& vtTool) const ; + bool GetClPathFinalToolDir( int nClPathId, bool bSkipRise, Vector3d& vtTool) const ; + const CamData* GetInitialCamData( bool bSkipClimb) const ; + const CamData* GetClPathInitialCamData( int nClPathId, bool bSkipClimb) const ; + const CamData* GetFinalCamData( bool bSkipRise) const ; + const CamData* GetClPathFinalCamData( int nClPathId, bool bSkipRise) const ; std::string ExtractInfo( const std::string& sNotes, const std::string& sKey) const ; std::string ExtractHint( const std::string& sNotes) const ; bool SetBlockedRotAxis( const std::string& sBlockedAxis) const ; @@ -112,7 +120,13 @@ class Operation : public IUserObj bool RemoveRise( int nClPathId = GDB_ID_NULL) ; bool AddHome( void) ; bool CalcDeltaZForHeadRotation( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, double& dDeltaZ) const ; - bool GetExtraZ( double dSafeZ, double& dExtraZ, double& dMaxAngV) const ; + bool GetExtraZ( const DBLVECTOR& vAx1, const Vector3d& vtTool1, + const DBLVECTOR& vAx2, const Vector3d& vtTool2, + double dSafeZ, double& dExtraZ) const ; + bool SpecialGetMaxZ( const DBLVECTOR& vAx1, const Vector3d& vtTool1, + const DBLVECTOR& vAx2, const Vector3d& vtTool2, + double& dMaxZ) const ; + bool SpecialGetMaxZ( DBLVECTOR& vAx1, Vector3d& vtTool1, DBLVECTOR& vAx2, Vector3d& vtTool2, int& dMaxZ) ; bool GetRotationAtZmax( void) const ; bool ForcedZmax( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd) const ; int GetUserNotesZmax( void) const ; diff --git a/OutputConst.h b/OutputConst.h index 5349d04..59d18fe 100644 --- a/OutputConst.h +++ b/OutputConst.h @@ -20,143 +20,144 @@ static const int MAX_AXES = 7 ; // Variabili static const std::string GLOB_VAR = "EMT" ; // tavola variabili globali -static const std::string GVAR_VER = ".VER" ; // (string) versione della Dll -static const std::string GVAR_ERR = ".ERR" ; // (int) codice di errore (0=ok) -static const std::string GVAR_USETO1 = ".USETO1" ; // (bool) flag per utilizzo origine tavola -static const std::string GVAR_MODAL = ".MODAL" ; // (bool) flag per emissione modale dei valori -static const std::string GVAR_INCHES = ".INCHES" ; // (bool) flag unità di misura (true=inches, false=mm) -static const std::string GVAR_SPLITARCS = ".SPLITARCS" ; // (int) flag spezzatura archi (0=mai, 1=piani generici, 2=piani diversi da XY, 3=sempre) -static const std::string GVAR_NUM = ".NUM" ; // (bool) flag numerazione -static const std::string GVAR_NUMTOK = ".Nt" ; // (string) token per numerazione -static const std::string GVAR_LINENBR = ".LINENBR" ; // (int) numero progressivo di linea -static const std::string GVAR_LINEINC = ".LINEINC" ; // (int) incremento per numero di linea -static const std::string GVAR_F = ".F" ; // (num) valore della feed -static const std::string GVAR_FT = ".Ft" ; // (string) token per feed -static const std::string GVAR_S = ".S" ; // (num) valore della speed -static const std::string GVAR_ST = ".St" ; // (string) token per speed -static const std::string GVAR_MACHNAME = ".MACHNAME" ; // (string) nome macchina -static const std::string GVAR_FILE = ".FILE" ; // (string) path file di output -static const std::string GVAR_INFO = ".INFO" ; // (string) informazioni iniziali -static const std::string GVAR_SETUP = ".SETUP" ; // (bool) flag definizione setup -static const std::string GVAR_DISPID = ".DISPID" ; // (int) identificativo disposizione -static const std::string GVAR_DISPIND = ".DISPIND" ; // (int) indice disposizione -static const std::string GVAR_PHASE = ".PHASE" ; // (int) indice fase -static const std::string GVAR_EMPTY = ".EMPTY" ; // (bool) flag disposizione passiva -static const std::string GVAR_SBH = ".SBH" ; // (bool) flag disposizione con operazioni manuali -static const std::string GVAR_TABNAME = ".TABNAME" ; // (string) nome tavola -static const std::string GVAR_TABORI1 = ".TABORI1" ; // (Point3d) prima origine di tavola -static const std::string GVAR_FIXID = ".FIXID" ; // (int) identificativo bloccaggio (fixture) -static const std::string GVAR_FIXIND = ".FIXIND" ; // (int) indice bloccaggio -static const std::string GVAR_FIXNAME = ".FIXNAME" ; // (string) nome bloccaggio -static const std::string GVAR_FIXPOS = ".FIXPOS" ; // (Point3d) posizione bloccaggio -static const std::string GVAR_FIXANG = ".FIXANG" ; // (num) angolo di rotazione bloccaggio -static const std::string GVAR_FIXMOB = ".FIXMOB" ; // (num) movimento eventuale parte mobile del bloccaggio -static const std::string GVAR_RAWID = ".RAWID" ; // (int) identificativo grezzo -static const std::string GVAR_RAWIND = ".RAWIND" ; // (int) indice movimento del grezzo -static const std::string GVAR_RAWTYPE = ".RAWTYPE" ; // (int) tipo di movimento del grezzo -static const std::string GVAR_RAWPOS = ".RAWPOS" ; // (Point3d) posizione di movimento del grezzo -static const std::string GVAR_RAWFLAG = ".RAWFLAG" ; // (int) flag per movimento del grezzo -static const std::string GVAR_TOOL = ".TOOL" ; // (string) nome utensile -static const std::string GVAR_HEAD = ".HEAD" ; // (string) nome testa -static const std::string GVAR_EXIT = ".EXIT" ; // (int) indice uscita -static const std::string GVAR_TCPOS = ".TCPOS" ; // (string) eventuale posizione utensile nel TC -static const std::string GVAR_TCOMP = ".TCOMP" ; // (int) numero correttore utensile -static const std::string GVAR_TDIAM = ".TDIAM" ; // (num) diametro utensile -static const std::string GVAR_TTOTDIAM = ".TTOTDIAM" ; // (num) diametro totale utensile -static const std::string GVAR_TLEN = ".TLEN" ; // (num) lunghezza utensile -static const std::string GVAR_TTOTLEN = ".TTOTLEN" ; // (num) lunghezza totale utensile -static const std::string GVAR_TUSED = ".TUSED" ; // (bool) flag per indicare che l'utensile attrezzato è anche utilizzato -static const std::string GVAR_SMAX = ".SMAX" ; // (num) massima speed utensile -static const std::string GVAR_FIRST = ".FIRST" ; // (bool) flag per primo utensile -static const std::string GVAR_NEXTTOOL = ".NEXTTOOL" ; // (string) nome del prossimo utensile -static const std::string GVAR_NEXTHEAD = ".NEXTHEAD" ; // (string) nome testa del prossimo utensile -static const std::string GVAR_NEXTEXIT = ".NEXTEXIT" ; // (int) indice uscita su testa del prox utensile -static const std::string GVAR_NEXTTCPOS = ".NEXTTCPOS" ; // (string) eventuale posizione del prox utensile nel TC -static const std::string GVAR_MCHID = ".MCHID" ; // (int) identificativo lavorazione -static const std::string GVAR_MCHIND = ".MCHIND" ; // (int) indice lavorazione -static const std::string GVAR_MMIN = ".MMIN" ; // (Point3d) punto minimo di ingombro della lavorazione -static const std::string GVAR_MMAX = ".MMAX" ; // (Point3d) punto massimo di ingombro della lavorazione +static const std::string GVAR_VER = ".VER" ; // (string) versione della Dll +static const std::string GVAR_ERR = ".ERR" ; // (int) codice di errore (0=ok) +static const std::string GVAR_USETO1 = ".USETO1" ; // (bool) flag per utilizzo origine tavola +static const std::string GVAR_MODAL = ".MODAL" ; // (bool) flag per emissione modale dei valori +static const std::string GVAR_INCHES = ".INCHES" ; // (bool) flag unità di misura (true=inches, false=mm) +static const std::string GVAR_SPLITARCS = ".SPLITARCS" ; // (int) flag spezzatura archi (0=mai, 1=piani generici, 2=piani diversi da XY, 3=sempre) +static const std::string GVAR_NUM = ".NUM" ; // (bool) flag numerazione +static const std::string GVAR_NUMTOK = ".Nt" ; // (string) token per numerazione +static const std::string GVAR_LINENBR = ".LINENBR" ; // (int) numero progressivo di linea +static const std::string GVAR_LINEINC = ".LINEINC" ; // (int) incremento per numero di linea +static const std::string GVAR_F = ".F" ; // (num) valore della feed +static const std::string GVAR_FT = ".Ft" ; // (string) token per feed +static const std::string GVAR_S = ".S" ; // (num) valore della speed +static const std::string GVAR_ST = ".St" ; // (string) token per speed +static const std::string GVAR_MACHNAME = ".MACHNAME" ; // (string) nome macchina +static const std::string GVAR_FILE = ".FILE" ; // (string) path file di output +static const std::string GVAR_INFO = ".INFO" ; // (string) informazioni iniziali +static const std::string GVAR_SETUP = ".SETUP" ; // (bool) flag definizione setup +static const std::string GVAR_DISPID = ".DISPID" ; // (int) identificativo disposizione +static const std::string GVAR_DISPIND = ".DISPIND" ; // (int) indice disposizione +static const std::string GVAR_PHASE = ".PHASE" ; // (int) indice fase +static const std::string GVAR_EMPTY = ".EMPTY" ; // (bool) flag disposizione passiva +static const std::string GVAR_SBH = ".SBH" ; // (bool) flag disposizione con operazioni manuali +static const std::string GVAR_TABNAME = ".TABNAME" ; // (string) nome tavola +static const std::string GVAR_TABORI1 = ".TABORI1" ; // (Point3d) prima origine di tavola +static const std::string GVAR_FIXID = ".FIXID" ; // (int) identificativo bloccaggio (fixture) +static const std::string GVAR_FIXIND = ".FIXIND" ; // (int) indice bloccaggio +static const std::string GVAR_FIXNAME = ".FIXNAME" ; // (string) nome bloccaggio +static const std::string GVAR_FIXPOS = ".FIXPOS" ; // (Point3d) posizione bloccaggio +static const std::string GVAR_FIXANG = ".FIXANG" ; // (num) angolo di rotazione bloccaggio +static const std::string GVAR_FIXMOB = ".FIXMOB" ; // (num) movimento eventuale parte mobile del bloccaggio +static const std::string GVAR_RAWID = ".RAWID" ; // (int) identificativo grezzo +static const std::string GVAR_RAWIND = ".RAWIND" ; // (int) indice movimento del grezzo +static const std::string GVAR_RAWTYPE = ".RAWTYPE" ; // (int) tipo di movimento del grezzo +static const std::string GVAR_RAWPOS = ".RAWPOS" ; // (Point3d) posizione di movimento del grezzo +static const std::string GVAR_RAWFLAG = ".RAWFLAG" ; // (int) flag per movimento del grezzo +static const std::string GVAR_TOOL = ".TOOL" ; // (string) nome utensile +static const std::string GVAR_HEAD = ".HEAD" ; // (string) nome testa +static const std::string GVAR_EXIT = ".EXIT" ; // (int) indice uscita +static const std::string GVAR_TCPOS = ".TCPOS" ; // (string) eventuale posizione utensile nel TC +static const std::string GVAR_TCOMP = ".TCOMP" ; // (int) numero correttore utensile +static const std::string GVAR_TDIAM = ".TDIAM" ; // (num) diametro utensile +static const std::string GVAR_TTOTDIAM = ".TTOTDIAM" ; // (num) diametro totale utensile +static const std::string GVAR_TLEN = ".TLEN" ; // (num) lunghezza utensile +static const std::string GVAR_TTOTLEN = ".TTOTLEN" ; // (num) lunghezza totale utensile +static const std::string GVAR_TUSED = ".TUSED" ; // (bool) flag per indicare che l'utensile attrezzato è anche utilizzato +static const std::string GVAR_SMAX = ".SMAX" ; // (num) massima speed utensile +static const std::string GVAR_FIRST = ".FIRST" ; // (bool) flag per primo utensile +static const std::string GVAR_NEXTTOOL = ".NEXTTOOL" ; // (string) nome del prossimo utensile +static const std::string GVAR_NEXTHEAD = ".NEXTHEAD" ; // (string) nome testa del prossimo utensile +static const std::string GVAR_NEXTEXIT = ".NEXTEXIT" ; // (int) indice uscita su testa del prox utensile +static const std::string GVAR_NEXTTCPOS = ".NEXTTCPOS" ; // (string) eventuale posizione del prox utensile nel TC +static const std::string GVAR_MCHID = ".MCHID" ; // (int) identificativo lavorazione +static const std::string GVAR_MCHIND = ".MCHIND" ; // (int) indice lavorazione +static const std::string GVAR_MMIN = ".MMIN" ; // (Point3d) punto minimo di ingombro della lavorazione +static const std::string GVAR_MMAX = ".MMAX" ; // (Point3d) punto massimo di ingombro della lavorazione static const std::string GVAR_MAXMIN = ".MAXMIN" ; // (double/s) minimo di ingombro degli assi della lavorazione static const std::string GVAR_MAXMAX = ".MAXMAX" ; // (double/s) massimo di ingombro degli assi della lavorazione -static const std::string GVAR_PATHID = ".PATHID" ; // (int) identificativo percorso di lavorazione -static const std::string GVAR_PATHIND = ".PATHIND" ; // (int) indice percorso di lavorazione -static const std::string GVAR_START = ".START" ; // (Point3d) punto iniziale del percorso originale -static const std::string GVAR_END = ".END" ; // (Point3d) punto finale del percorso originale -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_PATHID = ".PATHID" ; // (int) identificativo percorso di lavorazione +static const std::string GVAR_PATHIND = ".PATHIND" ; // (int) indice percorso di lavorazione +static const std::string GVAR_START = ".START" ; // (Point3d) punto iniziale del percorso originale +static const std::string GVAR_END = ".END" ; // (Point3d) punto finale del percorso originale +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_PAXMIN = ".PAXMIN" ; // (double/s) minimo di ingombro degli assi del percorso di lavorazione static const std::string GVAR_PAXMAX = ".PAXMAX" ; // (double/s) massimo di ingombro degli assi 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 -static const std::string GVAR_MOVEID = ".MOVEID" ; // (int) identificativo movimento -static const std::string GVAR_MOVEIND = ".MOVEIND" ; // (int) indice movimento -static const std::string GVAR_MOVE = ".MOVE" ; // (int) tipo di movimento (0,1,2,3) -static const std::string GVAR_L1 = ".L1" ; // (num) valore del primo asse lineare -static const std::string GVAR_L2 = ".L2" ; // (num) valore del secondo asse lineare -static const std::string GVAR_L3 = ".L3" ; // (num) valore del terzo asse lineare -static const std::string GVAR_R1 = ".R1" ; // (num) valore del primo asse rotante -static const std::string GVAR_R2 = ".R2" ; // (num) valore del secondo asse rotante -static const std::string GVAR_R3 = ".R3" ; // (num) valore del terzo asse rotante -static const std::string GVAR_R4 = ".R4" ; // (num) valore del quarto asse rotante -static const std::string GVAR_C1 = ".C1" ; // (num) valore del primo asse lineare per centro arco -static const std::string GVAR_C2 = ".C2" ; // (num) valore del secondo asse lineare per centro arco -static const std::string GVAR_C3 = ".C3" ; // (num) valore del terzo asse lineare per centro arco -static const std::string GVAR_M1 = ".M1" ; // (num) valore del primo asse lineare per punto medio arco -static const std::string GVAR_M2 = ".M2" ; // (num) valore del secondo asse lineare per punto medio arco -static const std::string GVAR_M3 = ".M3" ; // (num) valore del terzo asse lineare per punto medio arco -static const std::string GVAR_RR = ".RR" ; // (num) valore raggio per arco -static const std::string GVAR_AC = ".AC" ; // (num) valore angolo al centro per arco -static const std::string GVAR_L1P = ".L1p" ; // (num) valore precedente del primo asse lineare -static const std::string GVAR_L2P = ".L2p" ; // (num) valore precedente del secondo asse lineare -static const std::string GVAR_L3P = ".L3p" ; // (num) valore precedente del terzo asse lineare -static const std::string GVAR_R1P = ".R1p" ; // (num) valore precedente del primo asse rotante -static const std::string GVAR_R2P = ".R2p" ; // (num) valore precedente del secondo asse rotante -static const std::string GVAR_R3P = ".R3p" ; // (num) valore precedente del terzo asse rotante -static const std::string GVAR_R4P = ".R4p" ; // (num) valore precedente del quarto asse rotante -static const std::string GVAR_L1T = ".L1t" ; // (string) token del primo asse lineare -static const std::string GVAR_L2T = ".L2t" ; // (string) token del secondo asse lineare -static const std::string GVAR_L3T = ".L3t" ; // (string) token del terzo asse lineare -static const std::string GVAR_R1T = ".R1t" ; // (string) token del primo asse rotante -static const std::string GVAR_R2T = ".R2t" ; // (string) token del secondo asse rotante -static const std::string GVAR_R3T = ".R3t" ; // (string) token del terzo asse rotante -static const std::string GVAR_R4T = ".R4t" ; // (string) token del quarto asse rotante -static const std::string GVAR_C1T = ".C1t" ; // (string) token del primo asse lineare per centro arco -static const std::string GVAR_C2T = ".C2t" ; // (string) token del secondo asse lineare per centro arco -static const std::string GVAR_C3T = ".C3t" ; // (string) token del terzo asse lineare per centro arco -static const std::string GVAR_M1T = ".M1t" ; // (string) token del primo asse lineare per punto medio arco -static const std::string GVAR_M2T = ".M2t" ; // (string) token del secondo asse lineare per punto medio arco -static const std::string GVAR_M3T = ".M3t" ; // (string) token del terzo asse lineare per punto medio arco -static const std::string GVAR_RRT = ".RRt" ; // (string) token del raggio per arco -static const std::string GVAR_L1N = ".L1n" ; // (string) nome del primo asse lineare -static const std::string GVAR_L2N = ".L2n" ; // (string) nome del secondo asse lineare -static const std::string GVAR_L3N = ".L3n" ; // (string) nome del terzo asse lineare -static const std::string GVAR_R1N = ".R1n" ; // (string) nome del primo asse rotante -static const std::string GVAR_R2N = ".R2n" ; // (string) nome del secondo asse rotante -static const std::string GVAR_R3N = ".R3n" ; // (string) nome del terzo asse rotante -static const std::string GVAR_R4N = ".R4n" ; // (string) nome del quarto asse rotante -static const std::string GVAR_MASK = ".MASK" ; // (int) mask associato ai movimenti in rapido -static const std::string GVAR_FLAG = ".FLAG" ; // (int) flag associato ad ogni movimento -static const std::string GVAR_FLAG2 = ".FLAG2" ; // (int) secondo flag associato ad ogni movimento -static const std::string GVAR_INDEX = ".IDX" ; // (int) indice associato ad ogni movimento -static const std::string GVAR_TDIR = ".TDIR" ; // (Vector3d)versore utensile nel riferimento pezzo -static const std::string GVAR_CDIR = ".CDIR" ; // (Vector3d)versore correzione nel riferimento pezzo -static const std::string GVAR_ADIR = ".ADIR" ; // (Vector3d)versore ausiliario nel riferimento pezzo -static const std::string GVAR_ENABAXES = ".EnabAxes" ; // (bool) flag abilitazione assi attivi per simulazione -static const std::string GVAR_SHOWAXES = ".ShowAxes" ; // (bool) flag visualizzazione assi attivi per simulazione -static const std::string GVAR_AUXAXES = ".AuxAxes" ; // (int) numero assi ausiliari per simulazione -static const std::string GVAR_AN = ".AN" ; // (num) valore del N-esimo asse ausiliario per simulazione -static const std::string GVAR_ANN = ".ANn" ; // (string) nome del N-esimo asse ausiliario per simulazione -static const std::string GVAR_VMILL = ".VMILL" ; // (int/s) identificativi Zmap attivi per Virtual Milling -static const std::string GVAR_CODET = ".CODET" ; // (int/s) identificativi Zmap attivi per Collision Detection -static const std::string GVAR_SIM1ST = ".SIM1ST" ; // (bool) flag inizio simulazione -static const std::string GVAR_SIMSTEP = ".SIMSTEP" ; // (num) step di movimento durante la simulazione -static const std::string GVAR_SIMUISTAT = ".SIMUISTAT" ; // (num) stato simulazione imposto da utente -static const std::string GVAR_SAFEDIST = ".SAFEDIST" ; // (num) distanza di sicurezza per verifica di collisione -static const std::string GVAR_SIMVMID = ".SIMVMID" ; // (int) identificativo grezzo Vmill in collisione -static const std::string GVAR_SIMCOBIND = ".SIMCOBIND" ; // (int) indice oggetto in collisione +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 +static const std::string GVAR_MOVEID = ".MOVEID" ; // (int) identificativo movimento +static const std::string GVAR_MOVEIND = ".MOVEIND" ; // (int) indice movimento +static const std::string GVAR_MOVE = ".MOVE" ; // (int) tipo di movimento (0,1,2,3) +static const std::string GVAR_L1 = ".L1" ; // (num) valore del primo asse lineare +static const std::string GVAR_L2 = ".L2" ; // (num) valore del secondo asse lineare +static const std::string GVAR_L3 = ".L3" ; // (num) valore del terzo asse lineare +static const std::string GVAR_R1 = ".R1" ; // (num) valore del primo asse rotante +static const std::string GVAR_R2 = ".R2" ; // (num) valore del secondo asse rotante +static const std::string GVAR_R3 = ".R3" ; // (num) valore del terzo asse rotante +static const std::string GVAR_R4 = ".R4" ; // (num) valore del quarto asse rotante +static const std::string GVAR_C1 = ".C1" ; // (num) valore del primo asse lineare per centro arco +static const std::string GVAR_C2 = ".C2" ; // (num) valore del secondo asse lineare per centro arco +static const std::string GVAR_C3 = ".C3" ; // (num) valore del terzo asse lineare per centro arco +static const std::string GVAR_M1 = ".M1" ; // (num) valore del primo asse lineare per punto medio arco +static const std::string GVAR_M2 = ".M2" ; // (num) valore del secondo asse lineare per punto medio arco +static const std::string GVAR_M3 = ".M3" ; // (num) valore del terzo asse lineare per punto medio arco +static const std::string GVAR_RR = ".RR" ; // (num) valore raggio per arco +static const std::string GVAR_AC = ".AC" ; // (num) valore angolo al centro per arco +static const std::string GVAR_L1P = ".L1p" ; // (num) valore precedente del primo asse lineare +static const std::string GVAR_L2P = ".L2p" ; // (num) valore precedente del secondo asse lineare +static const std::string GVAR_L3P = ".L3p" ; // (num) valore precedente del terzo asse lineare +static const std::string GVAR_R1P = ".R1p" ; // (num) valore precedente del primo asse rotante +static const std::string GVAR_R2P = ".R2p" ; // (num) valore precedente del secondo asse rotante +static const std::string GVAR_R3P = ".R3p" ; // (num) valore precedente del terzo asse rotante +static const std::string GVAR_R4P = ".R4p" ; // (num) valore precedente del quarto asse rotante +static const std::string GVAR_L1T = ".L1t" ; // (string) token del primo asse lineare +static const std::string GVAR_L2T = ".L2t" ; // (string) token del secondo asse lineare +static const std::string GVAR_L3T = ".L3t" ; // (string) token del terzo asse lineare +static const std::string GVAR_R1T = ".R1t" ; // (string) token del primo asse rotante +static const std::string GVAR_R2T = ".R2t" ; // (string) token del secondo asse rotante +static const std::string GVAR_R3T = ".R3t" ; // (string) token del terzo asse rotante +static const std::string GVAR_R4T = ".R4t" ; // (string) token del quarto asse rotante +static const std::string GVAR_C1T = ".C1t" ; // (string) token del primo asse lineare per centro arco +static const std::string GVAR_C2T = ".C2t" ; // (string) token del secondo asse lineare per centro arco +static const std::string GVAR_C3T = ".C3t" ; // (string) token del terzo asse lineare per centro arco +static const std::string GVAR_M1T = ".M1t" ; // (string) token del primo asse lineare per punto medio arco +static const std::string GVAR_M2T = ".M2t" ; // (string) token del secondo asse lineare per punto medio arco +static const std::string GVAR_M3T = ".M3t" ; // (string) token del terzo asse lineare per punto medio arco +static const std::string GVAR_RRT = ".RRt" ; // (string) token del raggio per arco +static const std::string GVAR_L1N = ".L1n" ; // (string) nome del primo asse lineare +static const std::string GVAR_L2N = ".L2n" ; // (string) nome del secondo asse lineare +static const std::string GVAR_L3N = ".L3n" ; // (string) nome del terzo asse lineare +static const std::string GVAR_R1N = ".R1n" ; // (string) nome del primo asse rotante +static const std::string GVAR_R2N = ".R2n" ; // (string) nome del secondo asse rotante +static const std::string GVAR_R3N = ".R3n" ; // (string) nome del terzo asse rotante +static const std::string GVAR_R4N = ".R4n" ; // (string) nome del quarto asse rotante +static const std::string GVAR_MASK = ".MASK" ; // (int) mask associato ai movimenti in rapido +static const std::string GVAR_FLAG = ".FLAG" ; // (int) flag associato ad ogni movimento +static const std::string GVAR_FLAG2 = ".FLAG2" ; // (int) secondo flag associato ad ogni movimento +static const std::string GVAR_INDEX = ".IDX" ; // (int) indice associato ad ogni movimento +static const std::string GVAR_TDIR = ".TDIR" ; // (Vector3d) versore utensile nel riferimento pezzo +static const std::string GVAR_CDIR = ".CDIR" ; // (Vector3d) versore correzione nel riferimento pezzo +static const std::string GVAR_ADIR = ".ADIR" ; // (Vector3d) versore ausiliario nel riferimento pezzo +static const std::string GVAR_TDIRP = ".TDIRp" ; // (Vector3d) precedente versore utensile nel riferimento pezzo +static const std::string GVAR_ENABAXES = ".EnabAxes" ; // (bool) flag abilitazione assi attivi per simulazione +static const std::string GVAR_SHOWAXES = ".ShowAxes" ; // (bool) flag visualizzazione assi attivi per simulazione +static const std::string GVAR_AUXAXES = ".AuxAxes" ; // (int) numero assi ausiliari per simulazione +static const std::string GVAR_AN = ".AN" ; // (num) valore del N-esimo asse ausiliario per simulazione +static const std::string GVAR_ANN = ".ANn" ; // (string) nome del N-esimo asse ausiliario per simulazione +static const std::string GVAR_VMILL = ".VMILL" ; // (int/s) identificativi Zmap attivi per Virtual Milling +static const std::string GVAR_CODET = ".CODET" ; // (int/s) identificativi Zmap attivi per Collision Detection +static const std::string GVAR_SIM1ST = ".SIM1ST" ; // (bool) flag inizio simulazione +static const std::string GVAR_SIMSTEP = ".SIMSTEP" ; // (num) step di movimento durante la simulazione +static const std::string GVAR_SIMUISTAT = ".SIMUISTAT" ; // (num) stato simulazione imposto da utente +static const std::string GVAR_SAFEDIST = ".SAFEDIST" ; // (num) distanza di sicurezza per verifica di collisione +static const std::string GVAR_SIMVMID = ".SIMVMID" ; // (int) identificativo grezzo Vmill in collisione +static const std::string GVAR_SIMCOBIND = ".SIMCOBIND" ; // (int) indice oggetto in collisione // Funzioni generazione static const std::string ON_START = "OnStart" ; static const std::string ON_END = "OnEnd" ;