Skip to content
Permalink
Browse files

avoid NaN value between two faces

  • Loading branch information
vcloarec authored and nyalldawson committed Jun 2, 2020
1 parent b4f5b48 commit 7074f8e52d0f4e0f8de4accb04e5c013b8d7ef7e
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/mesh/qgsmeshlayer.cpp
@@ -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 );
@@ -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 );

0 comments on commit 7074f8e

Please sign in to comment.
You can’t perform that action at this time.