From: mpv Date: Wed, 12 Apr 2017 07:13:07 +0000 (+0300) Subject: Fix for crash of unit-test TestCreateCircleByCenterAndPassed on Windows where it... X-Git-Tag: V_2.7.0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b7e4e0a40586fb1a035faaa4e5aa385d70370cfd;p=modules%2Fshaper.git Fix for crash of unit-test TestCreateCircleByCenterAndPassed on Windows where it tries to make a circle tangent to line that goes through the circle center. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp index 43e816d6e..c1dd4cd32 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Circ2dBuilder.cpp @@ -139,7 +139,8 @@ private: CurveAdaptorPtr aCurve = myTangentShapes[0]; std::shared_ptr aCircleBuilder; - if (aCurve->GetType() == GeomAbs_Line) { + if (aCurve->GetType() == GeomAbs_Line && + aCurve->Line().Distance(aCenter) > Precision::Confusion()) { aCircleBuilder = std::shared_ptr( new GccAna_Circ2dTanCen(aCurve->Line(), aCenter)); } else if (aCurve->GetType() == GeomAbs_Circle) {