[vtkusers] vtkBoxClipDataSet() bug or feature?

WolfgangZ wollez at gmx.net
Tue Oct 23 04:09:00 EDT 2007


WolfgangZ schrieb:
> Hello all,
> 
> can it be that these new bounds are in a different coordinate system as 
> the source grid? I need the resulting grid not only for display but also 
> to perform other calculations on it!
> 
> Has really nobody an idea why the input of the BoxClip does not reflect 
> the Bounds of the resulting grid?
> 
> Any help is welcome.
> 
> Wolfgang
> 

I really need to get this running! I compressed my script a little bit 
but still the extent of the mesh from the vtkBoxClipDataSet does not 
reflect the bound specified!

The bounds of my original mesh:
(0.0, 0.0099999997764825821, 0.0, 0.0099999997764825821, 0.0, 0.0) 
original grid
definition of the BoxClipDataSet:
boxCut.SetBoxClip(0.001,0.005,0.001,0.005,-1,1)
the bounds of the resulting mesh:
(0.0004729999927803874, 0.0053309998475015163, 0.00048099999548867345, 
0.006076000165194273, 0.0, 0.0)  partial grid


import vtk
ugrid = vtk.vtkUnstructuredGridReader()
ugrid.SetFileName("./holz1x1d.vtu")
ugrid.Update()
boxCut = vtk.vtkBoxClipDataSet()
boxCut.SetBoxClip(0.001,0.005,0.001,0.005,-1,1)
boxCut.SetInputConnection(ugrid.GetOutputPort())
boxCut.GenerateClipScalarsOn()
boxCut.GenerateClippedOutputOff()
boxCut.Update()
print ugrid.GetOutput().GetBounds(), ' original grid'
print boxCut.GetOutput().GetBounds() ,' partial grid'


regards
Wolfgang




More information about the vtkusers mailing list