EgtMachKernel 2.3j1 :

- corretto controlli attacchi/uscite lame in fresature con testa da sotto.
This commit is contained in:
DarioS
2021-10-04 09:15:29 +02:00
parent bb8b6b9fc1
commit 52a26ceb52
2 changed files with 9 additions and 6 deletions
BIN
View File
Binary file not shown.
+9 -6
View File
@@ -1480,7 +1480,7 @@ Milling::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) 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_dTDiam - 10 * EPS_SMALL ;
double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ;
ptP.Translate( dOffset * pCamData->GetCorrDir()) ;
}
// negli altri casi, non devo fare alcunché
@@ -1501,7 +1501,7 @@ Milling::AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) co
// 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 ;
double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ;
ptCen.Translate( dOffset * pCamData->GetCorrDir()) ;
}
}
@@ -1943,7 +1943,7 @@ Milling::AdjustPathDrawForSaw( int nClPathId)
if ( ( m_TParams.m_nType & TF_SAWBLADE) == 0)
return true ;
// porto il percorso praticamente sull'estremo della lama ( appena meno per evitare di trasformare archi in punti)
double dOffset = 0.5 * m_TParams.m_dTDiam - 10 * EPS_SMALL ;
double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ;
Vector3d vtPrevCorr ;
for ( int nId = m_pGeomDB->GetFirstInGroup( nClPathId) ;
nId != GDB_ID_NULL ;
@@ -2237,7 +2237,8 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev, dSafeZ) ;
// determino se l'inizio dell'attacco è sopra il grezzo
bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1, vtTool) ;
bool bGeomAboveStart = GetPointAboveRaw( ptP1, vtTool) ;
bool bAboveStart = ( m_bAboveHead && bGeomAboveStart) ;
// imposto versore correzione e ausiliario sul punto di partenza
CalcAndSetCorrAuxDir( pCompo, i) ;
// aggiungo approccio per frese normali
@@ -2273,7 +2274,7 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo
double dSawStartElev = 0 ;
bool bUnderStart = m_bAboveHead && GetPointUnderRaw( ptP1, vtTool, m_TParams.m_dTDiam / 2,
GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, dSawStartElev) ;
if ( ! bUnderStart && bOk) {
if ( ! bGeomAboveStart && ! bUnderStart && bOk) {
m_pMchMgr->SetLastError( 2314, "Error in Milling : LeadIn must be out of rawpart") ;
bOk = false ;
}
@@ -2382,11 +2383,13 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo
// verifico di uscire in aria
bool bOutEnd = GetPointOutOfRaw( ptP1, vtTool, dElev, dSafeZ) ;
if ( ! bOutEnd) {
// verifico se sono sopra
bool bGeomAboveEnd = GetPointAboveRaw( ptP1, vtTool) ;
// verifico se sono sotto
double dSawEndElev = 0 ;
bool bUnderEnd = m_bAboveHead && GetPointUnderRaw( ptP1, vtTool, m_TParams.m_dTDiam / 2,
GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, dSawEndElev) ;
if ( ! bUnderEnd && bOk) {
if ( ! bGeomAboveEnd && ! bUnderEnd && bOk) {
m_pMchMgr->SetLastError( 2324, "Error in Milling : LeadOut must be out of rawpart") ;
bOk = false ;
}