[vtkusers] clipping plane struggling problem

Bill Chivas billno123 at hotmail.com
Wed Oct 20 09:27:38 EDT 2010


Forget my previous emails.
To clear things up:

vtkSmartPointer<vtkSphereSource> sphereSource =
      vtkSmartPointer<vtkSphereSource>::New();
  sphereSource->SetRadius(10.0);

//the implicit function to cut my source
  vtkSmartPointer<vtkPlane> plane =
      vtkSmartPointer<vtkPlane>::New();
  vtkSmartPointer<vtkClipPolyData> clipper =
      vtkSmartPointer<vtkClipPolyData>::New();
  clipper->SetClipFunction(plane);
  clipper->InsideOutOn();

// i use this filter because i want NOT to cut the cells but to pull them out as an entire.
vtkSmartPointer<vtkExtractGeometry> geometry =
      vtkSmartPointer<vtkExtractGeometry>::New();
geometry->SetInputConnection(sphereSource->GetOutputPort());
geometry->SetImplicitFunction(plane);
  
//Create a mapper and actor
.
.
.

Everything works fine except that now a cell is pulled out when 
it's in the inside (or outside, depends on the settings) side of the plane. 
What i want to do is a cell to be pulled entirely out ONLY when
its centroid is inside (or outside, depends on the settings) side of the plane.

Again, 
A Paraview screenshot: on the left is cut, on the right cells are pulled out entirely
http://yfrog.com/74cutorpulledoutentirelyj
I want the right effect but cells should be pulled out according to their centroid.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101020/597fbe69/attachment.htm>


More information about the vtkusers mailing list