[vtkusers] Two cut planes

Chunyan Jiang jiang at TI.FhG.DE
Tue Nov 26 11:22:31 EST 2002


Hi, all,
Clipping a object by a plane is available in my application. Now I want to
clip this object by two planes. It is like cut one corner of the object.
Could any one give me some help?
The following code is the method how to clip in my application.

	vtkClipVolume *clip=vtkClipVolume::New();
	clip->SetInput(structPts);//structPts is vtkStructuredPoints
	clip->SetClipFunction(CutPlane);CutPlane is vtkPlane
	clip->GenerateClipScalarsOff();

	vtkDataSetMapper *DataMapper=vtkDataSetMapper::New();
	DataMapper->SetInput(clip->GetOutput());

	vtkActor *DataActor=vtkActor::New();
	DataActor->SetMapper(DataMapper);

Thanks in advance!

Chunyan

***********************************************************************
Chunyan Jiang, Dipl.-Inform.,
Institut for Telematic
Bahnhofstrasse 30-32, D-54292 Trier, Germany
Phone: (+49) (0)651-97551-34
Fax: (+49) (0)651-97551-12
***********************************************************************




More information about the vtkusers mailing list