]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp
Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_ShapeAPI.cpp
index 160b22bebaebdf79bc0fc9ce88df9d3ff9b13bf9..e02a28cc5449449847a653e4d248a1823fbb0c1b 100644 (file)
@@ -460,8 +460,14 @@ namespace GeomAlgoAPI_ShapeAPI
     const int theNumber) throw (GeomAlgoAPI_Exception)
   {
     if (theNumber <=0) {
-    std::string aError = "Multitranslation builder ";
-    aError+=":: the number of copies for the first direction is null or negative.";
+      std::string aError = "Multitranslation builder ";
+      aError+=":: the number of copies for the first direction is null or negative.";
+      throw GeomAlgoAPI_Exception(aError);
+    }
+
+    if (!theAxis) {
+      std::string aError = "Multitranslation builder ";
+      aError+=":: the first axis is not valid";
       throw GeomAlgoAPI_Exception(aError);
     }
 
@@ -484,14 +490,26 @@ namespace GeomAlgoAPI_ShapeAPI
     const int theSecondNumber) throw (GeomAlgoAPI_Exception)
   {
     if (theFirstNumber <=0) {
-    std::string aError = "Multitranslation builder ";
-    aError+=":: the number of copies for the first direction is null or negative.";
+      std::string aError = "Multitranslation builder ";
+      aError+=":: the number of copies for the first direction is null or negative.";
       throw GeomAlgoAPI_Exception(aError);
     }
 
     if (theSecondNumber <=0) {
-    std::string aError = "Multitranslation builder ";
-    aError+=":: the number of copies for the second direction is null or negative.";
+      std::string aError = "Multitranslation builder ";
+      aError+=":: the number of copies for the second direction is null or negative.";
+      throw GeomAlgoAPI_Exception(aError);
+    }
+
+    if (!theFirstAxis) {
+      std::string aError = "Multitranslation builder ";
+      aError+=":: the first axis is not valid";
+      throw GeomAlgoAPI_Exception(aError);
+    }
+
+    if (!theSecondAxis) {
+      std::string aError = "Multitranslation builder ";
+      aError+=":: the second axis is not valid";
       throw GeomAlgoAPI_Exception(aError);
     }