Skip to content

Commit 66f2b26

Browse files
committed
fix #1170
isofill are now generated in point grids whereas the missing mapper was always using a cell2point that led to a shift in masks this fixes it
1 parent 1de784d commit 66f2b26

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

Packages/vcs/Lib/vcs2vtk.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,19 @@ def putMaskOnVTKGrid(data,grid,actorColor=None,cellData=True,deep=True):
5353
grid2.SetPointVisibilityArray(nomsk)
5454
grid2.GetPointData().SetScalars(imsk)
5555
#grid2.SetCellVisibilityArray(imsk)
56-
p2c = vtk.vtkPointDataToCellData()
57-
p2c.SetInputData(grid2)
58-
geoFilter.SetInputConnection(p2c.GetOutputPort())
59-
#lut.SetTableValue(0,r/100.,g/100.,b/100.,1.)
60-
#lut.SetTableValue(1,r/100.,g/100.,b/100.,0.)
56+
#p2c = vtk.vtkPointDataToCellData()
57+
#p2c.SetInputData(grid2)
58+
#geoFilter.SetInputConnection(p2c.GetOutputPort())
59+
geoFilter.SetInputData(grid2)
60+
lut.SetTableValue(0,r/100.,g/100.,b/100.,1.)
61+
lut.SetTableValue(1,r/100.,g/100.,b/100.,1.)
6162
else:
6263
if grid2.IsA("vtkStructuredGrid"):
6364
grid2.SetCellVisibilityArray(nomsk)
6465
grid2.GetCellData().SetScalars(imsk)
6566
geoFilter.SetInputData(grid2)
66-
lut.SetTableValue(0,r/100.,g/100.,b/100.,0.)
67-
lut.SetTableValue(1,r/100.,g/100.,b/100.,1.)
67+
lut.SetTableValue(0,r/100.,g/100.,b/100.,0.)
68+
lut.SetTableValue(1,r/100.,g/100.,b/100.,1.)
6869
geoFilter.Update()
6970
mapper = vtk.vtkPolyDataMapper()
7071
mapper.SetInputData(geoFilter.GetOutput())

0 commit comments

Comments
 (0)