Select MeshVS elements with polyline


I am trying to select triangles of my mesh (MeshVS_Mesh) by calling the "Select" method of my context with a polyline (point2d array of screen coordinates):

Handle(AIS_InteractiveContext) context = ...;
Handle(V3d_View) view = ...

int selectionMode = MeshVS_SMF_Face;
context->Load(aisObj, selectionMode, 1);

TColgp_Array1OfPnt2d polyline(1, nbVertices);
//...fill polyline point array (screenshot: green line)
m_Context->Select(polyline, view);


The "internal" triangles are selected as supposed. But there are also many selected triangles outside the green polyline.

I am using OpenCASCADE 6.9.1 x64, Visual Studio 2013 Pro

Any suggestions?




Forum supervisor's picture

Dear Thorsten,

It seems a bug in the polygonal selection algorithm.

We suggest you to register the issue in OCCT Mantis Bugtracker which is available via the Collaborative portal -
If the problem is urgent you may contact us via the Contact Form
We will try to find a solution/workaround acceptable for you.

Best regards