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();
            aDataSource->SetShape(aShapeImpl);

            // 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
            subShapesFilter->SetInputConnection(aDataSource->GetOutputPort());

            // Set ids to the filter to pass only picked sub-shapes
            subShapesFilter->SetData(anIdSubList);
            subShapesFilter->Modified();

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

 

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.

 

 

 

 

 

 

Attachments: 
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

FSR

 

liuhuiwei's picture
Jihui Cong's picture

垃圾