Skip to content

Commit

Permalink
fix mesh edges centroid calculation (#37111)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec committed Jun 11, 2020
1 parent 47fba10 commit 48b5d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/mesh/qgstriangularmesh.cpp
Expand Up @@ -216,7 +216,7 @@ bool QgsTriangularMesh::update( QgsMesh *nativeMesh, const QgsCoordinateTransfor
mNativeMeshEdgeCentroids.resize( nativeMesh->edgeCount() );
for ( int i = 0; i < nativeMesh->edgeCount(); ++i )
{
const QgsMeshEdge &edge = mTriangularMesh.edges.at( i ) ;
const QgsMeshEdge &edge = nativeMesh->edges.at( i ) ;
const QgsPoint &a = mTriangularMesh.vertices[edge.first];
const QgsPoint &b = mTriangularMesh.vertices[edge.second];
mNativeMeshEdgeCentroids[i] = QgsMeshVertex( ( a.x() + b.x() ) / 2.0, ( a.y() + b.y() ) / 2.0, ( a.z() + b.z() ) / 2.0 );
Expand Down

0 comments on commit 48b5d5c

Please sign in to comment.