Skip to content
Permalink
Browse files
Fixes variables' names
  • 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.
@@ -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 ) );
}
}

@@ -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;
}

0 comments on commit 47ba3a0

Please sign in to comment.