[vtkusers] no neighbors by using GetCellNeighbors with OBJ-files

-Daniel- ich_daniel at habmalnefrage.de
Wed May 21 11:32:33 EDT 2014


Hi there,

I use GetCellNeighbors() method for 3D objects. 
It works fine with STL-files, but when I use OBJ-files I get no cell
neighbors.
Is there a solution?

My code-snippet:/
for (int i = 0; i < cellPointIds.GetNumberOfIds(); i++) {
  vtkIdList idList = new vtkIdList();
  idList.InsertNextId(cellPointIds.GetId(i));
			
  vtkIdList neighborCellIds = new vtkIdList();
			
  polydata.GetCellNeighbors(cellId, idList, neighborCellIds);
			
  for (int j = 0; j < neighborCellIds.GetNumberOfIds(); j++) {
	neighbors.add(neighborCellIds.GetId(j));
  }
			
  // -> no neighbors by using OBJ
  System.out.println(" neighbors: "+neighborCellIds.GetNumberOfIds());
			
  idList.Delete();
  neighborCellIds.Delete();
}
/

Can anybody help me? Whats wrong here?





--
View this message in context: http://vtk.1045678.n5.nabble.com/no-neighbors-by-using-GetCellNeighbors-with-OBJ-files-tp5727186.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list