Make OCCT to select shape only if the whole shape is under selection rectangle

Hello, everyone.

How can I make OCCT to select shape only if the whole shape (AIS_Compound) is under selection rectangle?

 

Kirill Gavrilov's picture

OCCT rectangle selection supports two overlapping modes (option -allowoverlap for vselect command) - partial overlapping and full overlapping (default).
However full overlapping check is currently implemented only at Select3D_SensitiveEntity level - e.g. within AIS_Shape it requires that rectangle covers all triangles within at least one (not all!) TopoDS_Face in a given shape.

The patches improving this functionality are welcome (of course you can also contact Open CASCADE support services)!

Anton Shabalin's picture

Thank you for the answer! So I just need to derive my class from AIS_Shape and override computeSelection function to reach desired behavor.