[vtkusers] Clipping vtkPolyData with vtkBox

Henrik Westerberg henrik.westerberg at crg.es
Thu May 24 11:21:19 EDT 2007


Hi Samo, vtkusers,

I did this using a slightly long-winded approach. In one program
I would render the object to be clipped along with a plane located
at the origin and pointing up the x axis. I would then drag the object
to be cut to the plane and place it in whatever orientation I wanted and
then store the transformation to a file. I wrote another script to generate
the clipped surface but it could be done in one.

Or you might be able to draw a box on screen and transform it to the orientation
and position you want and then use that transform on the clipping box. If you use 
actor mode, normally the "a" key with the default interactive renderer you can 
move things about.

hth,

Henrik

-----Original Message-----
From: vtkusers-bounces+henrik.westerberg=crg.es at vtk.org on behalf of samo
Sent: Thu 5/24/2007 2:02 PM
To: vtkusers at vtk.org
Subject: [vtkusers] Clipping vtkPolyData with vtkBox
 


Hello folks

I clip PolyData with the vtkBox class. My problem is, that the clipping data
is not orthogonal to the main axis, but the box is clipping along these
axes. How can I change the orientation of the box, such that the box is
clipping parallel to my PolyData and not to the main axis of my coordinate
system? I tried 

vtkBox* box = vtkBox::New();
box->SetTransform(PolyDataActor->GetUserTransform());

but that did not work. Has anybody an idea how I can change the orientation
of my box? 

Thanks!
-- 
View this message in context: http://www.nabble.com/Clipping-vtkPolyData-with-vtkBox-tf3809662.html#a10782368
Sent from the VTK - Users mailing list archive at Nabble.com.

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070524/4e8a075b/attachment.htm>


More information about the vtkusers mailing list