diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp index 7a84fa1..9adf62d 100644 --- a/FiveAxisMilling.cpp +++ b/FiveAxisMilling.cpp @@ -917,6 +917,18 @@ FiveAxisMilling::GetGeometry( SELVECTOR& vIds) const return true ; } +//---------------------------------------------------------------------------- +bool +FiveAxisMilling::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) 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) ; + } + return true ; +} + //---------------------------------------------------------------------------- bool FiveAxisMilling::VerifyGeometry( SelData Id, int& nSubs, int& nType) diff --git a/FiveAxisMilling.h b/FiveAxisMilling.h index ef3058e..f2dabc6 100644 --- a/FiveAxisMilling.h +++ b/FiveAxisMilling.h @@ -43,6 +43,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 ; public : // Machining bool Prepare( const std::string& sMillName) override ; diff --git a/FiveAxisMillingData.cpp b/FiveAxisMillingData.cpp index 822f837..9409a4a 100644 --- a/FiveAxisMillingData.cpp +++ b/FiveAxisMillingData.cpp @@ -324,7 +324,7 @@ FiveAxisMillingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, pTdata = pToolsMgr->GetTool( sVal) ; if ( pTdata == nullptr) return false ; - if ( ( pTdata->m_nType & TF_MILL) == 0) + if ( ( pTdata->m_nType & TF_MILL) == 0 && ( pTdata->m_nType & TF_SAWBLADE) == 0) return false ; return true ; }