From 096a890c42b228bddb70aa391b8cb6c8e219de4e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 19 Sep 2024 12:48:15 +0200 Subject: [PATCH] EgtMachKernel : - in svuotatura con aggregato da sotto corretta la verifica della distanza limite dal bordo - nelle simulazioni migliorata visualizzazione collisioni con fixtures - in fresatura standard di singola curva e in centro fresa con variazioni su geometria di lavorazione (info MVar) si emette l'indice EMT.IDX riferito alla geometria originale (1-based). --- Milling.cpp | 13 +++++++++++++ Pocketing.cpp | 2 +- SimulatorMP.cpp | 3 ++- SimulatorSP.cpp | 3 ++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Milling.cpp b/Milling.cpp index dc2bd0b..1bb2849 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -2272,6 +2272,12 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo string sMachIni = m_pMchMgr->GetCurrMachine()->GetMachineDir() + "\\" + m_pMchMgr->GetCurrMachine()->GetMachineName() + ".ini" ; bool bRapidOnOut = ( GetPrivateProfileInt( MACHININGS_SEC.c_str(), RAPIDONOUT_KEY.c_str(), 0, sMachIni.c_str()) == 1) ; + // Recupero necessità indicizzazione per variazioni di lavorazione ("MVar" da porte) + bool bIndex = false ; + string sInfo ; + if ( m_Params.m_nWorkSide == MILL_WS_CENTER && m_vId.size() == 1 && m_pGeomDB->GetInfo( m_vId[0].nId, "MVar", sInfo)) + bIndex = true ; + // in caso di tabs ne aggiusto i parametri secondo il percorso TabData tdTabs ; AdjustTabsParams( pCompo, bPathTabsEnable, tdTabs) ; @@ -2298,6 +2304,8 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo pCurve->Translate( - vtTool * dDepth) ; // se prima entità, approccio e affondo if ( i == 0) { + // reset index + SetIndex( 0) ; // dati inizio entità Point3d ptStart ; pCurve->GetStartPoint( ptStart) ; @@ -2448,6 +2456,9 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo } // imposto versore correzione e ausiliario sul punto di arrivo CalcAndSetCorrAuxDir( pCompo, i + 1, false, true) ; + // se richiesto, imposto indice entità + if ( bIndex) + SetIndex( i + 1) ; // elaborazioni sulla curva corrente if ( pCurve->GetType() == CRV_LINE) { ICurveLine* pLine = GetCurveLine( pCurve) ; @@ -2488,6 +2499,8 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo } // se ultima entità, uscita e retrazione if ( i == nMaxInd) { + // reset index + SetIndex( 0) ; // dati fine entità Point3d ptEnd ; pCurve->GetEndPoint( ptEnd) ; diff --git a/Pocketing.cpp b/Pocketing.cpp index 26858d9..6679ad4 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -1877,7 +1877,7 @@ Pocketing::VerifyPathFromBottom( const ICurveComposite* pCompo, const Vector3d& } // se supera il limite, errore - if ( dMinDist > m_AggrBottom.dDMax) { + if ( dMinDist - ( m_TParams.m_dDiam / 2 + GetOffsR()) > m_AggrBottom.dDMax) { m_pMchMgr->SetLastError( 2410, "Error in Pocketing : path too far from part sides") ; return false ; } diff --git a/SimulatorMP.cpp b/SimulatorMP.cpp index 6df9161..2c9a5d8 100644 --- a/SimulatorMP.cpp +++ b/SimulatorMP.cpp @@ -1569,7 +1569,8 @@ FindCollisionMarkId( const IGeomDB* pGeomDB, int nCollId) int nCollParId = pGeomDB->GetParentId( nCollId) ; string sCollParName = "COLLISION" ; pGeomDB->GetName( nCollParId, sCollParName) ; - if ( sCollParName != "COLLISION") + // COLLISION per parti generiche di macchina, BASE e MOBILE per fixtures + if ( sCollParName != "COLLISION" && sCollParName != "BASE" && sCollParName != "MOBILE") return nCollParId ; else { int nCollGprId = pGeomDB->GetParentId( nCollParId) ; diff --git a/SimulatorSP.cpp b/SimulatorSP.cpp index 39c7ea3..b969abd 100644 --- a/SimulatorSP.cpp +++ b/SimulatorSP.cpp @@ -1530,7 +1530,8 @@ FindCollisionMarkId( const IGeomDB* pGeomDB, int nCollId) int nCollParId = pGeomDB->GetParentId( nCollId) ; string sCollParName = "COLLISION" ; pGeomDB->GetName( nCollParId, sCollParName) ; - if ( sCollParName != "COLLISION") + // COLLISION per parti generiche di macchina, BASE e MOBILE per fixtures + if ( sCollParName != "COLLISION" && sCollParName != "BASE" && sCollParName != "MOBILE") return nCollParId ; else { int nCollGprId = pGeomDB->GetParentId( nCollParId) ;