-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File: FeaturesAPI_Rotation.h
-// Created: 07 June 2016
-// Author: Dmitry Bobylev
+// Copyright (C) 2014-2020 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
+//
#ifndef FeaturesAPI_Rotation_H_
#define FeaturesAPI_Rotation_H_
#include <FeaturesPlugin_Rotation.h>
+#include <ModelHighAPI_Double.h>
#include <ModelHighAPI_Interface.h>
#include <ModelHighAPI_Macro.h>
+#include <ModelHighAPI_Selection.h>
-class ModelHighAPI_Double;
class ModelHighAPI_Dumper;
-class ModelHighAPI_Selection;
/// \class FeaturesAPI_Rotation
/// \ingroup CPPHighAPI
void setAngle(const ModelHighAPI_Double& theAngle);
/// Set center point, start point and end point
+ FEATURESAPI_EXPORT
void setPoints(const ModelHighAPI_Selection& theCenterPoint,
const ModelHighAPI_Selection& theStartPoint,
const ModelHighAPI_Selection& theEndPoint);
/// Pointer on Rotation object.
typedef std::shared_ptr<FeaturesAPI_Rotation> RotationPtr;
-/// \ingroup CPPHighAPI
-/// \brief Create Rotation feature.
-FEATURESAPI_EXPORT
-RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
- const std::list<ModelHighAPI_Selection>& theMainObjects,
- const ModelHighAPI_Selection& theAxisObject,
- const ModelHighAPI_Double& theAngle);
+
+#define DUMMY std::pair<ModelHighAPI_Selection, ModelHighAPI_Double>()
/// \ingroup CPPHighAPI
/// \brief Create Rotation feature.
-FEATURESAPI_EXPORT
-RotationPtr addRotation(const std::shared_ptr<ModelAPI_Document>& thePart,
- const std::list<ModelHighAPI_Selection>& theMainObjects,
- const ModelHighAPI_Selection& theCenterPoint,
- const ModelHighAPI_Selection& theStartPoint,
- const ModelHighAPI_Selection& theEndPoint);
+FEATURESAPI_EXPORT RotationPtr addRotation(
+ const std::shared_ptr<ModelAPI_Document>& part,
+ const std::list<ModelHighAPI_Selection>& objects,
+ const ModelHighAPI_Selection& axis = ModelHighAPI_Selection(),
+ const std::pair<ModelHighAPI_Selection, ModelHighAPI_Double>& angle = DUMMY,
+ const ModelHighAPI_Selection& center = ModelHighAPI_Selection(),
+ const ModelHighAPI_Selection& start = ModelHighAPI_Selection(),
+ const ModelHighAPI_Selection& end = ModelHighAPI_Selection(),
+ const bool keepSubResults = false);
#endif // FeaturesAPI_Rotation_H_