Skip to content

Commit

Permalink
Support concave polygons for fillarea.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lipsa committed Feb 21, 2018
1 parent b56eef0 commit 1b52f2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vcs/vcs2vtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,9 +1437,13 @@ def prepFillarea(context, renWin, farea, cmap=None):
# Transform points
geo, pts = project(pts, farea.projection, farea.worldcoordinate)
polygonPolyData.SetPoints(pts)
# for concave polygons
tris = vtk.vtkTriangleFilter()
tris.SetInputData(polygonPolyData)

# Setup rendering
m = vtk.vtkPolyDataMapper()
m.SetInputData(polygonPolyData)
m.SetInputConnection(tris.GetOutputPort())
a = vtk.vtkActor()
a.SetMapper(m)
ren, xscale, yscale = context.fitToViewport(a,
Expand Down

0 comments on commit 1b52f2a

Please sign in to comment.