-// 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"
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;
break;
}
default: {
- myError = "Mirror builder :: method not supported";
+ myError = "Symmetry builder :: method not supported";
return;
}
}
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;
}
setBuilderType(OCCT_BRepBuilderAPI_MakeShape);
if(!aBuilder->IsDone()) {
- myError = "Mirror builder :: source shape does not contain any actual shape.";
+ myError = "Symmetry builder :: algorithm failed.";
return;
}
aShape->setImpl(new TopoDS_Shape(aResult));
setShape(aShape);
setDone(true);
-}
\ No newline at end of file
+}