[Paraview] show cut surface

Felix Wolfheimer wolfheimer at temf.tu-darmstadt.de
Mon Aug 8 09:03:02 EDT 2005


To be more precise: I have a stl file describing the outer surface of a 
shape. I want to clip the shape and showing a solid cut surface so that 
the resulting shape looks solid again. In VTK it is possible to generate 
a triangulation of the missing parts of the shape with something like this:

// Create polygons outlining clipped areas and triangulate them to 
generate cut surface
vtkCutter *cutEdges=vtkCutter::New(); //Generate cut lines
  cutEdges->SetInput(cowNormals->GetOutput());
  cutEdges->SetCutFunction( plane);
  cutEdges->GenerateCutScalarsOn();
  cutEdges->SetValue( 0, 0.5);
vtkStripper *cutStrips=vtkStripper::New(); //Forms loops (closed 
polylines) from cutter
  cutStrips->SetInput(cutEdges->GetOutput());
  cutStrips->Update();
vtkPolyData *cutPoly=vtkPolyData::New(); //This trick defines polygons 
as polyline loop
  cutPoly->SetPoints(cutStrips->GetOutput()->GetPoints());
  cutPoly->SetPolys (cutStrips->GetOutput()->GetLines());
  vtkTriangleFilter *cutTriangles=vtkTriangleFilter::New(); 
//Triangulates the polygons to create cut surface
  cutTriangles->SetInput(cutPoly);
vtkPolyDataMapper *cutMapper=vtkPolyDataMapper::New();
  cutMapper->SetInput(cutPoly);
  cutMapper->SetInput(cutTriangles->GetOutput());

But in ParaView I didn't find an equivalent possibility. Any idea?


-- 
================================================================================
Dipl.-Ing. Felix Wolfheimer
Institut für Theorie Elektromagnetischer Felder
Schlossgartenstr.8
64289 Darmstadt
Germany

Tel.: +49 06151/16-2561




More information about the ParaView mailing list