mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0031848: [REGRESSION] Visualization - MoveTo() triggers exception "gp_Dir() - input vector has zero norm"
SelectMgr_RectangularFrustum::Overlaps() - added zero magnitude check. Commands vsphere,vcylinder,vtorus have been corrected to provide missing parameters defining number of stacks and slices.
This commit is contained in:
@@ -713,7 +713,9 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
|
||||
}
|
||||
}
|
||||
Standard_Integer aNearestEdgeIdx2 = (aNearestEdgeIdx1 + 1) % 3;
|
||||
if (myViewRayDir.IsParallel (gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]), Precision::Angular()))
|
||||
const gp_Vec aVec12 (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]);
|
||||
if (aVec12.SquareMagnitude() > gp::Resolution()
|
||||
&& myViewRayDir.IsParallel (aVec12, Precision::Angular()))
|
||||
{
|
||||
aNearestEdgeIdx2 = aNearestEdgeIdx1 == 0 ? 2 : aNearestEdgeIdx1 - 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user