EgtGeomKernel :
- in CalcPocketing, corretta gestione aree non svuotate nel caso di assenza di smussi o di cambio tipo di lavorazione.
This commit is contained in:
+23
-6
@@ -4800,9 +4800,9 @@ CalcBoundedSmoothedLink( const Point3d& ptStart, const Vector3d& vtStart, const
|
||||
return false ;
|
||||
pCrvLink->Clear() ;
|
||||
|
||||
// se senza smusso, ritorno tratto lineare
|
||||
// se senza smusso (e non caso circonferenza), ritorno tratto lineare
|
||||
bSpecial = false ;
|
||||
if ( ! PockParams.bSmooth)
|
||||
if ( ! PockParams.bSmooth && dParMeet > EPS_ZERO)
|
||||
return CalcBoundedLink( ptStart, ptEnd, vCrvBorders, pCrvLink) ;
|
||||
|
||||
// inizializzo la curva di Link da restituire
|
||||
@@ -7795,8 +7795,6 @@ ExtendConformalOffsAndSetFeed( const ISurfFlatRegion* pSfrPock, const ISurfFlatR
|
||||
if ( IsNull( pSfrUncleared))
|
||||
return false ;
|
||||
if ( GetUnclearedRegionAndSetFeed( vCrvFirstOffs, vCrvOffs, vCrvLinks, pSfrOrig, PockParams, pSfrUncleared)) {
|
||||
|
||||
|
||||
// estendo i percorsi di Offset se richiesto
|
||||
if ( ! RemoveUnclearedRegions( pSfrUncleared, vCrvOffs, vCrvFirstOffs, PockParams))
|
||||
return false ;
|
||||
@@ -8594,11 +8592,15 @@ AddConformal( ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrOrig,
|
||||
return true ;
|
||||
|
||||
// se superifice tutta aperta, lavoro in SPIRAL_IN
|
||||
if ( PockParams.bAllOpen)
|
||||
if ( PockParams.bAllOpen) {
|
||||
PockParams.nType = POCKET_SPIRALIN ;
|
||||
return ( AddSpiralIn( pSfrPock, pSfrOrig, PockParams, vCrvCompoRes)) ;
|
||||
}
|
||||
// se superficie tutta chiusa, lavoro in SPIRAL_OUT
|
||||
if ( PockParams.bAllClosed)
|
||||
if ( PockParams.bAllClosed) {
|
||||
PockParams.nType = POCKET_SPIRALOUT ;
|
||||
return ( AddSpiralOut( pSfrPock, pSfrOrig, PockParams, vCrvCompoRes)) ;
|
||||
}
|
||||
|
||||
// scorro i chunk della superficie da lavorare
|
||||
for ( int nC = 0 ; nC < pSfrPock->GetChunkCount() ; ++ nC) {
|
||||
@@ -8612,13 +8614,19 @@ AddConformal( ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrOrig,
|
||||
return false ;
|
||||
// se Chunk tutto aperto, lo lavoro in SPIRAL_IN
|
||||
if ( bOpen) {
|
||||
int nType = PockParams.nType ;
|
||||
PockParams.nType = POCKET_SPIRALIN ;
|
||||
if ( ! AddSpiralIn( pSfrChunk, pSfrOrig, PockParams, vCrvCompoRes))
|
||||
return false ;
|
||||
PockParams.nType = nType ;
|
||||
}
|
||||
// se Chunk tutto chiuso, lo lavoro in SPIRAL_OUT
|
||||
else if ( bClose) {
|
||||
int nType = PockParams.nType ;
|
||||
PockParams.nType = POCKET_SPIRALOUT ;
|
||||
if ( ! AddSpiralOut( pSfrChunk, pSfrOrig, PockParams, vCrvCompoRes))
|
||||
return false ;
|
||||
PockParams.nType = nType ;
|
||||
}
|
||||
// se Chunk non omogeneo
|
||||
else {
|
||||
@@ -8628,10 +8636,13 @@ AddConformal( ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrOrig,
|
||||
return false ;
|
||||
// se non ottengo Curve di Offset, lavoro in SpiralIn ( il Chunk ha dei lati aperti)
|
||||
if ( vvCrvOffs.empty()) {
|
||||
int nType = PockParams.nType ;
|
||||
PockParams.nType = POCKET_SPIRALIN ;
|
||||
PtrOwner<ISurfFlatRegion> pSfrChunk_cl( CloneSurfFlatRegion( pSfrChunk)) ;
|
||||
if ( IsNull( pSfrChunk_cl) || ! pSfrChunk_cl->IsValid() ||
|
||||
! AddSpiralIn( pSfrChunk_cl, pSfrOrig, PockParams, vCrvCompoRes))
|
||||
return false ;
|
||||
PockParams.nType = nType ;
|
||||
}
|
||||
else {
|
||||
// definisco vettore degli Offset e dei Link
|
||||
@@ -8640,10 +8651,13 @@ AddConformal( ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrOrig,
|
||||
// ordino le curve di Offset e raccordo
|
||||
if ( ! CalcConformalOffsAndLinks( vvCrvOffs, pSfrChunk, pSfrPock, PockParams, vCrvOffs, vCrvLink)) {
|
||||
// se calcolare i raccordi risulta troppo ambiguo o complesso, ritorno a SpiralIn
|
||||
int nType = PockParams.nType ;
|
||||
PockParams.nType = POCKET_SPIRALIN ;
|
||||
PtrOwner<ISurfFlatRegion> pSfrChunk_cl( CloneSurfFlatRegion( pSfrChunk)) ;
|
||||
if ( IsNull( pSfrChunk_cl) || ! pSfrChunk_cl->IsValid() ||
|
||||
! AddSpiralIn( pSfrChunk_cl, pSfrOrig, PockParams, vCrvCompoRes))
|
||||
return false ;
|
||||
PockParams.nType = nType ;
|
||||
continue ;
|
||||
}
|
||||
// flag per controllo
|
||||
@@ -8657,10 +8671,13 @@ AddConformal( ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrOrig,
|
||||
bOk = bOk && OrderAndExtendConformalPaths( vCrvPaths, pSfrChunk, pSfrOrig, PockParams) ;
|
||||
if ( ! bOk) {
|
||||
// se qualche passaggio restituisce errore, provo in SpiralIn
|
||||
int nType = PockParams.nType ;
|
||||
PockParams.nType = POCKET_SPIRALIN ;
|
||||
PtrOwner<ISurfFlatRegion> pSfrChunk_cl( CloneSurfFlatRegion( pSfrChunk)) ;
|
||||
if ( IsNull( pSfrChunk_cl) || ! pSfrChunk_cl->IsValid() ||
|
||||
! AddSpiralIn( pSfrChunk_cl, pSfrOrig, PockParams, vCrvCompoRes))
|
||||
return false ;
|
||||
PockParams.nType = nType ;
|
||||
}
|
||||
else {
|
||||
// aggiungo i percorsi ricavati
|
||||
|
||||
Reference in New Issue
Block a user