EgtGeomKernel 1.6d5 :

- correzioni a scalatura per evitare che le entità collassino in un punto.
This commit is contained in:
Dario Sassi
2015-04-22 06:45:46 +00:00
parent 9379e00f14
commit 1aaf135f2f
6 changed files with 78 additions and 20 deletions
+11 -3
View File
@@ -810,12 +810,20 @@ CurveLine::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double d
if ( fabs( dCoeffX) < EPS_ZERO && fabs( dCoeffY) < EPS_ZERO && fabs( dCoeffZ) < EPS_ZERO)
return false ;
// verifico che la scalatura dei punti non li porti a coincidere
Point3d ptNewStart = m_PtStart ;
ptNewStart.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;
Point3d ptNewEnd = m_PtEnd ;
ptNewEnd.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;
if ( AreSamePointApprox( ptNewStart, ptNewEnd))
return false ;
// imposto ricalcolo della grafica
m_OGrMgr.Reset() ;
// scalo i punti estremi
m_PtStart.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;
m_PtEnd.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;
// uso i punti estremi
m_PtStart = ptNewStart ;
m_PtEnd = ptNewEnd ;
// scalo vettore estrusione, lo normalizzo e aggiusto spessore
m_VtExtr.Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ;
double dLen = m_VtExtr.Len() ;