EgtGeomKernel :

- correzione alla gestione delle normali in IntersLineCyl.
- modifiche alla chiamata della funzione IntesLineCyl in VolZMap.
This commit is contained in:
Daniele Bariletti
2026-06-09 15:51:46 +02:00
parent 7c85ea2d43
commit 55e2983991
3 changed files with 17 additions and 17 deletions
+13 -13
View File
@@ -60,14 +60,14 @@ IntersLineCyl( const Point3d& ptP, const Vector3d& vtV, double dH, double dRad,
// Se la linea interseca entrambe le basi, si sono trovate le due intersezioni
if ( nBasInt == 3) {
if ( isfinite( dU1) && isfinite(dU2) && dU1 > dU2) {
if ( dU1 > dU2) {
swap( dU1, dU2) ;
swap( ptInt1, ptInt2) ;
swap( vtN1, vtN2) ;
if ( bInvertNormals) {
vtN1 *= - 1 ;
vtN2 *= - 1 ;
}
}
if ( bInvertNormals) {
vtN1 *= - 1 ;
vtN2 *= - 1 ;
}
// Trovate intersezioni
return true ;
@@ -119,10 +119,10 @@ IntersLineCyl( const Point3d& ptP, const Vector3d& vtV, double dH, double dRad,
swap( dU1, dU2) ;
swap( ptInt1, ptInt2) ;
swap( vtN1, vtN2) ;
if ( bInvertNormals) {
vtN1 *= - 1 ;
vtN2 *= - 1 ;
}
}
if ( bInvertNormals) {
vtN1 *= - 1 ;
vtN2 *= - 1 ;
}
// Trovate intersezioni
return true ;
@@ -155,10 +155,10 @@ IntersLineCyl( const Point3d& ptP, const Vector3d& vtV, double dH, double dRad,
swap( dU1, dU2) ;
swap( ptInt1, ptInt2) ;
swap( vtN1, vtN2) ;
if ( bInvertNormals) {
vtN1 *= - 1 ;
vtN2 *= - 1 ;
}
}
if ( bInvertNormals) {
vtN1 *= - 1 ;
vtN2 *= - 1 ;
}
// Trovate intersezioni
return true ;