Salome HOME
Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003)
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Symmetry.cpp
index 143f41c4bfc26356b19d1ca76d497b43a38695b6..3497664ff7ca189fd5301149a9a2807c619eac0f 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-2016 CEA/DEN, EDF R&D
-
-// File:        GeomAlgoAPI_Symmetry.cpp
-// Created:     30 Nov 2016
-// Author:      Clarisse Genrault (CEA)
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
 #include "GeomAlgoAPI_Symmetry.h"
 
@@ -41,33 +54,33 @@ bool GeomAlgoAPI_Symmetry::check()
   switch (myMethodType) {
     case BY_POINT: {
       if (!myPoint) {
-        myError = "Symmetry builder :: point is invalid.";
+        myError = "Symmetry builder :: point is not valid.";
         return false;
       }
       if (!mySourceShape) {
-        myError = "Symmetry builder :: source shape is invalid.";
+        myError = "Symmetry builder :: source shape is not valid.";
         return false;
       }
       return true;
     }
     case BY_AXIS: {
       if (!myAxis) {
-        myError = "Symmetry builder :: axis is invalid.";
+        myError = "Symmetry builder :: axis is not valid.";
         return false;
       }
       if (!mySourceShape) {
-        myError = "Symmetry builder :: source shape is invalid.";
+        myError = "Symmetry builder :: source shape is not valid.";
         return false;
       }
       return true;
     }
     case BY_PLANE: {
       if (!myPlane) {
-        myError = "Symmetry builder :: plane is invalid.";
+        myError = "Symmetry builder :: plane is not valid.";
         return false;
       }
       if (!mySourceShape) {
-        myError = "Symmetry builder :: source shape is invalid.";
+        myError = "Symmetry builder :: source shape is not valid.";
         return false;
       }
       return true;
@@ -101,7 +114,7 @@ void GeomAlgoAPI_Symmetry::build()
       break;
     }
     default: {
-      myError = "Mirror builder :: method not supported";
+      myError = "Symmetry builder :: method not supported";
       return;
     }
   }
@@ -109,14 +122,14 @@ void GeomAlgoAPI_Symmetry::build()
   const TopoDS_Shape& aSourceShape = mySourceShape->impl<TopoDS_Shape>();
 
   if(aSourceShape.IsNull()) {
-    myError = "Mirror builder :: source shape does not contain any actual shape.";
+    myError = "Symmetry builder :: source shape does not contain any actual shape.";
     return;
   }
 
   // Transform the shape while copying it.
   BRepBuilderAPI_Transform* aBuilder = new BRepBuilderAPI_Transform(aSourceShape, *aTrsf, true);
   if(!aBuilder) {
-    myError = "Mirror builder :: source shape does not contain any actual shape.";
+    myError = "Symmetry builder :: transform initialization failed.";
     return;
   }
 
@@ -124,7 +137,7 @@ void GeomAlgoAPI_Symmetry::build()
   setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
 
   if(!aBuilder->IsDone()) {
-    myError = "Mirror builder :: source shape does not contain any actual shape.";
+    myError = "Symmetry builder :: algorithm failed.";
     return;
   }
 
@@ -134,4 +147,4 @@ void GeomAlgoAPI_Symmetry::build()
   aShape->setImpl(new TopoDS_Shape(aResult));
   setShape(aShape);
   setDone(true);
-}
\ No newline at end of file
+}