EgtMachKernel :
- in svuotature gestione SpiralIn e SpiralOut ottimizzate per cerchi - in svuotatura aggiunti attacchi zigzag e elica e uscita Glide - in contornatura miglioramenti vari.
This commit is contained in:
+23
-11
@@ -30,6 +30,16 @@
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//------------------------------ Errors --------------------------------------
|
||||
// 2101 = "Error in Drilling : UpdateToolData failed"
|
||||
// 2102 = "Error in Drilling : Offset not computable"
|
||||
// 2103 = "Error in Drilling : Overlap not computable"
|
||||
// 2104 = "Error in Drilling : Depth not computable"
|
||||
// 2105 = "Error in Drilling : Drill with zero depth"
|
||||
// 2106 = "Error in Drilling : Entity xx skipped because missing aggregate from bottom"
|
||||
// 2107 = "Error in Drilling : Entity xx skipped because too far from part sides"
|
||||
// 2108 = "Error in Drilling : Chaining failed"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
struct Hole
|
||||
{
|
||||
@@ -405,7 +415,7 @@ Drilling::Preview( bool bRecalc)
|
||||
|
||||
// aggiorno dati geometrici dell'utensile
|
||||
if ( ! UpdateToolData()) {
|
||||
LOG_INFO( GetEMkLogger(), "Error in Drilling : UpdateToolData failed") ;
|
||||
m_pMchMgr->SetLastError( 2101, "Error in Drilling : UpdateToolData failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -446,7 +456,7 @@ Drilling::Apply( bool bRecalc)
|
||||
|
||||
// aggiorno dati geometrici dell'utensile
|
||||
if ( ! UpdateToolData()) {
|
||||
LOG_INFO( GetEMkLogger(), "Error in Drilling : UpdateToolData failed") ;
|
||||
m_pMchMgr->SetLastError( 2101, "Error in Drilling : UpdateToolData failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -535,8 +545,10 @@ Drilling::AlongCurveProcess( bool bRecalc, int nPvId, int nClId)
|
||||
}
|
||||
|
||||
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
|
||||
if ( bChain && ! Chain( nAuxId))
|
||||
if ( bChain && ! Chain( nAuxId)) {
|
||||
m_pMchMgr->SetLastError( 2108, "Error in Drilling : Chaining failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
// calcolo ogni singola catena
|
||||
int nPathId = m_pGeomDB->GetFirstGroupInGroup( nAuxId) ;
|
||||
@@ -727,12 +739,12 @@ Drilling::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
ExeLuaSetGlobNumVar( "D", m_TParams.m_dDiam) ;
|
||||
double dOffset ;
|
||||
if ( ! ExeLuaEvalNumExpr( m_Params.m_sOffset, &dOffset)) {
|
||||
LOG_INFO( GetEMkLogger(), "Offset not computable by Drilling") ;
|
||||
m_pMchMgr->SetLastError( 2102, "Error in Drilling : Offset not computable") ;
|
||||
return false ;
|
||||
}
|
||||
double dOverlap ;
|
||||
if ( ! ExeLuaEvalNumExpr( m_Params.m_sOverlap, &dOverlap)) {
|
||||
LOG_INFO( GetEMkLogger(), "Overlap not computable by Drilling") ;
|
||||
m_pMchMgr->SetLastError( 2103, "Error in Drilling : Overlap not computable") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -1153,11 +1165,11 @@ Drilling::GetHoleData( SelData Id, Hole& hole)
|
||||
double dDepth ;
|
||||
string sMyDepth = m_Params.m_sDepth ;
|
||||
if ( ! ExeLuaEvalNumExpr( ToUpper( sMyDepth), &dDepth)) {
|
||||
LOG_INFO( GetEMkLogger(), "Depth not computable by Drilling") ;
|
||||
m_pMchMgr->SetLastError( 2104, "Error in Drilling : Depth not computable") ;
|
||||
return false ;
|
||||
}
|
||||
if ( fabs( dDepth) < EPS_SMALL) {
|
||||
LOG_INFO( GetEMkLogger(), "Drill with zero depth") ;
|
||||
m_pMchMgr->SetLastError( 2105, "Error in Drilling : Drill with zero depth") ;
|
||||
return false ;
|
||||
}
|
||||
// assegno Id
|
||||
@@ -1202,8 +1214,8 @@ Drilling::VerifyHoleFromBottom( const Hole& hole, SelData Id)
|
||||
int nHeadId = m_pMchMgr->GetHeadId( m_TParams.m_sHead) ;
|
||||
int nAgbType ;
|
||||
if ( ! m_pGeomDB->GetInfo( nHeadId, "AGB_TYPE", nAgbType) || nAgbType == 0) {
|
||||
string sOut = "Entity " + ToString( Id) + " skipped by Drilling : missing aggregate from bottom" ;
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str()) ;
|
||||
string sOut = "Error in Drilling : Entity " + ToString( Id) + " skipped because missing aggregate from bottom" ;
|
||||
m_pMchMgr->SetLastError( 2106, sOut.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
// recupero la massima distanza consentita dal rinvio
|
||||
@@ -1213,8 +1225,8 @@ Drilling::VerifyHoleFromBottom( const Hole& hole, SelData Id)
|
||||
double dDist ;
|
||||
Vector3d vtDir ;
|
||||
if ( ! GetMinDistanceFromRawSide( m_nPhase, hole.ptIni, dDist, vtDir) || dDist > dAgbDmax) {
|
||||
string sOut = "Entity " + ToString( Id) + " skipped by Drilling : too far from part sides" ;
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str()) ;
|
||||
string sOut = "Error in Drilling : Entity " + ToString( Id) + " skipped because too far from part sides" ;
|
||||
m_pMchMgr->SetLastError( 2107, sOut.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
// assegno direzione di accesso e segnalazione di utilizzo aggregato da sotto
|
||||
|
||||
Reference in New Issue
Block a user