X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Circle.h;h=0d7d436377ee96bcc93c0dd8f146f0e44cd9eda4;hb=59610176acaef6df307f9a2ec24fe3a14bfaef0b;hp=b4332c67553898e49db83fed180a4f378381739e;hpb=f98f887290d4e2b4bd6618389911e82b6b9674f3;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Circle.h b/src/SketchAPI/SketchAPI_Circle.h index b4332c675..0d7d43637 100644 --- a/src/SketchAPI/SketchAPI_Circle.h +++ b/src/SketchAPI/SketchAPI_Circle.h @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: SketchAPI_Circle.h -// Created: 09 June 2016 -// Author: Dmitry Bobylev +// Copyright (C) 2014-2021 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 SketchAPI_Circle_H_ #define SketchAPI_Circle_H_ @@ -14,7 +27,7 @@ class ModelHighAPI_Selection; -/// \class FeaturesAPI_Boolean +/// \class SketchAPI_Circle /// \ingroup CPPHighAPI /// \brief Interface for Circle feature. class SketchAPI_Circle: public SketchAPI_SketchEntity @@ -37,20 +50,6 @@ public: const std::shared_ptr& theCenter, double theRadius); - /// Constructor with values. - SKETCHAPI_EXPORT - SketchAPI_Circle(const std::shared_ptr& theFeature, - double theX1, double theY1, - double theX2, double theY2, - double theX3, double theY3); - - /// Constructor with values. - SKETCHAPI_EXPORT - SketchAPI_Circle(const std::shared_ptr& theFeature, - const std::shared_ptr& thePoint1, - const std::shared_ptr& thePoint2, - const std::shared_ptr& thePoint3); - /// Constructor with values. SKETCHAPI_EXPORT SketchAPI_Circle(const std::shared_ptr& theFeature, @@ -59,20 +58,19 @@ public: /// Constructor with values. SKETCHAPI_EXPORT SketchAPI_Circle(const std::shared_ptr& theFeature, - const std::string& theExternalName); + const std::wstring& theExternalName); /// Destructor. SKETCHAPI_EXPORT virtual ~SketchAPI_Circle(); - INTERFACE_7(SketchPlugin_Circle::ID(), - circleType, SketchPlugin_Circle::CIRCLE_TYPE(), ModelAPI_AttributeString, /** Circle type */, - center, SketchPlugin_Circle::CENTER_ID(), GeomDataAPI_Point2D, /** Center point */, - radius, SketchPlugin_Circle::RADIUS_ID(), ModelAPI_AttributeDouble, /** Radius */, - firstPoint, SketchPlugin_Circle::FIRST_POINT_ID(), GeomDataAPI_Point2D, /** First point */, - secondPoint, SketchPlugin_Circle::SECOND_POINT_ID(), GeomDataAPI_Point2D, /** Second point */, - thirdPoint, SketchPlugin_Circle::THIRD_POINT_ID(), GeomDataAPI_Point2D, /** Third point */, - external, SketchPlugin_Circle::EXTERNAL_ID(), ModelAPI_AttributeSelection, /** External */) + INTERFACE_3(SketchPlugin_Circle::ID(), + center, SketchPlugin_Circle::CENTER_ID(), + GeomDataAPI_Point2D, /** Center point */, + radius, SketchPlugin_Circle::RADIUS_ID(), + ModelAPI_AttributeDouble, /** Radius */, + external, SketchPlugin_Circle::EXTERNAL_ID(), + ModelAPI_AttributeSelection, /** External */) /// Set by center and radius. SKETCHAPI_EXPORT @@ -82,25 +80,13 @@ public: SKETCHAPI_EXPORT void setByCenterAndRadius(const std::shared_ptr& theCenter, double theRadius); - /// Set by three points. - SKETCHAPI_EXPORT - void setByThreePoints(double theX1, double theY1, - double theX2, double theY2, - double theX3, double theY3); - - /// Set by three points. - SKETCHAPI_EXPORT - void setByThreePoints(const std::shared_ptr& thePoint1, - const std::shared_ptr& thePoint2, - const std::shared_ptr& thePoint3); - /// Set by external. SKETCHAPI_EXPORT void setByExternal(const ModelHighAPI_Selection& theExternal); /// Set by external name. SKETCHAPI_EXPORT - void setByExternalName(const std::string& theExternalName); + void setByExternalName(const std::wstring& theExternalName); /// Set center. SKETCHAPI_EXPORT @@ -114,29 +100,9 @@ public: SKETCHAPI_EXPORT void setRadius(double theRadius); - /// Set first point. - SKETCHAPI_EXPORT - void setFirstPoint(double theX, double theY); - - /// Set first point. - SKETCHAPI_EXPORT - void setFirstPoint(const std::shared_ptr& thePoint); - - /// Set second point. - SKETCHAPI_EXPORT - void setSecondPoint(double theX, double theY); - - /// Set second point. - SKETCHAPI_EXPORT - void setSecondPoint(const std::shared_ptr& thePoint); - - /// Set third point. - SKETCHAPI_EXPORT - void setThirdPoint(double theX, double theY); - - /// Set third point. + /// Dump wrapped feature SKETCHAPI_EXPORT - void setThirdPoint(const std::shared_ptr& thePoint); + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on Circle object.