EgtMachKernel 2.2b2 :

- in fresature e mortasature se elevazione troppo alta riduco sempre affondamnto con warning e non errore.
This commit is contained in:
Dario Sassi
2020-02-14 11:34:57 +00:00
parent dfbaa76eac
commit cc930cd503
4 changed files with 62 additions and 76 deletions
BIN
View File
Binary file not shown.
+18 -36
View File
@@ -697,12 +697,6 @@ Milling::Apply( bool bRecalc, bool bPostApply)
m_dTHoldDiam = 0 ;
m_pGeomDB->GetInfo( nToolId, TTH_DIAM, m_dTHoldDiam) ;
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
if ( bChain && ! Chain( nAuxId)) {
m_pMchMgr->SetLastError( 2315, "Error in Milling : Chaining failed") ;
return false ;
}
// recupero gruppo per geometria di lavorazione (Cutter Location)
int nClId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL) ;
// se non c'è, lo aggiungo
@@ -727,6 +721,12 @@ Milling::Apply( bool bRecalc, bool bPostApply)
if ( ! bOk)
return false ;
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
if ( bChain && ! Chain( nAuxId)) {
m_pMchMgr->SetLastError( 2315, "Error in Milling : Chaining failed") ;
return false ;
}
// assegno ingombri dei vari percorsi di lavorazione e della lavorazione nel suo complesso
CalcAndSetBBox( nClId) ;
@@ -1673,21 +1673,12 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
}
// se l'elevazione supera la capacità dell'utensile
if ( dElev > m_TParams.m_dMaxMat + EPS_SMALL) {
// se affondamento riducibile : segnalo, riduco e continuo
if ( dDepth + max( dThick, 0.0) > m_TParams.m_dMaxMat) {
string sInfo = "Warning in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ;
m_pMchMgr->SetWarning( 2358, sInfo) ;
dDepth = m_TParams.m_dMaxMat - max( dThick, 0.0) ;
dElev = m_TParams.m_dMaxMat ;
}
// altrimenti errore
else {
string sInfo = "Error in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ;
m_pMchMgr->SetLastError( 2305, sInfo) ;
return false ;
}
// segnalo, riduco e continuo
string sInfo = "Warning in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ;
m_pMchMgr->SetWarning( 2358, sInfo) ;
dDepth = m_TParams.m_dMaxMat - max( dThick, 0.0) ;
dElev = m_TParams.m_dMaxMat ;
}
}
// altrimenti lavorazione a step
@@ -1703,21 +1694,12 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
}
// se l'elevazione supera il massimo affondamento dell'utensile
if ( dElev > dMaxDepth + EPS_SMALL) {
// se affondamento riducibile : segnalo, riduco e continuo
if ( dDepth + max( dThick, 0.0) > dElev - dMaxDepth) {
string sInfo = "Warning in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxDepth (" + ToString( dMaxDepth, 1) + ")" ;
m_pMchMgr->SetWarning( 2358, sInfo) ;
dDepth -= ( dElev - dMaxDepth) ;
dElev = dMaxDepth ;
}
// altrimenti errore
else {
string sInfo = "Error in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxDepth (" + ToString( dMaxDepth, 1) + ")" ;
m_pMchMgr->SetLastError( 2323, sInfo) ;
return false ;
}
// segnalo, riduco e continuo
string sInfo = "Warning in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxDepth (" + ToString( dMaxDepth, 1) + ")" ;
m_pMchMgr->SetWarning( 2358, sInfo) ;
dDepth -= ( dElev - dMaxDepth) ;
dElev = dMaxDepth ;
}
}
}
+43 -39
View File
@@ -36,16 +36,15 @@ using namespace std ;
// 2502 = "Error in Mortising : Offset not computable"
// 2503 = "Error in Mortising : Empty RawBox"
// 2504 = "Error in Mortising : Depth not computable"
// 2505 = "Error in Mortising : machining depth (xxx) bigger than MaxMaterial (yyy)"
// 2506 = "Error in Mortising : Entity GetElevation"
// 2507 = "Error in Mortising : Chaining failed"
// 2508 = "Error in Mortising : axes values not calculable"
// 2509 = "Error in Mortising : outstroke xx"
// 2510 = "Error in Mortising : link movements not calculable"
// 2511 = "Error in Mortising : link outstroke xx"
// 2512 = "Error in Mortising : post apply not calculable"
// 2513 = "Error in Mortising : Tool MaxMaterial too small (xx)"
// 2514 = "Error in Mortising : Closed path not allowed"
// 2505 = "Error in Mortising : Entity GetElevation"
// 2506 = "Error in Mortising : Chaining failed"
// 2507 = "Error in Mortising : axes values not calculable"
// 2508 = "Error in Mortising : outstroke xx"
// 2509 = "Error in Mortising : link movements not calculable"
// 2510 = "Error in Mortising : link outstroke xx"
// 2511 = "Error in Mortising : post apply not calculable"
// 2512 = "Error in Mortising : Tool MaxMaterial too small (xx)"
// 2513 = "Error in Mortising : Closed path not allowed"
// 2551 = "Warning in Mortising : Skipped entity (xx)"
// 2552 = "Warning in Mortising : Plunges not found"
// 2553 = "Warning in Mortising : Tool name changed (xx)"
@@ -476,7 +475,7 @@ Mortising::Preview( bool bRecalc)
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
if ( bChain && ! Chain( nAuxId)) {
m_pMchMgr->SetLastError( 2507, "Error in Mortising : Chaining failed") ;
m_pMchMgr->SetLastError( 2506, "Error in Mortising : Chaining failed") ;
return false ;
}
// recupero gruppo per geometria di Preview
@@ -549,12 +548,6 @@ Mortising::Apply( bool bRecalc, bool bPostApply)
bChain = true ;
}
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
if ( bChain && ! Chain( nAuxId)) {
m_pMchMgr->SetLastError( 2507, "Error in Mortising : Chaining failed") ;
return false ;
}
// recupero gruppo per geometria di lavorazione (Cutter Location)
int nClId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL) ;
// se non c'è, lo aggiungo
@@ -568,6 +561,12 @@ Mortising::Apply( bool bRecalc, bool bPostApply)
else
m_pGeomDB->EmptyGroup( nClId) ;
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
if ( bChain && ! Chain( nAuxId)) {
m_pMchMgr->SetLastError( 2506, "Error in Mortising : Chaining failed") ;
return false ;
}
// lavoro ogni singola catena
bool bOk = true ;
int nPathId = m_pGeomDB->GetFirstGroupInGroup( nAuxId) ;
@@ -625,9 +624,9 @@ Mortising::Update( bool bPostApply)
if ( ! CalculateAxesValues( sHint, true)) {
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
if ( sInfo.empty())
m_pMchMgr->SetLastError( 2508, "Error in Mortising : axes values not calculable") ;
m_pMchMgr->SetLastError( 2507, "Error in Mortising : axes values not calculable") ;
else
m_pMchMgr->SetLastError( 2509, "Error in Mortising : outstroke ") ;
m_pMchMgr->SetLastError( 2508, "Error in Mortising : outstroke ") ;
return false ;
}
@@ -635,15 +634,15 @@ Mortising::Update( bool bPostApply)
if ( ! AdjustStartEndMovements()) {
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
if ( sInfo.empty())
m_pMchMgr->SetLastError( 2510, "Error in Mortising : link movements not calculable") ;
m_pMchMgr->SetLastError( 2509, "Error in Mortising : link movements not calculable") ;
else
m_pMchMgr->SetLastError( 2511, "Error in Mortising : link outstroke ") ;
m_pMchMgr->SetLastError( 2510, "Error in Mortising : link outstroke ") ;
return false ;
}
// esecuzione eventuali personalizzazioni
if ( bPostApply && ! PostApply()) {
m_pMchMgr->SetLastError( 2512, "Error in Mortising : post apply not calculable") ;
m_pMchMgr->SetLastError( 2511, "Error in Mortising : post apply not calculable") ;
return false ;
}
@@ -1127,7 +1126,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
// verifico non sia un percorso chiuso
if ( pCompo->IsClosed()) {
m_pMchMgr->SetLastError( 2514, "Error in Mortising : Closed path not allowed") ;
m_pMchMgr->SetLastError( 2513, "Error in Mortising : Closed path not allowed") ;
return false ;
}
@@ -1253,7 +1252,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
if ( m_TParams.m_dMaxMat < dElev && m_TParams.m_dMaxMat < MIN_MAXMAT) {
string sInfo = "Error in Mortising : Tool MaxMaterial too small (" +
ToString( m_TParams.m_dMaxMat, 2) + ")" ;
m_pMchMgr->SetLastError( 2513, sInfo) ;
m_pMchMgr->SetLastError( 2512, sInfo) ;
return false ;
}
@@ -1268,20 +1267,25 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
}
// se lavorazione singola e l'elevazione supera la capacità dell'utensile
if ( ( dOkStep < EPS_SMALL || dOkStep > dElev) && dElev > m_TParams.m_dMaxMat + EPS_SMALL) {
// se affondamento riducibile : segnalo, riduco e continuo
if ( dDepth + max( dThick, 0.0) > m_TParams.m_dMaxMat) {
dDepth = m_TParams.m_dMaxMat - max( dThick, 0.0) ;
// segnalo, riduco e continuo
dDepth = m_TParams.m_dMaxMat - max( dThick, 0.0) ;
string sInfo = "Warning in Mortising : machining depth (" + ToString( dElev, 1) +
") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ;
m_pMchMgr->SetWarning( 2558, sInfo) ;
}
// altrimenti lavorazione a step
else {
// massimo affondamento dell'utensile
double dMaxDepth = m_TParams.m_dMaxMat ;
// se l'elevazione supera il massimo affondamento dell'utensile
if ( dElev > dMaxDepth + EPS_SMALL) {
// segnalo, riduco e continuo
string sInfo = "Warning in Mortising : machining depth (" + ToString( dElev, 1) +
") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ;
") bigger than MaxDepth (" + ToString( dMaxDepth, 1) + ")" ;
m_pMchMgr->SetWarning( 2558, sInfo) ;
}
// altrimenti errore
else {
string sInfo = "Error in Mortising : machining depth (" + ToString( dElev, 1) +
") bigger than MaxMaterial (" + ToString( m_TParams.m_dMaxMat, 1) + ")" ;
m_pMchMgr->SetLastError( 2505, sInfo) ;
return false ;
}
dDepth -= ( dElev - dMaxDepth) ;
dElev = dMaxDepth ;
}
}
}
@@ -1364,7 +1368,7 @@ Mortising::CalcPathElevation( const ICurveComposite* pCompo, const Vector3d& vtT
dElev = dCurrElev ;
}
else {
m_pMchMgr->SetLastError( 2506, "Error in Mortising : Entity GetElevation") ;
m_pMchMgr->SetLastError( 2505, "Error in Mortising : Entity GetElevation") ;
return false ;
}
// da una parte
@@ -1374,7 +1378,7 @@ Mortising::CalcPathElevation( const ICurveComposite* pCompo, const Vector3d& vtT
dElev = dCurrElev ;
}
else {
m_pMchMgr->SetLastError( 2506, "Error in Mortising : Entity GetElevation") ;
m_pMchMgr->SetLastError( 2505, "Error in Mortising : Entity GetElevation") ;
return false ;
}
// dall'altra parte
@@ -1384,7 +1388,7 @@ Mortising::CalcPathElevation( const ICurveComposite* pCompo, const Vector3d& vtT
dElev = dCurrElev ;
}
else {
m_pMchMgr->SetLastError( 2506, "Error in Mortising : Entity GetElevation") ;
m_pMchMgr->SetLastError( 2505, "Error in Mortising : Entity GetElevation") ;
return false ;
}
}
+1 -1
View File
@@ -359,7 +359,7 @@ MortisingData::VerifySolCh( int nVal) const
bool
MortisingData::VerifyFaceUse( int nVal) const
{
return ( nVal == MILL_FU_NONE ||
return ( nVal == MORTISE_FU_NONE ||
( nVal >= MORTISE_FU_PARAL_DOWN && nVal <= MORTISE_FU_PARAL_RIGHT)) ;
}