EgtGeomKernel :
- aggiunta gestione livello di debug tramite Set/GetEGkDebugLev - introduzione della costante SQ_INFINITO = INFINITO * INFINITO - corretta triangolazione per oggetti molto grandi (si usava INFINITO invece di SQ_INFINITO) - corretta scalatura di curve composite (quando si espande si aggiusta la continuità tra le curve componenti).
This commit is contained in:
@@ -2185,6 +2185,9 @@ CurveComposite::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, dou
|
||||
if ( abs( dCoeffX) < EPS_ZERO && abs( dCoeffY) < EPS_ZERO && abs( dCoeffZ) < EPS_ZERO)
|
||||
return false ;
|
||||
|
||||
// verifico se chiusa
|
||||
bool bClosed = IsClosed() ;
|
||||
|
||||
// calcolo bbox allineato con riferimento di scalatura e senza tener conto dello spessore
|
||||
// lo scalo per verificare se tutto si riduce a un punto
|
||||
BBox3d b3Ref ;
|
||||
@@ -2223,6 +2226,29 @@ CurveComposite::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, dou
|
||||
}
|
||||
}
|
||||
|
||||
// se ingrandimento, aggiusto coincidenza estremi delle singole curve
|
||||
if ( abs( dCoeffX) > 1 || abs( dCoeffY) > 1 || abs( dCoeffZ) > 1) {
|
||||
int nCount = int( m_CrvSmplS.size()) ;
|
||||
for ( int i = 0 ; i < nCount ; ++ i) {
|
||||
int j = i - 1 ;
|
||||
if ( j < 0) {
|
||||
if ( bClosed)
|
||||
j = nCount - 1 ;
|
||||
else
|
||||
continue ;
|
||||
}
|
||||
ICurve* pCrvPrev = m_CrvSmplS[j] ;
|
||||
ICurve* pCrvCurr = m_CrvSmplS[i] ;
|
||||
Point3d ptEndPrev ; pCrvPrev->GetEndPoint( ptEndPrev) ;
|
||||
Point3d ptStaCurr ; pCrvCurr->GetStartPoint( ptStaCurr) ;
|
||||
if ( ! AreSamePointApprox( ptEndPrev, ptStaCurr)) {
|
||||
Point3d ptNew = Media( ptEndPrev, ptStaCurr) ;
|
||||
pCrvPrev->ModifyEnd( ptNew) ;
|
||||
pCrvCurr->ModifyStart( ptNew) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// scalo vettore estrusione, lo normalizzo e aggiusto spessore
|
||||
m_VtExtr.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;
|
||||
double dLen = m_VtExtr.Len() ;
|
||||
|
||||
Reference in New Issue
Block a user