EgtMachKernel 2.2a3 :
- aggiunta gestione controllo velocità su tagli con lama di archi.
This commit is contained in:
Binary file not shown.
+52
@@ -733,6 +733,9 @@ Sawing::Update( bool bPostApply)
|
||||
return false ;
|
||||
}
|
||||
|
||||
// aggiustamento feed per movimenti 4 assi
|
||||
AdjustFeeds() ;
|
||||
|
||||
// gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione
|
||||
if ( ! AdjustStartEndMovements()) {
|
||||
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
|
||||
@@ -752,6 +755,55 @@ Sawing::Update( bool bPostApply)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Sawing::AdjustFeeds( void)
|
||||
{
|
||||
// controlli su GeomDB e simili non ripetuti perchè già fatti
|
||||
|
||||
// recupero gruppo della geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
|
||||
// ciclo sui gruppi CL
|
||||
int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ;
|
||||
while ( nClPathId != GDB_ID_NULL) {
|
||||
// ciclo su tutte le entità del percorso CL
|
||||
for ( int nEntId = m_pGeomDB->GetFirstInGroup( nClPathId) ;
|
||||
nEntId != GDB_ID_NULL ;
|
||||
nEntId = m_pGeomDB->GetNext( nEntId)) {
|
||||
// recupero i dati Cam dell'entità
|
||||
CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ;
|
||||
if ( pCamData == nullptr)
|
||||
continue ;
|
||||
// se arco
|
||||
if ( pCamData->IsArc()) {
|
||||
// determino lunghezza di movimento del tip utensile
|
||||
Vector3d vtCenEnd = pCamData->GetEndPoint() - pCamData->GetCenter() ;
|
||||
Vector3d vtTipRad = vtCenEnd - vtCenEnd * pCamData->GetNormDir() * pCamData->GetNormDir() ;
|
||||
double dTipRad = vtTipRad.Len() ;
|
||||
double dTipAngCen = pCamData->GetAngCen() ;
|
||||
double dTipLen = dTipRad * abs( dTipAngCen) * DEGTORAD ;
|
||||
// determino lunghezza di movimento degli assi utensile
|
||||
double dAxRad = pCamData->GetAxesRad() ;
|
||||
double dAxAngCen = pCamData->GetAxesAngCen() ;
|
||||
double dAxLenXYZ = dAxRad * dAxAngCen * DEGTORAD ;
|
||||
double dAxLen = sqrt( max( dAxLenXYZ * dAxLenXYZ + dAxAngCen * dAxAngCen, 0.)) ;
|
||||
// correggo la feed di movimento
|
||||
if ( dTipLen > EPS_SMALL && dAxLen > EPS_SMALL) {
|
||||
double dCoeff = dAxLen / dTipLen ;
|
||||
double dFeed = pCamData->GetFeed() ;
|
||||
pCamData->SetFeed( dFeed * dCoeff) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
nClPathId = m_pGeomDB->GetNextGroup( nClPathId) ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Sawing::GetParam( int nType, bool& bVal) const
|
||||
|
||||
@@ -128,6 +128,7 @@ class Sawing : public Machining
|
||||
bool AddApproach( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
||||
bool AddRetract( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
||||
bool AreHeadWorkOnSameSide( void) const ;
|
||||
bool AdjustFeeds( void) ;
|
||||
|
||||
private :
|
||||
double GetSpeed( void) const
|
||||
|
||||
Reference in New Issue
Block a user