[vtkusers] Holes on surface of clipped unstructured data set

Andreas Hessenthaler hessenthaler at mechbau.uni-stuttgart.de
Sat Jan 3 16:21:14 EST 2015


Hi there,

I have an unstructured grid with scalar and vector data which I clip using
vtkClipDataSet and vtkPlane:

clippingPlaneF = vtk.vtkPlane()
clippingPlaneF.SetOrigin(0.5*(minXF+maxXF), 0.5*(minYF+maxYF),
0.5*(minZF+maxZF))
clippingPlaneF.SetNormal(0.0, 1.0, 0.0)

clipF = vtk.vtkClipDataSet()
clipF.SetInput(meshF)
clipF.SetClipFunction(clippingPlaneF)
clipF.InsideOutOn()

extractClipF = vtk.vtkGeometryFilter()
extractClipF.SetInput(clipF.GetOutput())
linearSubdivisionClipF = vtk.vtkLinearSubdivisionFilter()
linearSubdivisionClipF.SetInput(extractClipF.GetOutput())
linearSubdivisionClipF.SetNumberOfSubdivisions(2)

clipMapperF = vtk.vtkDataSetMapper()

Now, if I use
clipMapperF.SetInputConnection(clipF.GetOutputPort())
the colors on the surface appear jagged. Thus, I tried the subdivision
filter, i.e.
clipMapperF.SetInputConnection(linearSubdivisionClipF.GetOutputPort())
which gives a nice result in terms of the color mapping, but introduces
holes on the surface, that result from clipping the data set (complete
data set is fine), see screenshot attached.

Some background if helpful: the data set is a 3D unstructured grid with
pressure and velocity field. The cells are of type vtkQuadraticTetra,
though vtkTetra gives the same result. Attached screenshot shows velocity
magnitude (components or pressure have same behavior).

Any help is much appreciated!

Cheers
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk_clipping_volumes.png
Type: image/png
Size: 149525 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150103/8dc5701a/attachment-0001.png>


More information about the vtkusers mailing list