Anonymous | Login | 2021-01-16 11:24 MSK | ![]() |
My View | View Issues | Change Log | Roadmap |
View Revisions: Issue #31848 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0031848: [REGRESSION] Visualization - MoveTo() triggers exception "gp_Dir() - input vector has zero norm" | ||
Revision | 2020-10-13 13:38 by kgv | ||
Description | Create a sphere, and then move mouse to the pole points(south or north) will trigger exception "gp_Dir() - input vector has zero norm". After digging into code, the issue occurs in below function: gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]) is a zero vector, which can't be converted to a direction. Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, const gp_Pnt& thePnt3, Select3D_TypeOfSensitivity theSensType, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { // BUG: line 716 throw exception: "gp_Dir() - input vector has zero norm" // line 716 if (myViewRayDir.IsParallel (gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]), Precision::Angular())) { aNearestEdgeIdx2 = aNearestEdgeIdx1 == 0 ? 2 : aNearestEdgeIdx1 - 1; } } inline gp_Dir::gp_Dir (const gp_Vec& V) { const gp_XYZ& XYZ = V.XYZ(); Standard_Real X = XYZ.X(); Standard_Real Y = XYZ.Y(); Standard_Real Z = XYZ.Z(); Standard_Real D = sqrt(X * X + Y * Y + Z * Z); Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); } There is just occur on version 7.5.0 BETA. |
||
Revision | 2020-10-13 13:31 by Vico Liang | ||
Description | Create a sphere, and then move mouse to the pole points(south or north) will trigger exception "gp_Dir() - input vector has zero norm". After digging into code, the issue occurs in below function: gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]) is a zero vector, which can't be converted to a direction. Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, const gp_Pnt& thePnt3, Select3D_TypeOfSensitivity theSensType, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { // BUG: line 716 throw exception: "gp_Dir() - input vector has zero norm" // line 716 if (myViewRayDir.IsParallel (gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]), Precision::Angular())) { aNearestEdgeIdx2 = aNearestEdgeIdx1 == 0 ? 2 : aNearestEdgeIdx1 - 1; } } inline gp_Dir::gp_Dir (const gp_Vec& V) { const gp_XYZ& XYZ = V.XYZ(); Standard_Real X = XYZ.X(); Standard_Real Y = XYZ.Y(); Standard_Real Z = XYZ.Z(); Standard_Real D = sqrt(X * X + Y * Y + Z * Z); Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); } There is just occur on version 7.5.0 BETA. |
||
Revision | 2020-10-13 13:30 by Vico Liang | ||
Description | Create a sphere, and then move mouse to the pole points(south or north) will trigger exception "gp_Dir() - input vector has zero norm". After digging into code, the issue occurs in blow function: gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]) is a zero vector, which can't be converted to a direction. Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1, const gp_Pnt& thePnt2, const gp_Pnt& thePnt3, Select3D_TypeOfSensitivity theSensType, const SelectMgr_ViewClipRange& theClipRange, SelectBasics_PickResult& thePickResult) const { // BUG: line 716 throw exception: "gp_Dir() - input vector has zero norm" // line 716 if (myViewRayDir.IsParallel (gp_Vec (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2]), Precision::Angular())) { aNearestEdgeIdx2 = aNearestEdgeIdx1 == 0 ? 2 : aNearestEdgeIdx1 - 1; } } inline gp_Dir::gp_Dir (const gp_Vec& V) { const gp_XYZ& XYZ = V.XYZ(); Standard_Real X = XYZ.X(); Standard_Real Y = XYZ.Y(); Standard_Real Z = XYZ.Z(); Standard_Real D = sqrt(X * X + Y * Y + Z * Z); Standard_ConstructionError_Raise_if (D <= gp::Resolution(), "gp_Dir() - input vector has zero norm"); coord.SetX(X / D); coord.SetY(Y / D); coord.SetZ(Z / D); } There is just occur on version 7.5.0 BETA. |
Copyright © 2000 - 2021 MantisBT Team |