]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2271 'Fatal error' during sketching : avoid error by the file loading
authornds <nds@opencascade.com>
Mon, 9 Oct 2017 08:11:14 +0000 (11:11 +0300)
committernds <nds@opencascade.com>
Mon, 9 Oct 2017 08:11:14 +0000 (11:11 +0300)
src/SketchAPI/SketchAPI_Projection.cpp

index 38e84be98560cfff64879f6bfe0364dd52d64037..6d82651e93c7f0383fe2629a1f8cf7fefd6c98e4 100644 (file)
 
 #include <SketchPlugin_Line.h>
 #include <SketchPlugin_Circle.h>
+#include <SketchPlugin_Point.h>
 
 #include <SketchAPI_Line.h>
 #include <SketchAPI_Circle.h>
 #include <SketchAPI_Arc.h>
+#include <SketchAPI_Point.h>
 
 #include <ModelHighAPI_Dumper.h>
 #include <ModelHighAPI_Selection.h>
@@ -95,11 +97,14 @@ std::shared_ptr<SketchAPI_SketchEntity> SketchAPI_Projection::createdFeature() c
     return anEntity;
   }
 
-  aProjectedFeature->getKind() == SketchPlugin_Line::ID() ?
-    anEntity.reset(new SketchAPI_Line(aProjectedFeature)) :
-    aProjectedFeature->getKind() == SketchPlugin_Circle::ID() ?
-      anEntity.reset(new SketchAPI_Circle(aProjectedFeature)) :
-      anEntity.reset(new SketchAPI_Arc(aProjectedFeature));
+  if (aProjectedFeature->getKind() == SketchPlugin_Line::ID())
+    anEntity.reset(new SketchAPI_Line(aProjectedFeature));
+  else if (aProjectedFeature->getKind() == SketchPlugin_Circle::ID())
+    anEntity.reset(new SketchAPI_Circle(aProjectedFeature));
+  else if (aProjectedFeature->getKind() == SketchPlugin_Arc::ID())
+    anEntity.reset(new SketchAPI_Arc(aProjectedFeature));
+  else if (aProjectedFeature->getKind() == SketchPlugin_Point::ID())
+    anEntity.reset(new SketchAPI_Point(aProjectedFeature));
 
   return anEntity;
 }