From 56774c497f3ec06febba81fdf7b2d489c59ad273 Mon Sep 17 00:00:00 2001 From: DarioS Date: Fri, 28 Aug 2026 10:06:34 +0200 Subject: [PATCH] EgtMachKernel 3.1h4 : - corretta gestione inserimento punto medio in rapidi con lama con cambio di direzioni T e A a spirale - eliminata funzione AdjustEndPointForAxesCalc da SurfFinishing, SurfRoughing e WaterJetting - a AdjustEndPointForAxesCalc aggiunto parametro per indicare se da punto di lavoro a tip o viceversa. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes FiveAxisMilling.cpp | 4 +-- FiveAxisMilling.h | 2 +- GeoConst.h | 3 ++ Machining.cpp | 2 +- Milling.cpp | 7 ++-- Milling.h | 2 +- Operation.cpp | 78 +++++++++++++++++++++++++------------------- Operation.h | 6 ++-- SawFinishing.cpp | 4 +-- SawFinishing.h | 2 +- SawRoughing.cpp | 4 +-- SawRoughing.h | 2 +- Sawing.cpp | 4 +-- Sawing.h | 2 +- SurfFinishing.cpp | 9 ----- SurfFinishing.h | 1 - SurfRoughing.cpp | 10 ------ SurfRoughing.h | 1 - WaterJetting.cpp | 30 ----------------- WaterJetting.h | 2 -- 21 files changed, 67 insertions(+), 108 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index a1f68006d806c083b72ba663f39aaab34ba31535..8c7f9f5908ef7da0e793d7dfa383d4f50ed71cdb 100644 GIT binary patch delta 97 zcmewt{V#gMFE&P#&A-`fnHfzcKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUI`BbWdH delta 97 zcmewt{V#gMFE&Qw&A-`fnHh~IKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUD-Bai?9 diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp index 543b4c9..9b79ae8 100644 --- a/FiveAxisMilling.cpp +++ b/FiveAxisMilling.cpp @@ -960,12 +960,12 @@ FiveAxisMilling::GetGeometry( SELVECTOR& vIds) const //---------------------------------------------------------------------------- bool -FiveAxisMilling::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const +FiveAxisMilling::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom) const { // se utensile lama if ( ( m_TParams.m_nType & TF_SAWBLADE) != 0) { // compenso il raggio dell'utensile - ptP += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ; + ptP += ( bToVsFrom ? +1 : -1) * vtCorr * ( m_TParams.m_dDiam / 2) ; } return true ; } diff --git a/FiveAxisMilling.h b/FiveAxisMilling.h index 4c7e6b9..aadbe73 100644 --- a/FiveAxisMilling.h +++ b/FiveAxisMilling.h @@ -49,7 +49,7 @@ class FiveAxisMilling : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; + bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const override ; public : // Machining bool Prepare( const std::string& sMillName) override ; diff --git a/GeoConst.h b/GeoConst.h index cf2c8f0..cde70fb 100644 --- a/GeoConst.h +++ b/GeoConst.h @@ -19,6 +19,9 @@ //----------- Minima distanza di sicurezza ---------------------------------- const double MIN_SAFEDIST = 5.0 ; +//----------- Minima tolleranza su movimenti in rapido ---------------------- +const double MIN_SAFERAPID = 2.0 ; + //----------- Costanti per approssimazioni con polilinee o poliarchi -------- const double LIN_TOL_STD = 0.1 ; const double LIN_TOL_FINE = 0.01 ; diff --git a/Machining.cpp b/Machining.cpp index 3ff542d..02153da 100644 --- a/Machining.cpp +++ b/Machining.cpp @@ -853,7 +853,7 @@ Machining::MyToolPreview( int nEntId, bool bDouble) const if ( pCamData == nullptr) return false ; Point3d ptEnd = pCamData->GetEndPoint() ; - AdjustEndPointForAxesCalc( pCamData, ptEnd) ; + AdjustEndPointForAxesCalc( pCamData->GetCorrDir(), ptEnd) ; // recupero gli assi e i loro valori per la posizione corrente const DBLVECTOR& vAxVal = pCamData->GetAxesVal() ; diff --git a/Milling.cpp b/Milling.cpp index 21fe432..a3b36cc 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -1647,13 +1647,12 @@ Milling::Chain( int nGrpDestId) //---------------------------------------------------------------------------- bool -Milling::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const +Milling::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom) const { // se utensile lama if ( ( m_TParams.m_nType & TF_SAWBLADE) != 0) { - // traslazione opposta a quanto fatto in AdjustPathDrawForSaw - double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ; - ptP.Translate( dOffset * pCamData->GetCorrDir()) ; + // se To traslazione opposta a quanto fatto in AdjustPathDrawForSaw, altrimenti uguale + ptP += ( bToVsFrom ? +1 : -1) * vtCorr * ( 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL) ; } // negli altri casi, non devo fare alcunché return true ; diff --git a/Milling.h b/Milling.h index 2b87da2..19cad38 100644 --- a/Milling.h +++ b/Milling.h @@ -51,7 +51,7 @@ class Milling : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; + bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const override ; bool AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const override ; public : // Machining diff --git a/Operation.cpp b/Operation.cpp index 8289425..5d4bb8c 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -1444,7 +1444,7 @@ Operation::CalcAndSetBBox( int nClId) continue ; // recupero il punto finale e lo uso per aggiornare l'ingombro Point3d ptP = pCamData->GetEndPoint() ; - AdjustEndPointForAxesCalc( pCamData, ptP) ; + AdjustEndPointForAxesCalc( pCamData->GetCorrDir(), ptP) ; b3Grp.Add( ptP) ; // se arco, determino anche alcuni punti intermedi if ( pCamData->IsArc()) { @@ -2123,7 +2123,7 @@ Operation::MyCalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinF } // ricavo posizione con eventuali modifiche dipendenti dalla lavorazione Point3d ptP = pCamData->GetEndPoint() ; - AdjustEndPointForAxesCalc( pCamData, ptP) ; + AdjustEndPointForAxesCalc( pCamData->GetCorrDir(), ptP) ; // calcolo gli assi lineari della macchina double dX, dY, dZ ; bool bLOk = m_pMchMgr->GetCalcPositions( ptP, vAxRot, dX, dY, dZ) ; @@ -2525,8 +2525,8 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir bAxError = false ; Machine* pMachine = m_pMchMgr->GetCurrMachine() ; - // se disposizione o finitura di cornici con lama non vanno fatti controlli - if ( GetType() == OPER_DISP || GetType() == OPER_SAWFINISHING) + // se disposizione non vanno fatti controlli + if ( GetType() == OPER_DISP) return true ; // se superato il limite di ricursioni, non devo fare alcunché @@ -2555,13 +2555,44 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir Point3d ptMoveMid ; if ( ! pMachine->GetTipFromPositions( vAxMid[0], vAxMid[1], vAxMid[2], vAxRotMid, false, false, true, ptMoveMid)) return false ; - // verifico le differenze + // ne calcolo le direzioni associate + bool bDirFromAngles = false ; + Vector3d vtDirMid = Media( vtDirPrec, vtDir) ; + Vector3d vtAuxMid = Media( vtAuxPrec, vtAux) ; + if ( ! vtDirMid.Normalize() || + ( ! vtAuxPrec.IsSmall() && ! vtAux.IsSmall() && ( nMoveType == 0 || ! vtAuxMid.Normalize() || abs( vtAuxMid * vtDirMid) > SQRT1_2))) { + if ( ! pMachine->GetBackToolDirFromAngles( vAxRotMid, vtDirMid)) + return false ; + if ( ! pMachine->GetBackAuxDirFromAngles( vAxRotMid, vtAuxMid)) + return false ; + bDirFromAngles = true ; + } + Vector3d vtCorrMid = Media( vtCorrPrec, vtCorr) ; + if ( ! vtCorrPrec.IsSmall() && ! vtCorr.IsSmall() && ( bDirFromAngles || ! vtCorrMid.Normalize())) { + // assegno il versore correzione precedente + vtCorrMid = vtCorrPrec ; + // se possibile, cerco di migliorarlo considerando i rif. prec. e sul medio da direzioni fresa (Z) e ausiliaria (X) + Frame3d refPrec, refMid ; + if ( refPrec.Set( ORIG, vtDirPrec, vtAuxPrec) && + refMid.Set( ORIG, vtDirMid, vtAuxMid)) { + // versore correzione in locale al precente coincide con quello in locale al corrente + vtCorrMid.ToLoc( refPrec) ; + vtCorrMid.ToGlob( refMid) ; + } + } + // verifico le differenze sui punti aggiustati + Point3d ptPrecAdj = ptPrec ; + AdjustEndPointForAxesCalc( vtCorrPrec, ptPrecAdj, false) ; + Point3d ptCurrAdj = ptP ; + AdjustEndPointForAxesCalc( vtCorr, ptCurrAdj, false) ; + Point3d ptMoveMidAdj = ptMoveMid ; + AdjustEndPointForAxesCalc( vtCorrMid, ptMoveMidAdj, false) ; double dDist ; - if ( ! DistPointLine( ptMoveMid, ptPrec, ptP).GetDist( dDist)) + if ( ! DistPointLine( ptMoveMidAdj, ptPrecAdj, ptCurrAdj).GetDist( dDist)) return false ; double dLinTol = GetApproxLinTol() ; if ( nMoveType == 0) - dLinTol = max( 10 * dLinTol, LIN_TOL_RAW) ; + dLinTol = max( 10 * dLinTol, MIN_SAFERAPID) ; else dLinTol = max( dLinTol, 2 * EPS_SMALL) ; bool bInTol = ( dDist <= dLinTol) ; @@ -2577,37 +2608,16 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir // Va inserito il punto medio bAdded = true ; - Point3d ptMid = Media( ptPrec, ptP) ; - Vector3d vtDirMid = Media( vtDirPrec, vtDir) ; - if ( ! vtDirMid.Normalize()) { - if ( ! pMachine->GetBackToolDirFromAngles( vAxRotMid, vtDirMid)) - return ( nMoveType == 0) ; - } - Vector3d vtAuxMid = Media( vtAuxPrec, vtAux) ; - if ( ! vtAuxPrec.IsSmall() && ! vtAux.IsSmall() && ! vtAuxMid.Normalize()) { - if ( ! pMachine->GetBackAuxDirFromAngles( vAxRotMid, vtAuxMid)) - return ( nMoveType == 0) ; - } - Vector3d vtCorrMid = Media( vtCorrPrec, vtCorr) ; - if ( ! vtCorrPrec.IsSmall() && ! vtCorr.IsSmall() && ! vtCorrMid.Normalize()) { - // assegno il versore correzione precedente - vtCorrMid = vtCorrPrec ; - // se possibile, cerco di migliorarlo considerando i rif. prec. e sul medio da direzioni fresa (Z) e ausiliaria (X) - Frame3d refPrec, refMid ; - if ( refPrec.Set( ORIG, vtDirPrec, vtAuxPrec) && - refMid.Set( ORIG, vtDirMid, vtAuxMid)) { - // versore correzione in locale al precente coincide con quello in locale al corrente - vtCorrMid.ToLoc( refPrec) ; - vtCorrMid.ToGlob( refMid) ; - } - } // inserisco nuova entità punto (per evitare problemi di lunghezza linea) // creo oggetto punto per DB geometrico PtrOwner pGP( CreateGeoPoint3d()) ; if ( IsNull( pGP)) return false ; // assegno le coordinate del punto - pGP->Set( ptMid) ; + Point3d ptMidAdj = Media( ptPrecAdj, ptCurrAdj) ; + Point3d ptMid = ptMidAdj ; + AdjustEndPointForAxesCalc( vtCorrMid, ptMid) ; + pGP->Set( ptMidAdj) ; // inserisco l'oggetto nel DB geometrico int nMidEntId = m_pGeomDB->InsertGeoObj( GDB_ID_NULL, nEntId, GDB_BEFORE, Release( pGP)) ; if ( nMidEntId == GDB_ID_NULL) @@ -2625,7 +2635,7 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir CamData* pMidCamData = GetCamData( m_pGeomDB->GetUserObj( nMidEntId)) ; if ( pMidCamData == nullptr) return false ; - pMidCamData->SetEndPoint( ptMid) ; + pMidCamData->SetEndPoint( ptMidAdj) ; pMidCamData->SetToolDir( vtDirMid) ; pMidCamData->SetAuxDir( vtAuxMid) ; pMidCamData->SetCorrDir( vtCorrMid) ; @@ -2736,7 +2746,7 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, double dAngDeltaMinFor } // ricavo posizione con eventuali modifiche dipendenti dalla lavorazione Point3d ptP = pCamData->GetEndPoint() ; - AdjustEndPointForAxesCalc( pCamData, ptP) ; + AdjustEndPointForAxesCalc( pCamData->GetCorrDir(), ptP) ; // recupero direzioni Vector3d vtDir = pCamData->GetToolDir() ; Vector3d vtAux ; diff --git a/Operation.h b/Operation.h index f17a9de..e12e512 100644 --- a/Operation.h +++ b/Operation.h @@ -65,7 +65,7 @@ class Operation : public IUserObj virtual const std::string& GetToolTcPos( void) const = 0 ; virtual bool GetDoubleToolData( std::string& sDblTool, std::string& sDblTcPos, std::string& sDblHead, int& nDblExit) const = 0 ; virtual bool NeedPrevHome( void) const = 0 ; - virtual bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const + virtual bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const { return true ; } virtual bool AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const { return true ; } @@ -222,8 +222,8 @@ class Operation : public IUserObj bool CalculateMcentRotAxesValues( bool bFirst, const Vector3d& vtTool, const Vector3d& vtAux, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxRot) ; - bool VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, - const Point3d& ptP, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, + bool VerifyMcentLineMidPoint( const Point3d& ptEndPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, + const Point3d& ptEnd, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, int nCnt, int nEntId, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) ; bool CalculateClPathRobotAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) ; diff --git a/SawFinishing.cpp b/SawFinishing.cpp index b3f5a1c..d3bf1c2 100644 --- a/SawFinishing.cpp +++ b/SawFinishing.cpp @@ -907,10 +907,10 @@ SawFinishing::GetGeometry( SELVECTOR& vIds) const //---------------------------------------------------------------------------- bool -SawFinishing::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const +SawFinishing::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom) const { // compenso il raggio dell'utensile - ptP += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ; + ptP += ( bToVsFrom ? +1 : -1) * vtCorr * ( m_TParams.m_dDiam / 2) ; return true ; } diff --git a/SawFinishing.h b/SawFinishing.h index 63d0a1b..bd8bdee 100644 --- a/SawFinishing.h +++ b/SawFinishing.h @@ -71,7 +71,7 @@ class SawFinishing : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; + bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const override ; bool AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const override ; public : // Machining diff --git a/SawRoughing.cpp b/SawRoughing.cpp index cbe904d..8bd7b6d 100644 --- a/SawRoughing.cpp +++ b/SawRoughing.cpp @@ -892,10 +892,10 @@ SawRoughing::GetGeometry( SELVECTOR& vIds) const //---------------------------------------------------------------------------- bool -SawRoughing::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const +SawRoughing::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom) const { // compenso il raggio dell'utensile - ptP += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ; + ptP += (bToVsFrom ? +1 : -1) * vtCorr * ( m_TParams.m_dDiam / 2) ; return true ; } diff --git a/SawRoughing.h b/SawRoughing.h index 8b805b9..241825c 100644 --- a/SawRoughing.h +++ b/SawRoughing.h @@ -53,7 +53,7 @@ class SawRoughing : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; + bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const override ; public : // Machining bool Prepare( const std::string& sSawName) override ; diff --git a/Sawing.cpp b/Sawing.cpp index 183c96b..851597e 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -1108,10 +1108,10 @@ Sawing::GetGeometry( SELVECTOR& vIds) const //---------------------------------------------------------------------------- bool -Sawing::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const +Sawing::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom) const { // compenso il raggio dell'utensile - ptP += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ; + ptP += ( bToVsFrom ? +1 : -1) * vtCorr * ( m_TParams.m_dDiam / 2) ; return true ; } diff --git a/Sawing.h b/Sawing.h index f1900d2..c575cfc 100644 --- a/Sawing.h +++ b/Sawing.h @@ -53,7 +53,7 @@ class Sawing : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; + bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const override ; public : // Machining bool Prepare( const std::string& sSawName) override ; diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp index 8fe75f0..e5bd68e 100644 --- a/SurfFinishing.cpp +++ b/SurfFinishing.cpp @@ -1039,15 +1039,6 @@ SurfFinishing::GetGeometry( SELVECTOR& vIds) const return true ; } -//---------------------------------------------------------------------------- -bool -SurfFinishing::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const -{ - // compenso il raggio dell'utensile - ptP += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ; - return true ; -} - //---------------------------------------------------------------------------- bool SurfFinishing::VerifyGeometry( SelData Id, int& nSubs) diff --git a/SurfFinishing.h b/SurfFinishing.h index d9a7ad7..067761a 100644 --- a/SurfFinishing.h +++ b/SurfFinishing.h @@ -79,7 +79,6 @@ class SurfFinishing : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; public : // Machining bool Prepare( const std::string& sSawName) override ; diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index ae81386..0e60ab6 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -986,16 +986,6 @@ SurfRoughing::GetGeometry( SELVECTOR& vIds) const return true ; } -//---------------------------------------------------------------------------- -bool -SurfRoughing::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const -{ - // compenso il raggio dell'utensile - ptP += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ; - - return true ; -} - //---------------------------------------------------------------------------- bool SurfRoughing::VerifyGeometry( SelData Id, int& nSubs) diff --git a/SurfRoughing.h b/SurfRoughing.h index 7498863..1399107 100644 --- a/SurfRoughing.h +++ b/SurfRoughing.h @@ -154,7 +154,6 @@ class SurfRoughing : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; public : // Machining bool Prepare( const std::string& sSawName) override ; diff --git a/WaterJetting.cpp b/WaterJetting.cpp index 5b7aff9..95bf613 100644 --- a/WaterJetting.cpp +++ b/WaterJetting.cpp @@ -1439,36 +1439,6 @@ WaterJetting::VerifySideAngle( void) return true ; } -//---------------------------------------------------------------------------- -bool -WaterJetting::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const -{ - // non devo fare alcunché - return true ; -} - -//---------------------------------------------------------------------------- -bool -WaterJetting::AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const -{ - // se utensile lama - if ( ( m_TParams.m_nType & TF_SAWBLADE) != 0) { - // recupero il precedente movimento - int nPrevId = m_pGeomDB->GetPrev( pCamData->GetOwner()) ; - CamData* pPrevCamData = GetCamData( m_pGeomDB->GetUserObj( nPrevId)) ; - if ( pPrevCamData == nullptr) - return false ; - // se versori correzione uguali, correggo il centro - if ( AreSameVectorApprox( pCamData->GetCorrDir(), pPrevCamData->GetCorrDir())) { - // traslazione opposta a quanto fatto in AdjustPathDrawForSaw - double dOffset = 0.5 * m_TParams.m_dTDiam - 10 * EPS_SMALL ; - ptCen.Translate( dOffset * pCamData->GetCorrDir()) ; - } - } - // negli altri casi, non devo fare alcunché - return true ; -} - //---------------------------------------------------------------------------- bool WaterJetting::ProcessPath( int nPathId, int nPvId, int nClId) diff --git a/WaterJetting.h b/WaterJetting.h index a9922c6..26cfd16 100644 --- a/WaterJetting.h +++ b/WaterJetting.h @@ -50,8 +50,6 @@ class WaterJetting : public Machining protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } - bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ; - bool AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const override ; public : // Machining bool Prepare( const std::string& sMillName) override ;