Salome HOME
Preparation of intermediate revision
[modules/geom.git] / src / GEOMImpl / GEOMImpl_CircleDriver.cxx
index 2edcc5c1b4263ae9c3a79f1c71daf661aa58ae2e..6623453818ecb7055a7eec3a002db967739da4d7 100644 (file)
@@ -111,8 +111,13 @@ Standard_Integer GEOMImpl_CircleDriver::Execute(TFunction_Logbook& log) const
     }
     // Axes
     gp_Ax2 anAxes (aP, aV);
+    // Radius
+    double anR = aCI.GetRadius();
+    char aMsg[] = "Circle creation aborted: radius value less than 1e-07 is not acceptable";
+    if (anR < Precision::Confusion())
+      Standard_ConstructionError::Raise(aMsg);
     // Circle
-    gp_Circ aCirc (anAxes, aCI.GetRadius());
+    gp_Circ aCirc (anAxes, anR);
     aShape = BRepBuilderAPI_MakeEdge(aCirc).Edge();
   }
   else if (aType == CIRCLE_CENTER_TWO_PNT) {