File tree 1 file changed +3
-5
lines changed
python/plugins/fTools/tools
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -480,12 +480,10 @@ def delaunay_triangulation( self ):
480
480
fields , QGis .WKBPolygon , vprovider .crs () )
481
481
inFeat = QgsFeature ()
482
482
points = []
483
- print "here"
484
483
while vprovider .nextFeature ( inFeat ):
485
484
inGeom = QgsGeometry ( inFeat .geometry () )
486
485
point = inGeom .asPoint ()
487
486
points .append ( point )
488
- print "or here"
489
487
vprovider .rewind ()
490
488
vprovider .select ( allAttrs )
491
489
triangles = voronoi .computeDelaunayTriangulation ( points )
@@ -500,11 +498,11 @@ def delaunay_triangulation( self ):
500
498
polygon = []
501
499
step = 0
502
500
for index in indicies :
503
- vprovider .featureAtId ( index , feat , True , allAttrs )
504
- geom = QgsGeometry ( feat .geometry () )
501
+ vprovider .featureAtId ( index , inFeat , True , allAttrs )
502
+ geom = QgsGeometry ( inFeat .geometry () )
505
503
point = QgsPoint ( geom .asPoint () )
506
504
polygon .append ( point )
507
- feat .addAttribute ( step , QVariant ( index ) )
505
+ if step <= 3 : feat .addAttribute ( step , QVariant ( index ) )
508
506
step += 1
509
507
geometry = QgsGeometry ().fromPolygon ( [ polygon ] )
510
508
feat .setGeometry ( geometry )
You can’t perform that action at this time.
0 commit comments