the selected subshape does not have topological relationship with orginal shape in OCC680

in topic : "http://www.opencascade.org/org/forum/thread_26651/?forum=3" , I have attached one code for testing subshape selection. this code is developed from the example of occ.

the code can give the right result with occ671, but not with occ680.

I think it is a bug for occ680.

Sergey Anikin's picture

Hello id_wangyue!

Thank you for reporting this problem through OCCT Mantis!
This is the right way to process a bug, indeed.

Most likely, the bug is a result of modification in AIS_LocalContext::SelectedShape() method introduced in the scope of issue 24837: Visualization - revise design and implementation of connected Interactive Objects

While the bug correction is in progress, perhaps you can try a workaround and compare TShape() and Orientation() of the two shapes but not Location(). Certainly, this workaround is not always applicable, but it might unblock your work for some time.

Sergey Anikin's picture

Hello id_wangyue,

You can try the patch from the OCCT Git branch CR25492, it should resolve the issue.

Thanks again for reporting the problem quickly!

Best regards,
Sergey