diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index d44e07e..1b76da1 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -41,6 +41,7 @@ #include "/EgtDev/Include/EGkDistPointSurfTm.h" #include "/EgtDev/Include/EGkIntersPlaneSurfTm.h" #include "/EgtDev/Include/EGkStmFromCurves.h" +#include "/EgtDev/Include/EXeExecutor.h" // per far dimenticare macro di WinUser.h #undef GetClassName @@ -975,6 +976,7 @@ SurfRoughing::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) bool SurfRoughing::VerifyGeometry( SelData Id, int& nSubs) { + // ammessi : curve o superfici const IGeoObj* pGObj = m_pGeomDB->GetGeoObj( Id.nId) ; if ( pGObj == nullptr) @@ -1188,6 +1190,9 @@ SurfRoughing::Chain( int nGrpDestId) bool SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) { + // aggiorno la ProgressBar del 5% per simulare l'inizio della funzione + ExeProcessEvents( 5, 0) ; + // verifico sia una curva chiusa (deve delimitare l'area da svuotare) int nCrvId = m_pGeomDB->GetFirstInGroup( nPathId) ; if ( m_pGeomDB->GetGeoType( nCrvId) != CRV_COMPO) @@ -1377,8 +1382,11 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) // su tutti gli step ricavati, calcolo le PolyLine delle Silhouette int nPocket = 0 ; // numero effettivo di Pocketing calcolate + int nProgressBarStep = 0 ; // step per progressBar for ( auto it = vStepInfo.begin() ; it != vStepInfo.end() ; ++ it) { + ++ nProgressBarStep ; // aggiorno step per progressBar + /* ******************** Regione estesa di lavoro ******************** */ // regione di lavoro allo step corrente ( definita dalla curva di lavoro ) PtrOwner pSfr( CreateSurfFlatRegion()) ; @@ -1520,7 +1528,12 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) ++ nPocket ; vPocket.emplace_back( make_pair( nNew_SfrPock_Id, nNew_SfrLimit_Id)) ; + // aggiorno la progressBar + ExeProcessEvents( 5 + nProgressBarStep * 45 / int( vStepInfo.size()), 100) ; + } + else // aggiorno la progressBar + ExeProcessEvents( 5 + nProgressBarStep * 45 / int( vStepInfo.size()), 100) ; } // assegno il vettore estrazione al gruppo del percorso @@ -1930,7 +1943,9 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co } } } - ++ nCurrStep ; + ++ nCurrStep ; + // aggiorno la progressBar + ExeProcessEvents( 50 + nCurrStep * 50 / int( vPocket.size()), 100) ; } return true ;