EgtMachKernel :

- corretto AdjustArcCenterForAxesCalc per SawFinishing
- aggiunto AdjustArcCenterForAxesCalc per SawRoughing.
This commit is contained in:
DarioS
2026-08-28 15:50:34 +02:00
parent 56774c497f
commit e35923d932
4 changed files with 32 additions and 3 deletions
+1
View File
@@ -1675,6 +1675,7 @@ Milling::AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) co
double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ;
ptCen.Translate( dOffset * pCamData->GetCorrDir()) ;
}
// altrimenti il centro deve rimanere inalterato
}
// negli altri casi, non devo fare alcunché
return true ;
+11 -2
View File
@@ -919,8 +919,17 @@ SawFinishing::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, b
bool
SawFinishing::AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const
{
// compenso il raggio dell'utensile
ptCen += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ;
// 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
ptCen += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ;
}
// altrimenti il centro deve rimanere inalterato
return true ;
}
+19 -1
View File
@@ -895,11 +895,29 @@ bool
SawRoughing::AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom) const
{
// compenso il raggio dell'utensile
ptP += (bToVsFrom ? +1 : -1) * vtCorr * ( m_TParams.m_dDiam / 2) ;
ptP += ( bToVsFrom ? +1 : -1) * vtCorr * ( m_TParams.m_dDiam / 2) ;
return true ;
}
//----------------------------------------------------------------------------
bool
SawRoughing::AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) const
{
// 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
ptCen += pCamData->GetCorrDir() * ( m_TParams.m_dDiam / 2) ;
}
// altrimenti il centro deve rimanere inalterato
return true ;
}
//----------------------------------------------------------------------------
bool
SawRoughing::VerifyGeometry( SelData Id, int& nSubs)
+1
View File
@@ -54,6 +54,7 @@ class SawRoughing : public Machining
int GetSolCh( void) const override
{ return m_Params.m_nSolCh ; }
bool AdjustEndPointForAxesCalc( const Vector3d& vtCorr, Point3d& ptP, bool bToVsFrom = true) const override ;
bool AdjustArcCenterForAxesCalc(const CamData* pCamData, Point3d& ptCen) const override ;
public : // Machining
bool Prepare( const std::string& sSawName) override ;