EgtMachKernel :
- corretto AdjustArcCenterForAxesCalc per SawFinishing - aggiunto AdjustArcCenterForAxesCalc per SawRoughing.
This commit is contained in:
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user