Skip to content
Permalink
Browse files

fix mesh edges centroid calculation (#37111)

  • Loading branch information
vcloarec committed Jun 11, 2020
1 parent 47fba10 commit 48b5d5c2bec989110ce3e666aa35b13d97808ffb
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/mesh/qgstriangularmesh.cpp
@@ -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 );

0 comments on commit 48b5d5c

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