This commit is contained in:
Dario Sassi
2024-06-06 16:55:08 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ DistPointSurfTm::Calculate( const Point3d& ptP, const ISurfTriMesh& tmSurf)
double dCurSqDist ;
// Se la distanza del triangolo è valida e minore di quella attuale aggiorno
if ( distPT.GetSqDist( dCurSqDist)) {
if ( abs( dCurSqDist - dMinSqDist) < EPS_SMALL) // se distanze uguali...
if ( abs( dCurSqDist - dMinSqDist) < SQ_EPS_SMALL) // se distanze uguali...
vTria.emplace_back( make_pair( nT, trCurTria)) ; // aggiungo il triangolo
else if ( dCurSqDist < dMinSqDist) { // se minore...
vTria.clear() ; // pulisco il vettore
+1 -1
View File
@@ -2351,7 +2351,7 @@ SurfBezier::UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, in
return false ;
if ( bThroughEdge != nullptr)
*bThroughEdge = true ;
Point3d ptI2 = ptI + ( ptIPrevOrNext - ptI) * EPS_SMALL ;
Point3d ptI2 = ptI + ( ptIPrevOrNext - ptI) * 3 * EPS_SMALL ;
// ricalcolo il triangolo di appartenenza
DistPointSurfTm dPtStm( ptI2, *pSurfTm) ;
dPtStm.GetMinDistTriaIndex( nTriaIndex) ;