Selection performance: TopAbs_SHELL

Hello,

in our OCCT-6.5.1-based system we have the possibility to import assemblies using XDE. One of our customers has reported a weird behaviour recently: If working with complex free-form shapes the selection mechanism works fast as long as the shape is displayed (using XCAFPrs_Driver) as a part of an assembly structure. When the assembly structure is deleted (meaning the SimpleShape becomes a Free SimpleShape) the selection of the shape gets very sloooow (the application freezes until the selection is computed when the mouse hovers over the model).

I checked the problem and found the following workaround: As long as the shape was a part of the assembly structure it was treated as TopAbs_COMPOUND but as soon as the assembly structure was deleted the underlying TopAbs_SHELL was being taken into consideration. It made a difference in StdSelect_BRepSelectionTool::ComputeSensitive (in StdSelect_BRepSelectionTool.cxx) which created Select3D_SensitiveGroups for shells that were apparently being responsible for the long selection computation times (actually not sure why??).

As a workaround, I made no difference in StdSelect_BRepSelectionTool::ComputeSensitive between the computation for compounds and shells (copied the computation for compounds into the TopAbs_SHELL case). That really sped up the selection time.

My questions are:
- What is the purpose of differentiating between the compounds and shells in the described situation? Is there any?
- What is the purpose of creating Select3D_SensitiveGroups for shells?
- Does the change I made have any impact on other functions/OCC behaviour? (I haven't observed any so far...)

Any comments/hints are welcome.
Thank you
Pawel

Pawel's picture