]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Added a check on orientation input parameter
authorrnc <rnc@opencascade.com>
Thu, 15 Nov 2012 13:11:17 +0000 (13:11 +0000)
committerrnc <rnc@opencascade.com>
Thu, 15 Nov 2012 13:11:17 +0000 (13:11 +0000)
src/GEOMImpl/GEOMImpl_IAdvancedOperations.cxx

index 70f0ab20e47f65b52af6c5a2debe80302386a8ca..9b982e7354ea1b7c9c45e8644dfb6ef655e4bd1e 100644 (file)
@@ -2287,7 +2287,14 @@ Handle(GEOM_Object) GEOMImpl_IAdvancedOperations::MakeDividedDisk (double theR,
                                                                    int theOrientation, int thePattern)
 {
   SetErrorCode(KO);
-
+  
+  if (theOrientation != 1 &&
+      theOrientation != 2 &&
+      theOrientation != 3)
+  {
+    SetErrorCode("theOrientation must be 1(=OXY), 2(=OYZ) or 3(=OZX)");
+    return NULL;
+  }
   //Add a new object
   Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);