EgtGeomKernel :
- correzione percorsi tra più Chunk per SpiralIn/Out.
This commit is contained in:
+18
-9
@@ -3244,7 +3244,7 @@ CalcBoundedSmootedLink( const Point3d& ptStart, const Vector3d& vtStart, const P
|
||||
// per ogni intersezione j con l'offset dell'isola i
|
||||
for ( int j = 0 ; j < int( ccClass.size()) ; ++ j) {
|
||||
// se ho intersezione spezzo il segmento
|
||||
if ( ccClass[j].nClass == CRVC_OUT && ccClass.size() > 1) {
|
||||
if ( ccClass[j].nClass == CRVC_OUT && int( ccClass.size()) > 1) {
|
||||
Point3d ptS ;
|
||||
pCompo->GetPointD1D2( ccClass[j].dParS, ICurve::FROM_PLUS, ptS) ;
|
||||
double dOffS ;
|
||||
@@ -4909,15 +4909,18 @@ CalcSpiral( const ISurfFlatRegion* pSrfPock, const PocketParams& PockParams, int
|
||||
return false ;
|
||||
}
|
||||
|
||||
// alla prima iterazione svuoto la regione nReg-esima passata alla funzione CalcSpiral
|
||||
// se primo Offset
|
||||
if ( nIter == 0) {
|
||||
PtrOwner<ISurfFlatRegion> pSrfChunknReg( pSfrOffsVR->CloneChunk( nReg)) ;
|
||||
nReg = pSfrOffsVR->GetChunkCount() ; // aggiorno il nuovo valore delle regioni
|
||||
if ( IsNull( pSrfChunknReg)) // se supero i chunk ottenuti
|
||||
int my_nReg = nReg ;
|
||||
nReg = pSfrOffsVR->GetChunkCount() ; // aggiorno il nuovo valore delle regioni totali di primo Offset
|
||||
// gli Offset progressivi appartengono al Chunk nReg-esimo
|
||||
pSrfAct.Set( pSfrOffsVR->CloneChunk( my_nReg)) ;
|
||||
if ( IsNull( pSrfAct)) // se supero i chunk ottenuti
|
||||
return true ;
|
||||
pSfrOffsVR.Set( pSrfAct->Clone()) ;
|
||||
}
|
||||
|
||||
// numero di Chunk attuali
|
||||
// numero di Chunk attuali ( alla prima iterazione è l'nReg-esimo)
|
||||
int nChunks = pSfrOffsVR->GetChunkCount() ;
|
||||
|
||||
for ( int i = 0 ; i < nChunks ; ++ i) {
|
||||
@@ -4949,12 +4952,18 @@ CalcSpiral( const ISurfFlatRegion* pSrfPock, const PocketParams& PockParams, int
|
||||
// se ho trovato dei chunk, allora aggiorno l'Offset per la passata successiva
|
||||
if ( nChunks > 0) {
|
||||
// memorizzo il valore di Offset per l'iterazione successiva
|
||||
dOffsPrec = dOffs ;
|
||||
dOffs += PockParams.dSideStep ;
|
||||
if ( nIter != 0) {
|
||||
dOffsPrec = dOffs ;
|
||||
dOffs += PockParams.dSideStep ;
|
||||
}
|
||||
else {
|
||||
dOffsPrec = 0. ;
|
||||
dOffs = PockParams.dSideStep ;
|
||||
}
|
||||
}
|
||||
// se devo usare un Offset più piccolo...
|
||||
else if ( ! bSmallRad)
|
||||
dOffs = dOffsPrec + ( nIter == 0 ? PockParams.dRad + PockParams.dRadialOffset : PockParams.dRad) ; // superfluo, effettivamente non ho l'offset radiale
|
||||
dOffs = dOffsPrec + ( nIter == 0 ? PockParams.dRad + PockParams.dRadialOffset : PockParams.dRad) ;
|
||||
// altrimenti ho finito la regione da svuotare...
|
||||
else
|
||||
break ;
|
||||
|
||||
Reference in New Issue
Block a user