From b877fe54b233e505b353b71d1ba2241b3ed4b401 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Tue, 16 Jun 2026 17:04:52 +0200 Subject: [PATCH] EgtMachKernel 3.1f3 : - in PocketingNT aggiunto flag 404 e 405 per lavorazioni in doppio in parallelo. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes PocketingNT.cpp | 18 +++++++++++++++--- PocketingNT.h | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 99c6cdaf12d3189dbe1d380b370e2f71ee272edb..5d3478825348eebaae43b48cf6847186e232be12 100644 GIT binary patch delta 81 zcmewt{V#gMH#SD&&F|$dGEF|gnFC}RN|iEhUd8Rf3>J0-QHDw&Az`QxlFGd-$coN# F0{{S=9LN9w delta 81 zcmewt{V#gMH#SD2&F|$dGEF|gnFC}RN|iEhUd8Rf3>J0-QHDw&Az`QxlFGd-$coN# F0|5VH9KZko diff --git a/PocketingNT.cpp b/PocketingNT.cpp index 955db18..1a4278b 100644 --- a/PocketingNT.cpp +++ b/PocketingNT.cpp @@ -5208,6 +5208,8 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double // recupero l'entità camData corrispondente CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ; if ( pCamData != nullptr) { + // assegno Flag e recupero Feed + pCamData->SetFlag( 405) ; double dFeed = pCamData->GetFeed() ; // verifico se la curva corrente appartiene al piano del LastStep bool bOnPlane = false ; @@ -5317,11 +5319,13 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double double dNini = ( ptCurr - ORIG) * vtTool ; double dNfin = ( ptStart - ORIG) * vtTool ; AdjustCurveSlope( pCrvSafeLink, dNini, dNfin) ; + SetFlag( 405) ; AddCurveMove( pCrvSafeLink, bSplitArcs, MCH_CL_PARALLEL_DBL) ; } } else { // aggiungo risalita nel vuoto + SetFlag( 405) ; AddLinearMove( ptStart, bSplitArcs, MCH_CL_PARALLEL_DBL) ; } @@ -5346,6 +5350,7 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double #endif } SetFeed( dFeed) ; + SetFlag( 405) ; // elaborazioni sulla curva corrente if ( pCurve->GetType() == CRV_LINE) { ICurveLine* pLine = GetCurveLine( pCurve) ; @@ -5363,10 +5368,13 @@ PocketingNT::CalcDoubleParallelPenultimateStep( int nDouble, int nIdDblS, double GetCurrPos( ptCurr) ; double dDepth = ( - ( ptNeatEnd - ptCurr) * vtTool) / 2. ; if ( dDepth > 25. * EPS_SMALL) { // sempre... + SetFlag( 405) ; SetFeed( GetEndFeed()) ; // ho rimosso tutto il materiale AddLinearMove( ptCurr - dDepth * vtTool, bSplitArcs, MCH_CL_PARALLEL_DBL) ; } + + SetFlag( 0) ; return true ; } @@ -5611,7 +5619,7 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou return false ; if ( dEscapeElev > 10. * EPS_SMALL && vtEscape.Len() > 10. * EPS_SMALL) { AddLinearMove( ptP1 + vtTool * dLastElev, bSplitArcs) ; - if ( ! AddRetract( ptP1 + vtTool * dLastElev, vtEscape, dSafeZ, dSafeAggrBottZ, dEscapeElev, dAppr, bSplitArcs)) { + if ( ! AddRetract( ptP1 + vtTool * dLastElev, vtEscape, dSafeZ, dSafeAggrBottZ, dEscapeElev, dAppr, bSplitArcs, bDoubleParallel)) { m_pMchMgr->SetLastError( 2417, "Error in PocketingNT : Retract not computable") ; return false ; } @@ -5620,7 +5628,7 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou // aggiungo retroazione finale if ( currPath.bToolCompensation && dLastElev < EPS_SMALL) dLastElev = currStep.dDepth ; - if ( ! AddRetract( ptP1, vtTool, dSafeZ, dSafeAggrBottZ, dLastElev, dAppr, bSplitArcs)) { + if ( ! AddRetract( ptP1, vtTool, dSafeZ, dSafeAggrBottZ, dLastElev, dAppr, bSplitArcs, bDoubleParallel)) { m_pMchMgr->SetLastError( 2417, "Error in PocketingNT : Retract not computable") ; return false ; } @@ -6242,7 +6250,7 @@ PocketingNT::AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double //---------------------------------------------------------------------------- bool PocketingNT::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ, - double dElev, double dAppr, bool bSplitArcs) + double dElev, double dAppr, bool bSplitArcs, bool bDoubleParallel) { // se con aggregato da sotto o equivalente (rinvio a 90 gradi su testa 5 assi) bool bBottomOutStart = false ; @@ -6253,6 +6261,8 @@ PocketingNT::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSaf dDistBottom = 0 ; bBottomOutStart = ( dDistBottom < - 10 * EPS_SMALL) ; } + if ( bDoubleParallel) + SetFlag( 404) ; // se sopra uscita c'è spazio per sicurezza o approccio double dSafeDist = ( m_bAggrBottom ? dSafeAggrBottZ : dSafeZ) ; if ( ! bBottomOutStart && dElev + max( dSafeDist, dAppr) > 10 * EPS_SMALL) { @@ -6302,6 +6312,8 @@ PocketingNT::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSaf return false ; } } + if ( bDoubleParallel) + SetFlag( 0) ; return true ; } diff --git a/PocketingNT.h b/PocketingNT.h index 8f4267c..8bf9e38 100644 --- a/PocketingNT.h +++ b/PocketingNT.h @@ -156,7 +156,7 @@ class PocketingNT : public Machining bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ, double dElev, double dAppr, bool bSplitArcs) ; bool AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ, - double dElev, double dAppr, bool bSplitArcs) ; + double dElev, double dAppr, bool bSplitArcs, bool bDoubleParallel) ; bool CalcFirstElevation( const Point3d& ptP1, const Vector3d& vtTool, const StepInfoPO& currStep, double dSafeZ, double dStep, double& dCurrElev, double& dEscapeElev, Vector3d& vtEscape) const ;