X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_Symmetry.cpp;h=dbbecc9a7b44516071eedcaa5133dff1fc4bf5d7;hb=f60dc9dd94d5d4b0ea07e3e3cbfd5b3028f0942d;hp=e8f4db197687fd73eb40d16a4b6449e8992e0eb2;hpb=5b6031b015602aa07f5a6fc668c13ac3faf7a8a9;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Symmetry.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Symmetry.cpp index e8f4db197..dbbecc9a7 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Symmetry.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Symmetry.cpp @@ -1,8 +1,22 @@ -// Copyright (C) 2014-2016 CEA/DEN, EDF R&D - -// File: GeomAlgoAPI_Symmetry.cpp -// Created: 30 Nov 2016 -// Author: Clarisse Genrault (CEA) +// Copyright (C) 2014-2017 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,39 +55,39 @@ bool GeomAlgoAPI_Symmetry::check() switch (myMethodType) { case BY_POINT: { if (!myPoint) { - myError = "Mirror builder :: point is invalid."; + myError = "Symmetry builder :: point is not valid."; return false; } if (!mySourceShape) { - myError = "Mirror builder :: source shape is invalid."; + myError = "Symmetry builder :: source shape is not valid."; return false; } return true; } case BY_AXIS: { if (!myAxis) { - myError = "Mirror builder :: axis is invalid."; + myError = "Symmetry builder :: axis is not valid."; return false; } if (!mySourceShape) { - myError = "Mirror builder :: source shape is invalid."; + myError = "Symmetry builder :: source shape is not valid."; return false; } return true; } case BY_PLANE: { if (!myPlane) { - myError = "Mirror builder :: plane is invalid."; + myError = "Symmetry builder :: plane is not valid."; return false; } if (!mySourceShape) { - myError = "Translation builder :: source shape is invalid."; + myError = "Symmetry builder :: source shape is not valid."; return false; } return true; } default: { - myError = "Translation builder :: method not implemented."; + myError = "Symmetry builder :: method not implemented."; return false; } } @@ -101,22 +115,22 @@ void GeomAlgoAPI_Symmetry::build() break; } default: { - myError = "Mirror builder :: method not supported"; + myError = "Symmetry builder :: method not supported"; return; } } - + const TopoDS_Shape& aSourceShape = mySourceShape->impl(); - + 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 +138,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 +148,4 @@ void GeomAlgoAPI_Symmetry::build() aShape->setImpl(new TopoDS_Shape(aResult)); setShape(aShape); setDone(true); -} \ No newline at end of file +}