[vtkusers] the number of vertexes on a cube

PAUL polinzhuo at 163.com
Fri Jan 5 06:06:50 EST 2007


Hello:

I want to get the number of vertexes on a cube.

I have the codes below:

vtkCubeSource *pCube = vtkCubeSource::New();

     pCube->SetCenter(0,0,0);

     pCube->SetXLength(2);

     pCube->SetYLength(2);

     pCube->SetZLength(2);

     vtkPolyData *data = pCube->GetOutput();

     data->Update();

data->BuildLinks();

     int numPts = data->GetNumberOfPoints();

 

numPts should be 8, but here it is 24. why???

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


More information about the vtkusers mailing list