diff --git a/GenMachining.cpp b/GenMachining.cpp index f1b587a..5943244 100644 --- a/GenMachining.cpp +++ b/GenMachining.cpp @@ -970,7 +970,7 @@ GenMachining::ProcessPath( int nPathId, int nPvId, int nClId) // recupero il box del grezzo in globale BBox3d b3Raw ; - if ( ! GetRawGlobBox( m_nPhase, nPathId, b3Raw) || b3Raw.IsEmpty()) { + if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dDiam, b3Raw) || b3Raw.IsEmpty()) { LOG_INFO( GetEMkLogger(), "Error in GenMachining : Empty RawBox") ; return false ; } diff --git a/Milling.cpp b/Milling.cpp index 9a4cfb3..66a0186 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -1146,7 +1146,7 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId) // recupero il box del grezzo in globale BBox3d b3Raw ; - if ( ! GetRawGlobBox( m_nPhase, nPathId, b3Raw) || b3Raw.IsEmpty()) { + if ( ! GetRawGlobBox( m_nPhase, nPathId, 0.5 * m_TParams.m_dDiam, b3Raw) || b3Raw.IsEmpty()) { LOG_INFO( GetEMkLogger(), "Error in Milling : Empty RawBox") ; return false ; } diff --git a/Operation.cpp b/Operation.cpp index 4ada86a..2852c42 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -358,7 +358,7 @@ Operation::GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, dou //---------------------------------------------------------------------------- bool -Operation::GetRawGlobBox( int nPhase, int nPathId, BBox3d& b3Raw) +Operation::GetRawGlobBox( int nPhase, int nPathId, double dToler, BBox3d& b3Raw) { if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) return false ; @@ -368,7 +368,7 @@ Operation::GetRawGlobBox( int nPhase, int nPathId, BBox3d& b3Raw) BBox3d b3Compo ; if ( ! m_pGeomDB->GetGlobalBBox( nPathId, b3Compo)) return false ; - b3Compo.Expand( 10 * EPS_SMALL, 10 * EPS_SMALL, 0) ; + b3Compo.Expand( dToler, dToler, 0) ; int nRawId = m_pMchMgr->GetFirstRawPart() ; while ( nRawId != GDB_ID_NULL) { // verifico che il grezzo compaia nella fase diff --git a/Operation.h b/Operation.h index 297d960..a975dca 100644 --- a/Operation.h +++ b/Operation.h @@ -64,7 +64,7 @@ class Operation : public IUserObj const Vector3d& vtDir, double dRad, double& dElev) ; bool GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dDist) ; bool GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, double& dRbDist) ; - bool GetRawGlobBox( int nPhase, int nPathId, BBox3d& b3Raw) ; + bool GetRawGlobBox( int nPhase, int nPathId, double dToler, BBox3d& b3Raw) ; bool GetInitialAxesValues( DBLVECTOR& vAxVal) ; bool GetClPathInitialAxesValues( int nClPathId, DBLVECTOR& vAxVal) ; diff --git a/SawFinishing.cpp b/SawFinishing.cpp index d74fbfe..93121ef 100644 --- a/SawFinishing.cpp +++ b/SawFinishing.cpp @@ -797,7 +797,7 @@ SawFinishing::CalculateAlongToolPath( int nAuxId, int nClId) // recupero il box del grezzo in globale BBox3d b3Raw ; - if ( ! GetRawGlobBox( m_nPhase, nGuideId, b3Raw) || b3Raw.IsEmpty()) { + if ( ! GetRawGlobBox( m_nPhase, nGuideId, 2 * m_TParams.m_dThick, b3Raw) || b3Raw.IsEmpty()) { LOG_INFO( GetEMkLogger(), "Error in SawFinishing : Empty RawBox") ; return false ; } @@ -946,7 +946,7 @@ SawFinishing::CalculateAcrossToolPath( int nAuxId, int nClId) // recupero il box del grezzo in globale BBox3d b3Raw ; - if ( ! GetRawGlobBox( m_nPhase, nGuideId, b3Raw) || b3Raw.IsEmpty()) { + if ( ! GetRawGlobBox( m_nPhase, nGuideId, 2 * m_TParams.m_dThick, b3Raw) || b3Raw.IsEmpty()) { LOG_INFO( GetEMkLogger(), "Error in SawFinishing : Empty RawBox") ; return false ; } @@ -1168,7 +1168,7 @@ SawFinishing::CalculateGuideLine( int nGuideId, Point3d& ptGdStart, Point3d& ptG // recupero il box del grezzo in globale BBox3d b3Raw ; - if ( ! GetRawGlobBox( m_nPhase, nGuideId, b3Raw) || b3Raw.IsEmpty()) { + if ( ! GetRawGlobBox( m_nPhase, nGuideId, 2 * m_TParams.m_dThick, b3Raw) || b3Raw.IsEmpty()) { LOG_INFO( GetEMkLogger(), "Error in SawFinishing : Empty RawBox") ; return false ; } diff --git a/SawRoughing.cpp b/SawRoughing.cpp index ea952dc..baaf7dc 100644 --- a/SawRoughing.cpp +++ b/SawRoughing.cpp @@ -783,7 +783,7 @@ SawRoughing::CalculateToolPath( int nAuxId, int nClId) // recupero il box del grezzo in globale e nel riferimento locale delle sezioni BBox3d b3Raw ; - if ( ! GetRawGlobBox( m_nPhase, nGuideId, b3Raw) || b3Raw.IsEmpty()) { + if ( ! GetRawGlobBox( m_nPhase, nGuideId, 2 * m_TParams.m_dThick, b3Raw) || b3Raw.IsEmpty()) { LOG_INFO( GetEMkLogger(), "Error in SawRoughing : Empty RawBox") ; return false ; }