mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0030486: Visualization - Rubber-band selection does not work with disabled overlap detection
SelectMgr_RectangularFrustum::Overlaps() now treats degenerated polygon as point instead of returning FALSE.
This commit is contained in:
parent
5ac0f98974
commit
1ccc1371b9
@ -537,10 +537,17 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const TColgp_Array1OfPn
|
|||||||
else if (theSensType == Select3D_TOS_INTERIOR)
|
else if (theSensType == Select3D_TOS_INTERIOR)
|
||||||
{
|
{
|
||||||
gp_Vec aPolyNorm (gp_XYZ (RealLast(), RealLast(), RealLast()));
|
gp_Vec aPolyNorm (gp_XYZ (RealLast(), RealLast(), RealLast()));
|
||||||
if (!hasOverlap (theArrayOfPnts, aPolyNorm)
|
if (!hasOverlap (theArrayOfPnts, aPolyNorm))
|
||||||
|| !segmentPlaneIntersection (aPolyNorm,
|
{
|
||||||
theArrayOfPnts.First(),
|
return Standard_False;
|
||||||
thePickResult))
|
}
|
||||||
|
|
||||||
|
if (aPolyNorm.Magnitude() <= Precision::Confusion())
|
||||||
|
{
|
||||||
|
// treat degenerated polygon as point
|
||||||
|
return Overlaps (theArrayOfPnts.First(), thePickResult);
|
||||||
|
}
|
||||||
|
else if (!segmentPlaneIntersection (aPolyNorm, theArrayOfPnts.First(), thePickResult))
|
||||||
{
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user