Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
avoid NaN value between two faces
  • Loading branch information
vcloarec authored and nyalldawson committed Jun 2, 2020
1 parent b4f5b48 commit 7074f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/mesh/qgsmeshlayer.cpp
Expand Up @@ -303,7 +303,7 @@ QgsMeshDatasetValue QgsMeshLayer::datasetValue( const QgsMeshDatasetIndex &index
QgsRectangle searchRectangle( point.x() - searchRadius, point.y() - searchRadius, point.x() + searchRadius, point.y() + searchRadius );
return dataset1dValue( index, point, searchRadius );
}
int faceIndex = mesh->faceIndexForPoint( point ) ;
int faceIndex = mesh->faceIndexForPoint_v2( point ) ;
if ( faceIndex >= 0 )
{
int nativeFaceIndex = mesh->trianglesToNativeFaces().at( faceIndex );
Expand Down Expand Up @@ -372,7 +372,7 @@ QgsMesh3dDataBlock QgsMeshLayer::dataset3dValue( const QgsMeshDatasetIndex &inde
const QgsMeshDatasetGroupMetadata::DataType dataType = dataProvider()->datasetGroupMetadata( index ).dataType();
if ( dataType == QgsMeshDatasetGroupMetadata::DataOnVolumes )
{
int faceIndex = baseTriangularMesh->faceIndexForPoint( point ) ;
int faceIndex = baseTriangularMesh->faceIndexForPoint_v2( point );
if ( faceIndex >= 0 )
{
int nativeFaceIndex = baseTriangularMesh->trianglesToNativeFaces().at( faceIndex );
Expand Down

0 comments on commit 7074f8e

Please sign in to comment.