From: rnc Date: Fri, 26 Oct 2012 11:50:58 +0000 (+0000) Subject: Fixed 2 fatal error at 3d sketcher dialog opening and when using it. X-Git-Tag: V6_6_0b1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=63007c12d4980bb2de02e1017fd6a1c1495c9b99;p=modules%2Fgeom.git Fixed 2 fatal error at 3d sketcher dialog opening and when using it. --- diff --git a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx index 7012f28b5..a165d952c 100755 --- a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx @@ -1308,11 +1308,17 @@ void EntityGUI_3DSketcherDlg::displayDimensions (bool store) XYZ Last = getLastPoint(); XYZ Current = getCurrentPoint(); - gp_Pnt P0(Last.x,Last.y,Last.z); + gp_Pnt Last_Pnt(Last.x,Last.y,Last.z); + gp_Pnt P0 = Last_Pnt; if (myMode == 0) // Absolute coordinates P0=gp::Origin(); gp_Pnt Current_Pnt(Current.x,Current.y,Current.z); gp_Pnt P1, P2; + + // Check if last end current point are coincident + if (Last_Pnt.IsEqual(Current_Pnt, 1e-7)) + return; + gp_Dir aNormal = getPresentationPlane(); if (myCoordType == 0) @@ -1535,7 +1541,7 @@ Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(doub double aLength = P0.Distance(P1); // Check input data - if (Abs(theAngle - 90.0) < Precision::Angular() || + if (Abs(theAngle) < Precision::Angular() || aLength < Precision::Confusion()) return NULL;