[vtkusers] vtkCubeSource points

Lim, Theodore T.Lim at hw.ac.uk
Wed May 16 13:04:26 EDT 2007


Hi Everybody,
 
Is there a way to get exactly 8 points from vtkCubeSource?
 
When i create a vtkCubeSource and check for its number of points, it returns 24. This is correct if all polygon faces do not meet at the seams. But shouldn't vtkCubeSource generate a tightly bounded set of polygons that join at the seams?
 
My code:
 
double My_Bounds[6] = { -106.5552, 93.4447, -70.0502, 129.9497, 0.0, 200.0 };
vtkCubeSource *CS = vtkCubeSource::New()
CS->SetBounds(My_Bounds); 
CS-Update();
 
vtkPoints *P = CS->GetOutput()->GetPoints();
 
int npoints = P->GetNumberOfPoints(); // returns 24
 
I tried using vtkTriangleFilter -> vtkCleanPolyData... same results, still get 24 points.
 
I checked the points and the repeated points should merge as they are identical in value. But that doesn't seem to work.
 
Any ideas?
 
Many thanks, Theo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070516/65446561/attachment.htm>


More information about the vtkusers mailing list