EgtMachKernel :
- aggiustamenti per modifiche a CollisionAvoid e calcolo silhouette che lo sfrutta.
This commit is contained in:
+5
-5
@@ -1388,9 +1388,9 @@ SurfFinishing::AddZigZag( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf,
|
||||
while ( currPU != vPntU.end()) {
|
||||
auto nextPU = next( currPU) ;
|
||||
bool bNext = ( nextPU != vPntU.end()) ;
|
||||
bool bNextDown = ( bNext ? nextPU->second > -m_Params.m_dApprox : true) ;
|
||||
bool bNextDown = ( bNext ? nextPU->second < m_Params.m_dApprox : true) ;
|
||||
// punto corrente è al minimo
|
||||
if ( currPU->second > -m_Params.m_dApprox) {
|
||||
if ( currPU->second < m_Params.m_dApprox) {
|
||||
// se precedente e successivo al minimo, cancello e basta
|
||||
if ( bPrevDwn && bNextDown) {
|
||||
if ( ! ptPrev.IsValid() || abs( currPU->first.y - ptPrev.y) > 10 * EPS_SMALL)
|
||||
@@ -1855,9 +1855,9 @@ SurfFinishing::AddOneWay( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf,
|
||||
while ( currPU != vPntU.end()) {
|
||||
auto nextPU = next( currPU) ;
|
||||
bool bNext = ( nextPU != vPntU.end()) ;
|
||||
bool bNextDown = ( bNext ? nextPU->second > -m_Params.m_dApprox : true) ;
|
||||
bool bNextDown = ( bNext ? nextPU->second < m_Params.m_dApprox : true) ;
|
||||
// punto corrente è al minimo
|
||||
if ( currPU->second > -m_Params.m_dApprox) {
|
||||
if ( currPU->second < m_Params.m_dApprox) {
|
||||
// se precedente e successivo al minimo, cancello e basta
|
||||
if ( bPrevDwn && bNextDown) {
|
||||
if ( ! ptPrev.IsValid() || abs( currPU->first.y - ptPrev.y) > 10 * EPS_SMALL)
|
||||
@@ -2744,7 +2744,7 @@ SurfFinishing::GetLastGoodPoint( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSur
|
||||
auto currPU = lstPntU.begin() ;
|
||||
while ( ! bFound && currPU != lstPntU.end()) {
|
||||
auto nextPU = next( currPU) ;
|
||||
if ( nextPU == lstPntU.end() || nextPU->second < -m_Params.m_dApprox){
|
||||
if ( nextPU == lstPntU.end() || nextPU->second > m_Params.m_dApprox){
|
||||
bFound = true ;
|
||||
ptP1 = GetToGlob( currPU->first - vtToolL * m_TParams.m_dLen, frSurf) ;
|
||||
}
|
||||
|
||||
+5
-3
@@ -1236,8 +1236,10 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId)
|
||||
}
|
||||
Frame3d frPlanes ;
|
||||
frPlanes.Set( plPlane.GetPoint(), vtTool) ;
|
||||
const double SILH_TOL = 0.5 ;
|
||||
CAvParSilhouettesSurfTm cavParSilh( vpStm, frPlanes, SILH_TOL) ;
|
||||
const double SILH_TOL = 1.0 ;
|
||||
PtrOwner<ICAvParSilhouettesSurfTm> pCavParSilh( CreateCAvParSilhouettesSurfTm()) ;
|
||||
if ( IsNull( pCavParSilh) || ! pCavParSilh->SetData( vpStm, frPlanes, SILH_TOL))
|
||||
return false ;
|
||||
|
||||
// calcolo le regioni di svuotatura alle varie quote come differenza tra regioni da lavorare e regioni di silhouette
|
||||
INTVECTOR vPocket ;
|
||||
@@ -1341,7 +1343,7 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId)
|
||||
/* *************************** Silhouette **************************** */
|
||||
// determino la regione da non lavorare e la sottraggo
|
||||
POLYLINEVECTOR vPL ;
|
||||
if ( ! cavParSilh.GetSilhouette( ( it->second).dDepth - GetOffsL(), vPL)) {
|
||||
if ( ! pCavParSilh->GetSilhouette( ( it->second).dDepth - GetOffsL(), vPL)) {
|
||||
m_pMchMgr->SetLastError( 3024, "Error in SurfRoughing : region not computable") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user