EgtMachKernel :
- modifiche per gestione aggregato da sotto in foratura e fresatura - modifiche per nuovi tipi di uscite lame allungate.
This commit is contained in:
+88
-6
@@ -170,6 +170,8 @@ Drilling::Drilling( void)
|
||||
m_TParams.m_sName = "*" ;
|
||||
m_TParams.m_sHead = "*" ;
|
||||
m_nDrillings = 0 ;
|
||||
m_bAggrBottom = false ;
|
||||
m_dDistBottom = 0 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -848,6 +850,7 @@ Drilling::GenerateHoleCl( int nInd, const SelData& nCircId, const string& sPName
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str()) ;
|
||||
}
|
||||
// verifiche per foro verso il basso
|
||||
m_bAggrBottom = false ;
|
||||
if ( ! VerifyHoleFromBottom( hole, nCircId)) {
|
||||
return false ;
|
||||
}
|
||||
@@ -1214,8 +1217,10 @@ Drilling::VerifyHoleFromBottom( const Hole& hole, SelData Id)
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
// assegno direzione di accesso
|
||||
// assegno direzione di accesso e segnalazione di utilizzo aggregato da sotto
|
||||
SetAuxDir( vtDir) ;
|
||||
m_bAggrBottom = true ;
|
||||
m_dDistBottom = dDist ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -1240,15 +1245,40 @@ Drilling::DoStandardDrilling( const Hole& hole, SelData Id, int nPathId)
|
||||
bool bEndSlow = ( dEndSlowLen > EPS_SMALL) ;
|
||||
// determino alcune caratteristiche dell'utensile
|
||||
double dTExtrLen = max( 0.0, m_TParams.m_dTLen - m_TParams.m_dLen) ;
|
||||
// se con aggregato da sotto, ne recupero alcuni dati
|
||||
double dAgbEncH = 0 ;
|
||||
double dAgbEncV = 0 ;
|
||||
if ( m_bAggrBottom) {
|
||||
m_pGeomDB->GetInfo( m_pMchMgr->GetHeadId( m_TParams.m_sHead), "AGB_ENCH", dAgbEncH) ;
|
||||
m_pGeomDB->GetInfo( m_pMchMgr->GetHeadId( m_TParams.m_sHead), "AGB_ENCV", dAgbEncV) ;
|
||||
}
|
||||
// imposto dati comuni
|
||||
SetPathId( nPathId) ;
|
||||
SetToolDir( hole.vtDir) ;
|
||||
// 1 -> punto approccio
|
||||
// 1 -> punto approccio (se con aggregato da sotto è una sequenza di approccio)
|
||||
SetFlag( 1) ;
|
||||
double dAppr = m_pMchMgr->GetCurrMachiningsMgr()->GetSafeZ() ;
|
||||
Point3d ptP1 = hole.ptIni + hole.vtDir * ( dAppr + dTExtrLen) ;
|
||||
if ( AddRapidStart( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
if ( m_bAggrBottom) {
|
||||
Point3d ptP0 = ptP1 + m_vtAux * ( m_dDistBottom + dAgbEncH + dAppr) ;
|
||||
Point3d ptP00 = ptP0 + Z_AX * ( dAgbEncV + m_TParams.m_dLen + dAppr + dTExtrLen) ;
|
||||
Vector3d vtAux = m_vtAux ;
|
||||
vtAux.Rotate( Z_AX, 90) ;
|
||||
SetAuxDir( vtAux) ;
|
||||
if ( AddRapidStart( ptP00, MCH_CL_AGB_DWN) == GDB_ID_NULL)
|
||||
return false ;
|
||||
vtAux.Rotate( Z_AX, - 90) ;
|
||||
SetAuxDir( vtAux) ;
|
||||
SetFlag( 0) ;
|
||||
if ( AddRapidMove( ptP0, MCH_CL_AGB_IN) == GDB_ID_NULL)
|
||||
return false ;
|
||||
if ( AddRapidMove( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
else {
|
||||
if ( AddRapidStart( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
SetFlag( 0) ;
|
||||
// 2 -> punto fuori (se diverso dal precedente)
|
||||
if ( m_Params.m_dStartPos < dAppr) {
|
||||
@@ -1291,6 +1321,19 @@ Drilling::DoStandardDrilling( const Hole& hole, SelData Id, int nPathId)
|
||||
SetFlag( 104) ; // risalita sopra il foro
|
||||
if ( AddLinearMove( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
// 7 -> punto fuori (se uso aggregato da sotto)
|
||||
if ( m_bAggrBottom) {
|
||||
SetFlag( 0) ;
|
||||
Point3d ptP0 = ptP1 + m_vtAux * ( m_dDistBottom + dAgbEncH + dAppr) ;
|
||||
Point3d ptP00 = ptP0 + Z_AX * ( dAgbEncV + m_TParams.m_dLen + dAppr + dTExtrLen) ;
|
||||
if ( AddRapidMove( ptP0, MCH_CL_AGB_OUT) == GDB_ID_NULL)
|
||||
return false ;
|
||||
Vector3d vtAux = m_vtAux ;
|
||||
vtAux.Rotate( Z_AX, 90) ;
|
||||
SetAuxDir( vtAux) ;
|
||||
if ( AddRapidMove( ptP00, MCH_CL_AGB_UP) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
|
||||
// reset dati di movimento
|
||||
ResetMoveData() ;
|
||||
@@ -1321,6 +1364,13 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId)
|
||||
bool bEndSlow = ( dEndSlowLen > EPS_SMALL) ;
|
||||
// determino alcune caratteristiche dell'utensile
|
||||
double dTExtrLen = max( 0.0, m_TParams.m_dTLen - m_TParams.m_dLen) ;
|
||||
// se con aggregato da sotto, ne recupero alcuni dati
|
||||
double dAgbEncH = 0 ;
|
||||
double dAgbEncV = 0 ;
|
||||
if ( m_bAggrBottom) {
|
||||
m_pGeomDB->GetInfo( m_pMchMgr->GetHeadId( m_TParams.m_sHead), "AGB_ENCH", dAgbEncH) ;
|
||||
m_pGeomDB->GetInfo( m_pMchMgr->GetHeadId( m_TParams.m_sHead), "AGB_ENCV", dAgbEncV) ;
|
||||
}
|
||||
// imposto dati comuni
|
||||
SetPathId( nPathId) ;
|
||||
SetToolDir( hole.vtDir) ;
|
||||
@@ -1328,8 +1378,26 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId)
|
||||
SetFlag( 1) ;
|
||||
double dAppr = m_pMchMgr->GetCurrMachiningsMgr()->GetSafeZ() ;
|
||||
Point3d ptP1 = hole.ptIni + hole.vtDir * ( dAppr + dTExtrLen) ;
|
||||
if ( AddRapidStart( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
if ( m_bAggrBottom) {
|
||||
Point3d ptP0 = ptP1 + m_vtAux * ( m_dDistBottom + dAgbEncH + dAppr) ;
|
||||
Point3d ptP00 = ptP0 + Z_AX * ( dAgbEncV + m_TParams.m_dLen + dAppr + dTExtrLen) ;
|
||||
Vector3d vtAux = m_vtAux ;
|
||||
vtAux.Rotate( Z_AX, 90) ;
|
||||
SetAuxDir( vtAux) ;
|
||||
vtAux.Rotate( Z_AX, - 90) ;
|
||||
if ( AddRapidStart( ptP00, MCH_CL_AGB_DWN) == GDB_ID_NULL)
|
||||
return false ;
|
||||
SetFlag( 0) ;
|
||||
SetAuxDir( vtAux) ;
|
||||
if ( AddRapidMove( ptP0, MCH_CL_AGB_IN) == GDB_ID_NULL)
|
||||
return false ;
|
||||
if ( AddRapidMove( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
else {
|
||||
if ( AddRapidStart( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
SetFlag( 0) ;
|
||||
// 2 -> punto fuori (se diverso dal precedente)
|
||||
if ( m_Params.m_dStartPos < dAppr) {
|
||||
@@ -1445,6 +1513,20 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId)
|
||||
if ( AddLinearMove( ptP1) == GDB_ID_NULL)
|
||||
return false ;
|
||||
|
||||
// 7 -> punto fuori (se uso aggregato da sotto)
|
||||
if ( m_bAggrBottom) {
|
||||
SetFlag( 0) ;
|
||||
Point3d ptP0 = ptP1 + m_vtAux * ( m_dDistBottom + dAgbEncH + dAppr) ;
|
||||
Point3d ptP00 = ptP0 + Z_AX * ( dAgbEncV + m_TParams.m_dLen + dAppr + dTExtrLen) ;
|
||||
if ( AddRapidMove( ptP0, MCH_CL_AGB_OUT) == GDB_ID_NULL)
|
||||
return false ;
|
||||
Vector3d vtAux = m_vtAux ;
|
||||
vtAux.Rotate( Z_AX, 90) ;
|
||||
SetAuxDir( vtAux) ;
|
||||
if ( AddRapidMove( ptP00, MCH_CL_AGB_UP) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
|
||||
// reset dati di movimento
|
||||
ResetMoveData() ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user