From 096a890c42b228bddb70aa391b8cb6c8e219de4e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 19 Sep 2024 12:48:15 +0200 Subject: [PATCH 1/3] 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) ; From 037e3281a51cf00973a9cf2e788a2a5758a616c4 Mon Sep 17 00:00:00 2001 From: SaraP Date: Thu, 19 Sep 2024 15:49:33 +0200 Subject: [PATCH 2/3] EgtMachKernel : - in fresatura con lama nel calcolo ingressi e uscite utilizzata anche info OutRaw. --- Milling.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Milling.cpp b/Milling.cpp index 1bb2849..f1b7cd5 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -2384,7 +2384,7 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo // altrimenti, approccio per lame e frese che non lavorano di testa else { // verifico di entrare in aria - if ( ! bOutStart) { + if ( ! ( bOutStart || m_bStartOutRaw)) { // verifico se sono sotto double dSawStartElev = 0 ; bool bAhUnderStart = false ; @@ -2570,7 +2570,7 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo } // per lame e frese che non lavorano di testa quando è necessario else { - if ( ! bOutEnd) { + if ( ! ( bOutEnd || m_bEndOutRaw)) { // verifico se sono sopra bool bGeomAboveEnd = GetPointAboveRaw( ptP1 + vtWkTip, vtTool) ; // verifico se sono sotto From 361eb4423612c3a65ef1033d76e5f095a579921e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 20 Sep 2024 14:21:52 +0200 Subject: [PATCH 3/3] EgtMachKernel : - in sgrossatura superfici VerifySubType ora accetta anche SURFROU_SUB_CONFORMAL_ONEWAY - in svuotatura VerifySubType ora accetta aanche POCKET_SUB_CONFORMAL_ZIGZAG e POCKET_SUB_CONFORMAL_ONEWAY e li rimanda sui tipi standard. --- Pocketing.cpp | 2 ++ PocketingData.cpp | 3 ++- SurfRoughingData.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Pocketing.cpp b/Pocketing.cpp index 6679ad4..8213114 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -1716,10 +1716,12 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId) // Eseguo la lavorazione a seconda del tipo switch ( m_Params.m_nSubType) { case POCKET_SUB_ZIGZAG : + case POCKET_SUB_CONFORMAL_ZIGZAG : if ( ! AddZigZag( pCompo, vtTool, vtExtr, dDepth, dElev, dOkStep, bSplitArcs, nPathId)) return false ; break ; case POCKET_SUB_ONEWAY : + case POCKET_SUB_CONFORMAL_ONEWAY : if ( ! AddOneWay( pCompo, vtTool, vtExtr, dDepth, dElev, dOkStep, bSplitArcs)) return false ; break ; diff --git a/PocketingData.cpp b/PocketingData.cpp index 886096d..f9ecabc 100644 --- a/PocketingData.cpp +++ b/PocketingData.cpp @@ -397,7 +397,8 @@ bool PocketingData::VerifySubType( int nVal) const { return ( nVal == POCKET_SUB_ZIGZAG || nVal == POCKET_SUB_ONEWAY || - nVal == POCKET_SUB_SPIRALIN || nVal == POCKET_SUB_SPIRALOUT) ; + nVal == POCKET_SUB_SPIRALIN || nVal == POCKET_SUB_SPIRALOUT || + nVal == POCKET_SUB_CONFORMAL_ZIGZAG || nVal == POCKET_SUB_CONFORMAL_ONEWAY) ; } //---------------------------------------------------------------------------- diff --git a/SurfRoughingData.cpp b/SurfRoughingData.cpp index 14b592b..5c544f9 100644 --- a/SurfRoughingData.cpp +++ b/SurfRoughingData.cpp @@ -393,7 +393,7 @@ SurfRoughingData::VerifySubType( int nVal) const { return ( nVal == SURFROU_SUB_ZIGZAG || nVal == SURFROU_SUB_ONEWAY || nVal == SURFROU_SUB_SPIRALIN || nVal == SURFROU_SUB_SPIRALOUT || - nVal == SURFROU_SUB_CONFORMAL_ZIGZAG) ; + nVal == SURFROU_SUB_CONFORMAL_ZIGZAG || nVal == SURFROU_SUB_CONFORMAL_ONEWAY) ; } //----------------------------------------------------------------------------