EgtMachKernel :

- correzioni a calcolo elevazione per percorsi di lavoro appena fuori dal grezzo
- correzioni a recupero grezzo per percorsi di lavoro appena fuori dal grezzo.
This commit is contained in:
Dario Sassi
2018-10-05 14:04:38 +00:00
parent 50ff73a757
commit 42ec369b8f
5 changed files with 15 additions and 12 deletions
+2 -2
View File
@@ -1153,7 +1153,7 @@ Chiseling::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero il box del grezzo in globale
BBox3d b3Raw ;
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dDiam, b3Raw) || b3Raw.IsEmpty()) {
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dTDiam, b3Raw) || b3Raw.IsEmpty()) {
m_pMchMgr->SetLastError( 2903, "Error in Chiseling : Empty RawBox") ;
return false ;
}
@@ -1161,7 +1161,7 @@ Chiseling::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero distanza da fondo dei grezzi interessati dal percorso
double dRbDist = 0 ;
if ( AreSameVectorApprox( vtExtr, Z_AX)) {
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dDiam, dRbDist))
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dTDiam, dRbDist))
return false ;
}
+2 -2
View File
@@ -1398,7 +1398,7 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero il box del grezzo in globale
BBox3d b3Raw ;
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dDiam, b3Raw) || b3Raw.IsEmpty()) {
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dTDiam, b3Raw) || b3Raw.IsEmpty()) {
m_pMchMgr->SetLastError( 2303, "Error in Milling : Empty RawBox") ;
return false ;
}
@@ -1406,7 +1406,7 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero distanza da fondo dei grezzi interessati dal percorso
double dRbDist = 0 ;
if ( AreSameVectorApprox( vtExtr, Z_AX)) {
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dDiam, dRbDist))
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dTDiam, dRbDist))
return false ;
}
+2 -2
View File
@@ -1111,7 +1111,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero il box del grezzo in globale
BBox3d b3Raw ;
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dDiam, b3Raw) || b3Raw.IsEmpty()) {
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dTDiam, b3Raw) || b3Raw.IsEmpty()) {
m_pMchMgr->SetLastError( 2503, "Error in Mortising : Empty RawBox") ;
return false ;
}
@@ -1119,7 +1119,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero distanza da fondo dei grezzi interessati dal percorso
double dRbDist = 0 ;
if ( AreSameVectorApprox( vtExtr, Z_AX)) {
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dDiam, dRbDist))
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dTDiam, dRbDist))
return false ;
}
+7 -4
View File
@@ -34,6 +34,9 @@
using namespace std ;
//----------------------------------------------------------------------------
const double MAX_DIST_RAW = 200.0 ;
//----------------------------------------------------------------------------
bool
Operation::SetOwner( int nId, IGeomDB* pGDB)
@@ -124,8 +127,8 @@ Operation::GetElevation( int nPhase, const Point3d& ptP,
else if ( Info.dCosDN > - COS_ORTO_ANG_ZERO) {
dElev = min( dElev, Info.dU) ;
}
// se altrimenti è la prima ed entra, salto tutto
else if ( i == 0 && Info.dCosDN < - COS_ORTO_ANG_ZERO)
// se altrimenti è la prima, distante ed entra, salto tutto
else if ( i == 0 && Info.dU > MAX_DIST_RAW && Info.dCosDN < - COS_ORTO_ANG_ZERO)
break ;
}
}
@@ -199,8 +202,8 @@ Operation::GetElevation( int nPhase, const Point3d& ptP1, const Point3d& ptP2,
else if ( Info.dCosDN > - COS_ORTO_ANG_ZERO) {
dElevP = min( dElevP, Info.dU) ;
}
// se altrimenti è la prima ed entra, salto tutto
else if ( i == 0 && Info.dCosDN < - COS_ORTO_ANG_ZERO)
// se altrimenti è la prima, distante ed entra, salto tutto
else if ( i == 0 && Info.dU > MAX_DIST_RAW && Info.dCosDN < - COS_ORTO_ANG_ZERO)
break ;
}
}
+2 -2
View File
@@ -1232,7 +1232,7 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero il box del grezzo in globale
BBox3d b3Raw ;
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dDiam, b3Raw) || b3Raw.IsEmpty()) {
if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dTDiam, b3Raw) || b3Raw.IsEmpty()) {
m_pMchMgr->SetLastError( 2405, "Error in Pocketing : Empty RawBox") ;
return false ;
}
@@ -1240,7 +1240,7 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId)
// recupero distanza da fondo dei grezzi interessati dal percorso
double dRbDist = 0 ;
if ( AreSameVectorApprox( vtExtr, Z_AX)) {
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dDiam, dRbDist))
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, m_TParams.m_dTDiam, dRbDist))
return false ;
}