Skip to content

Commit

Permalink
Fixes variables' names
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 16, 2018
1 parent d2ed783 commit 47ba3a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/app/qgsmaptoolcircle2tangentspoint.cpp
Expand Up @@ -175,16 +175,16 @@ void QgsMapToolCircle2TangentsPoint::getPossibleCenter( )
QgsPoint inter;
QgsGeometryUtils::segmentIntersection( QgsPoint( line1m.asPolyline().at( 0 ) ), QgsPoint( line1m.asPolyline().at( 1 ) ),
QgsPoint( line2m.asPolyline().at( 0 ) ), QgsPoint( line2m.asPolyline().at( 1 ) ), inter, isIntersect );
mCenters.append( QgsPointXY( inter ) );
mCenters.append( QgsPoint( inter ) );
QgsGeometryUtils::segmentIntersection( QgsPoint( line1m.asPolyline().at( 0 ) ), QgsPoint( line1m.asPolyline().at( 1 ) ),
QgsPoint( line2p.asPolyline().at( 0 ) ), QgsPoint( line2p.asPolyline().at( 1 ) ), inter, isIntersect );
mCenters.append( QgsPointXY( inter ) );
mCenters.append( QgsPoint( inter ) );
QgsGeometryUtils::segmentIntersection( QgsPoint( line1p.asPolyline().at( 0 ) ), QgsPoint( line1p.asPolyline().at( 1 ) ),
QgsPoint( line2m.asPolyline().at( 0 ) ), QgsPoint( line2m.asPolyline().at( 1 ) ), inter, isIntersect );
mCenters.append( QgsPointXY( inter ) );
mCenters.append( QgsPoint( inter ) );
QgsGeometryUtils::segmentIntersection( QgsPoint( line1p.asPolyline().at( 0 ) ), QgsPoint( line1p.asPolyline().at( 1 ) ),
QgsPoint( line2p.asPolyline().at( 0 ) ), QgsPoint( line2p.asPolyline().at( 1 ) ), inter, isIntersect );
mCenters.append( QgsPointXY( inter ) );
mCenters.append( QgsPoint( inter ) );
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/core/geometry/qgsgeometryutils.cpp
Expand Up @@ -254,18 +254,17 @@ bool QgsGeometryUtils::lineIntersection( const QgsPoint &p1, QgsVector v1, const
{
z = p1.z();
}
else if ( q1.is3D() )
else if ( p2.is3D() )
{
z = q1.z();
z = p2.z();
}

if ( ! std::isnan( z ) )
{
inter.convertTo( QgsWkbTypes::addZ( inter.wkbType() ) );
inter.setZ( z );
intersection.convertTo( QgsWkbTypes::addZ( intersection.wkbType() ) );
intersection.setZ( z );
}


return true;
}

Expand Down

0 comments on commit 47ba3a0

Please sign in to comment.