X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Rotation.h;h=dc70c0e95a0efbde731ab2648b8d65d68178bbb5;hb=782cb1f92bf82c5b10c912d523e004ef0cf6b8a3;hp=e5a3281b4531fa462ffb8366d8925c50f85f39ae;hpb=84fc5a28f68ca5301b9466f92b511ccf411de0fc;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Rotation.h b/src/SketchAPI/SketchAPI_Rotation.h index e5a3281b4..dc70c0e95 100644 --- a/src/SketchAPI/SketchAPI_Rotation.h +++ b/src/SketchAPI/SketchAPI_Rotation.h @@ -1,20 +1,35 @@ -// Name : SketchAPI_Rotation.h -// Purpose: +// Copyright (C) 2014-2024 CEA, EDF +// +// 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 // -// History: -// 16/06/16 - Sergey POKHODENKO - Creation of the file #ifndef SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ #define SRC_SKETCHAPI_SKETCHAPI_ROTATION_H_ //-------------------------------------------------------------------------------------- #include "SketchAPI.h" +#include "SketchAPI_SketchEntity.h" #include #include -#include "SketchAPI_SketchEntity.h" +#include +#include //-------------------------------------------------------------------------------------- class ModelAPI_Object; class ModelHighAPI_Double; @@ -25,7 +40,7 @@ class ModelHighAPI_RefAttr; * \ingroup CPPHighAPI * \brief Interface for Rotation feature */ -class SketchAPI_Rotation : public SketchAPI_SketchEntity +class SketchAPI_Rotation : public ModelHighAPI_Interface { public: /// Constructor without values @@ -38,21 +53,46 @@ public: const ModelHighAPI_RefAttr & theCenter, const ModelHighAPI_Double & theAngle, const ModelHighAPI_Integer & theNumberOfObjects, - bool theFullValue = false); + bool theFullValue = false, + bool theReversed = false); /// Destructor SKETCHAPI_EXPORT virtual ~SketchAPI_Rotation(); - INTERFACE_7(SketchPlugin_MultiRotation::ID(), - rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(), ModelAPI_AttributeRefList, /** Rotation list */, - center, SketchPlugin_MultiRotation::CENTER_ID(), ModelAPI_AttributeRefAttr, /** Center */, - angle, SketchPlugin_MultiRotation::ANGLE_ID(), ModelAPI_AttributeDouble, /** Angle */, - numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger, /** Number of objects */, - valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(), ModelAPI_AttributeString, /** Value type */, - referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(), ModelAPI_AttributeRefList, /** Reference objects */, - rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(), ModelAPI_AttributeRefList, /** Rotated objects */ + INTERFACE_8(SketchPlugin_MultiRotation::ID(), + rotationList, SketchPlugin_MultiRotation::ROTATION_LIST_ID(), + ModelAPI_AttributeRefList, /** Rotation list */, + center, SketchPlugin_MultiRotation::CENTER_ID(), + ModelAPI_AttributeRefAttr, /** Center */, + angle, SketchPlugin_MultiRotation::ANGLE_ID(), + ModelAPI_AttributeDouble, /** Angle */, + reversed, SketchPlugin_MultiRotation::REVERSED_ID(), + ModelAPI_AttributeBoolean, /** Negative angle */, + numberOfObjects, SketchPlugin_MultiRotation::NUMBER_OF_OBJECTS_ID(), + ModelAPI_AttributeInteger, /** Number of objects */, + valueType, SketchPlugin_MultiRotation::ANGLE_TYPE(), + ModelAPI_AttributeString, /** Value type */, + referenceObjects, SketchPlugin_MultiRotation::ENTITY_A(), + ModelAPI_AttributeRefList, /** Reference objects */, + rotatedObjects, SketchPlugin_MultiRotation::ENTITY_B(), + ModelAPI_AttributeRefList, /** Rotated objects */ ) + /// Set list of objects to be rotated + SKETCHAPI_EXPORT + void setRotationList(const std::list >& theObjects); + + /// List of rotated objects. + /// [DEPRECATED]: use rotatedList() instead. + SKETCHAPI_EXPORT + std::list > rotated() const; + + /// List of rotated objects. + SKETCHAPI_EXPORT + std::list > rotatedList() const; + + /// Dump wrapped feature + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; //! Pointer on Rotation object