From: kgv Date: Mon, 11 Feb 2019 09:01:40 +0000 (+0300) Subject: 0030477: Visualization - crash in AIS_Manipulator::ObjectTransformation after using... X-Git-Tag: V7_4_0_beta~250 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5ac0f9897434ee812c910a59b66226268d3a4ec9;p=occt-copy.git 0030477: Visualization - crash in AIS_Manipulator::ObjectTransformation after using V3d_View::SetProj(V3d_Zpos) --- diff --git a/src/AIS/AIS_Manipulator.cxx b/src/AIS/AIS_Manipulator.cxx index 367b7bae18..e47a6c3625 100644 --- a/src/AIS/AIS_Manipulator.cxx +++ b/src/AIS/AIS_Manipulator.cxx @@ -493,6 +493,7 @@ Standard_Boolean AIS_Manipulator::ObjectTransformation (const Standard_Integer t const gp_Lin aLine (myStartPosition.Location(), myAxes[myCurrentIndex].Position().Direction()); Extrema_ExtElC anExtrema (anInputLine, aLine, Precision::Angular()); if (!anExtrema.IsDone() + || anExtrema.IsParallel() || anExtrema.NbExt() != 1) { // translation cannot be done co-directed with camera @@ -538,7 +539,9 @@ Standard_Boolean AIS_Manipulator::ObjectTransformation (const Standard_Integer t const gp_Pnt aPosLoc = myStartPosition.Location(); const gp_Ax1 aCurrAxis = getAx1FromAx2Dir (myStartPosition, myCurrentIndex); IntAna_IntConicQuad aIntersector (anInputLine, gp_Pln (aPosLoc, aCurrAxis.Direction()), Precision::Angular(), Precision::Intersection()); - if (!aIntersector.IsDone() || aIntersector.NbPoints() < 1) + if (!aIntersector.IsDone() + || aIntersector.IsParallel() + || aIntersector.NbPoints() < 1) { return Standard_False; }