Possible bug in vtk picker?

I am using occ vtk VIS services as so:

            IVtkOCC_Shape::Handle aShapeImpl = m_geometryShapes[anIt.Value()];

            IVtk_ShapeIdList anIdSubList = m_picker->GetPickedSubShapesIds(anIt.Value(), false);

            vtkSmartPointer<IVtkTools_ShapeDataSource> aDataSource = vtkSmartPointer<IVtkTools_ShapeDataSource>::New();

            // Create a new sub-polydata filter for sub-shapes filtering
            vtkSmartPointer<IVtkTools_SubPolyDataFilter> subShapesFilter = IVtkTools_SubPolyDataFilter::New();
            // Set a shape source as an input of the subpolydata filter

            // Set ids to the filter to pass only picked sub-shapes

            // Output the result into a mapper
            vtkSmartPointer<vtkPolyDataMapper> aMapper = vtkPolyDataMapper::New();
            aMapper->SetResolveCoincidentTopologyPolygonOffsetParameters(1, 2);


If I use GetPickedSubShapesIds(anIt.Value(), false) it returns the top face although mouse coordinates are on the cylindrical surface. I thought it might be a problem with coordinate x, y but it is working correctly on the edges which seems to indicate the x,y are correct. I have also tried changing setTolerance but seems that theres is no effect.







Forum supervisor's picture

Dear Billy,

I suggest you to register the issue in OCCT Mantis BugTracker available via the Collaborative portal - http://dev.opencascade.org/index.php?q=home/get_involved.

Best regards



liuhuiwei's picture