mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0027891: Visualization - FPE due to use of DBL_MAX in SelectMgr_SelectingVolumeManager::DetectedPoint()
This commit is contained in:
@@ -380,7 +380,9 @@ Standard_Real SelectMgr_SelectingVolumeManager::DistToGeometryCenter (const gp_P
|
||||
gp_Pnt SelectMgr_SelectingVolumeManager::DetectedPoint (const Standard_Real theDepth) const
|
||||
{
|
||||
if (myActiveSelectionType != Point)
|
||||
return gp_Pnt (RealLast(), RealLast(), RealLast());
|
||||
{
|
||||
Standard_ProgramError::Raise ("SelectMgr_SelectingVolumeManager::DetectedPoint() should be called only for Point selection type");
|
||||
}
|
||||
|
||||
return mySelectingVolumes[Frustum]->DetectedPoint (theDepth);
|
||||
}
|
||||
|
@@ -154,8 +154,8 @@ public:
|
||||
//! screen point and given point theCOG
|
||||
Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) Standard_OVERRIDE;
|
||||
|
||||
//! Calculates the point on a view ray that was detected during the run of selection algo by given depth. Is valid for point
|
||||
//! selection only
|
||||
//! Calculates the point on a view ray that was detected during the run of selection algo by given depth.
|
||||
//! Throws exception if active selection type is not Point.
|
||||
Standard_EXPORT virtual gp_Pnt DetectedPoint (const Standard_Real theDepth) const Standard_OVERRIDE;
|
||||
|
||||
//! Checks if the point of sensitive in which selection was detected belongs
|
||||
|
@@ -64,6 +64,11 @@ namespace {
|
||||
const gp_GTrsf& theInversedTrsf,
|
||||
SelectMgr_SelectingVolumeManager& theMgr)
|
||||
{
|
||||
if (theMgr.GetActiveSelectionType() != SelectMgr_SelectingVolumeManager::Point)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
theCriterion.Point = theMgr.DetectedPoint (theCriterion.Depth);
|
||||
gp_GTrsf anInvTrsf = theInversedTrsf;
|
||||
if (theCriterion.Entity->HasInitLocation())
|
||||
|
Reference in New Issue
Block a user