Skip to content

Commit

Permalink
BUG #1645: Blank spots on solid fillareastyle with fillareaindices
Browse files Browse the repository at this point in the history
The solid fillareastyle was treated as a pattern style in that
each level was extracted and rendered individually. Because of a
bug in vtkBandedPolyDataContourFilter lower isocontours differ
from upper isocontours which results in blank spots. In this fix
we trigger merging of levels which fixes the problem for solid fill.
We'll fix the problem for pattern fill in a subsequent commit.
  • Loading branch information
danlipsa committed Nov 19, 2015
1 parent 4f868e1 commit 34a14d5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Packages/vcs/Lib/vcsvtk/isofillpipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ def _plotInternal(self):
tmpColors = []
tmpIndices = []
tmpOpacities = []
indices = self._gm.fillareaindices
opacities = self._gm.fillareaopacity
style = self._gm.fillareastyle
# levels would not be merged if the user sets fillareaindices for a
# 'solid' style resulting in a less efficient plotting.
indices = (None if (style == "solid") else self._gm.fillareaindices)
opacities = self._gm.fillareaopacity
if indices is None:
indices = [1]
while len(indices) < len(self._contourColors):
Expand Down Expand Up @@ -179,7 +181,7 @@ def _plotInternal(self):
for j, v in enumerate(l):
cot.SetValue(j, v)
cot.Update()

cots.append(cot)
mapper.SetInputConnection(cot.GetOutputPort())
lut.SetNumberOfTableValues(len(tmpColors[i]))
Expand Down Expand Up @@ -321,7 +323,7 @@ def _plotInternal(self):
self._contourColors, legend,
self.getColorMap(),
style=style,
index=self._gm.fillareaindices,
index=indices,
opacity=opacities))

if self._context().canvas._continents is None:
Expand Down

0 comments on commit 34a14d5

Please sign in to comment.