[vtkusers] Using vtkCutter on a transformed model
Clare Fitzpatrick
clare.fitzpatrick at ucd.ie
Wed Dec 14 15:11:47 EST 2005
Hi, I am trying to orientate a 3D model so that a particular vector is aligned with the z-axis in world coordinates.
I have tried:
vtkSTLReader model
model SetFileName "C:/myFile"
...
I am applying an instance of vtkCutter to this model.
vtkCutter cutter1
cutter1 SetInput [model GetOutput]
...
then when I transform the model using
modelActor RotateWXYZ angle1 0 0 1
modelActor RotateWXYZ angle2 0 1 0
the model is transforming correctly but cutter1 is not cutting the model anymore.
When I use a transform:
vtkTransform modelTransform
vtkTransformPolyDataFilter modTransform
modTransform SetTransform modelTransform
modTransform SetInput [model GetOutput]
and then
cutter1 SetInput [modelTransform GetOutput]
...
and then transform the model using
modelTransform RotateWXYZ angle1 0 0 1
modelTransform RotateWXYZ angle2 0 1 0
its producing the wrong output - i think it might be using the model coordinates instead of the world ones.
Any ideas on how to set the cutter to work on the (correctly) transformed model??
Clare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051214/fe078dd8/attachment.htm>
More information about the vtkusers
mailing list