[vtkusers] Bug? vtkNormalFilter changes # of points in polydata
BBerco
bebe0705 at colorado.edu
Sun Feb 5 19:19:56 EST 2017
Dear all,
I have noticed a strange behavior of vtkNormalFilter.
When called, this filter appears to change the number of vtkPolyData ->
GetNumberOfPoints(), as illustrated below:
*
// returns 4586
* std::cout << read_polydata_without_id -> GetNumberOfPoints() <<
std::endl;
// The polydata is fed to an IDFilter.
vtkSmartPointer<vtkIdFilter> id_filter =
vtkSmartPointer<vtkIdFilter>::New();
id_filter -> SetIdsArrayName("ids");
id_filter -> SetInputData(read_polydata_without_id);
id_filter -> PointIdsOn();
id_filter -> CellIdsOn();
id_filter -> Update();
* // returns 4586
* std::cout << id_filter -> GetOutput() -> GetNumberOfPoints() <<
std::endl;
// The normals are added to the polydata
vtkSmartPointer<vtkPolyDataNormals> normal_filter =
vtkPolyDataNormals::New();
normal_filter -> ComputePointNormalsOff();
normal_filter -> ComputeCellNormalsOn();
normal_filter -> SetInputConnection(id_filter -> GetOutputPort());
normal_filter -> Update ();
* // returns 4716
* std::cout << normal_filter -> GetOutput() -> GetNumberOfPoints() <<
std::endl;
I have noticed this issue with several polydatas created from an input obj
file such as this one (http://echo.jpl.nasa.gov/asteroids/shapes/kw4a.obj).
Polydata generated from VTK seem unchanged.
In any case, I find strange that this property gets modified. Am I missing
something? Why would adding the normals to the polydata change the number of
points it contains?
Best,
Ben
--
View this message in context: http://vtk.1045678.n5.nabble.com/Bug-vtkNormalFilter-changes-of-points-in-polydata-tp5742068.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list