diff --git a/Drilling.cpp b/Drilling.cpp index 1e0f0e2..b10a86b 100644 --- a/Drilling.cpp +++ b/Drilling.cpp @@ -246,6 +246,7 @@ Drilling::Drilling( void) { m_Params.m_sName = "*" ; m_Params.m_sToolName = "*" ; + m_Params.m_sDepth = "TH" ; m_TParams.m_sName = "*" ; m_TParams.m_sHead = "*" ; m_nStatus = MCH_ST_TO_VERIFY ; diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 2efd1a1..f97c1f0 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Pocketing.cpp b/Pocketing.cpp index 3fe20d5..ee2f079 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -3869,10 +3869,10 @@ Pocketing::CalcSpiral( const ICurveComposite* pCompo, int nReg, bool bSplitArcs, vtDir.Normalize() ; Vector3d vtOrtho = OrthoCompo( vtOtherDir, vtDir) ; double dPocketSize = vtOrtho.Len() ; - double dMaxOptSize ; + double dMaxOptSize = m_Params.m_dSideStep ; FromString( ExtractInfo( m_Params.m_sUserNotes, "MaxOptSize="), dMaxOptSize) ; if ( ( ( bSomeOpen && dPocketSize < m_TParams.m_dDiam + EPS_SMALL) || abs( dPocketSize - m_TParams.m_dDiam) < EPS_SMALL) && - ( ! FromString( ExtractInfo( m_Params.m_sUserNotes, "MaxOptSize="), dMaxOptSize) || dPocketSize < dMaxOptSize)) { + dPocketSize < dMaxOptSize + 10 * EPS_SMALL) { if ( nReg == 0) { CalcTrapezoidSpiral( pCrvPocket, vtDir, dPocketSize, pMCrv, pRCrv, bOptimizedTrap) ; if ( bOptimizedTrap) diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index 8bcd2b7..d44e07e 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -41,9 +41,6 @@ #include "/EgtDev/Include/EGkDistPointSurfTm.h" #include "/EgtDev/Include/EGkIntersPlaneSurfTm.h" #include "/EgtDev/Include/EGkStmFromCurves.h" -#include // debug -#include // debug -#include "/EgtDev/Include/EgtPerfCounter.h" // debug // per far dimenticare macro di WinUser.h #undef GetClassName @@ -1771,7 +1768,7 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co for ( int i = 0 ; i < int( vpCrvs.size()) ; ++ i) VerifyArcs( vpCrvs[i]) ; - // salvo i loop esterni della superficie corrente come Polyline ( per LeadIn/LeadOut) + // salvo i loop esterni della superficie corrente come Polylinee ( per LeadIn/LeadOut) ICURVEPOVECTOR vLoops ; vLoops.resize( pSfrPock->GetChunkCount()) ; for ( int c = 0 ; c < int( vLoops.size()) ; ++ c) vLoops[c].Set( pSfrPock->GetLoop( c, 0)) ; @@ -1802,6 +1799,9 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co PtrOwner pCurve( pCrvC->Clone()) ; if ( IsNull( pCurve)) return false ; + // coefficiente feed (riduzione di feed per sezione di taglio superiore al previsto) + double dTempParam ; vpCrvs[k]->GetCurveTempParam( i, dTempParam) ; + double dCoeffFeed = ( dTempParam > EPS_SMALL ? dTempParam /= 1000 : 1) ; // se prima entità if ( i == 0) { // dati inizio entità @@ -1848,7 +1848,8 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co ptP1 -= ( nBasicStep * dStep) * vtTool ; SetFeed( GetTipFeed()) ; SetFlag( 0) ; - AddLinearMove( ptP1) ; + if ( AddLinearMove( ptP1) == GDB_ID_NULL) + return false ; } } // aggiungo attacco @@ -1874,16 +1875,12 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co return false ; } } - // ricavo la Feed e la imposto - double dPar0 = pCurve->GetTempParam( 0) ; - dPar0 /= 1000. ; - double dFeed = dPar0 * GetFeed() ; - SetFeed( dFeed) ; // elaborazioni sulla curva corrente (sempre un segmento di retta) if ( pCurve->GetType() == CRV_LINE) { ICurveLine* pLine = GetCurveLine( pCurve) ; Point3d ptP3 = pLine->GetEnd() ; Vector3d vtMove ; pLine->GetStartDir( vtMove) ; + SetFeed( dCoeffFeed * GetRightFeed( vtMove, vtTool)) ; if ( AddLinearMove( ptP3) == GDB_ID_NULL) return false ; } @@ -1894,6 +1891,7 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co Vector3d vtN = pArc->GetNormVersor() ; Point3d ptP3 ; pArc->GetEndPoint( ptP3) ; + SetFeed( dCoeffFeed * GetFeed()) ; if ( AddArcMove( ptP3, ptCen, dAngCen, vtN) == GDB_ID_NULL) return false ; } diff --git a/SurfRoughing.h b/SurfRoughing.h index 477ed67..742f3ec 100644 --- a/SurfRoughing.h +++ b/SurfRoughing.h @@ -140,7 +140,7 @@ class SurfRoughing : public Machining /* end debug functions */ private : - SELVECTOR m_vId ; // identificativi entità geometriche da lavorare + SELVECTOR m_vId ; // identificativi entit� geometriche da lavorare SurfRoughingData m_Params ; // parametri lavorazione ToolData m_TParams ; // parametri utensile double m_dTHoldBase ; // posizione base del porta-utensile