]> OCCT Git - occt-copy.git/commit
0031440: Visualization - Impossible to make common behaviour for multi-selection...
authormzernova <mzernova@opencascade.com>
Tue, 14 Apr 2020 21:54:32 +0000 (00:54 +0300)
committerjfa <jfa@opencascade.com>
Thu, 30 Apr 2020 13:33:31 +0000 (16:33 +0300)
commit7904c7361f0b3d9a5fd32020a08a7b510f04a819
treed11645fde22cdc400a60cbb5643ec3a8fe812c13
parent613213f3b7197c2443b24fd9ced78cbb5a27825d
0031440: Visualization - Impossible to make common behaviour for multi-selection in viewer

A special mode for the selecting by polygon is added to select only completely overlapping objects.

In order to track the sensitives that were included completely by defined polygon, the boundary points of the polygonal frustrum are stored in the variable myBoundaryPoints.

If an sensitive intersects with at least one of the frustrums from myFrustums, then checking whether this object intersects with borders using the isIntersectBoundary method; if not, then the sensitive were included completely by defined polygon.

Because the polygon can be concave, then to check the sensitive were included completely by defined polygon, it is not enough to check of all its points, it is necessary that the edges of the sensitive do not intersect polygonal frustrum. To do this, for polygonal selection, a call to the Overlaps method for a point was replaced by a call to a segment where necessary.

bugs/vis/bug31440: test case added
14 files changed:
src/AIS/AIS_ViewController.cxx
src/MeshVS/MeshVS_SensitiveQuad.cxx
src/Select3D/Select3D_SensitiveCircle.cxx
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveTriangle.cxx
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx
src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx
src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/bugs/vis/bug27008
tests/bugs/vis/bug31440 [new file with mode: 0644]