X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPrimitivesAPI%2FPrimitivesAPI_Cylinder.h;h=4261135476655e7f3e931544537f1472ce3e0172;hb=d5b5ce2284869d8b97ce638502c58c810bbeb0c7;hp=3e16d41c8b812ae3fc0ff8b4905ce119ed9020b0;hpb=fbb1d8a5ead180501e98acaf19acdda4880a2050;p=modules%2Fshaper.git diff --git a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h index 3e16d41c8..426113547 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h +++ b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: PrimitivesAPI_Cylinder.h -// Created: 12 Jan 2017 -// 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 +// #ifndef PRIMITIVESAPI_CYLINDER_H_ #define PRIMITIVESAPI_CYLINDER_H_ @@ -34,6 +48,8 @@ public: const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, const ModelHighAPI_Double& theHeight); + + /// Constructor with values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, const ModelHighAPI_Selection& theBasePoint, @@ -42,50 +58,35 @@ public: const ModelHighAPI_Double& theHeight, const ModelHighAPI_Double& theAngle); - /// Constructor with values. - /*PRIMITIVESAPI_EXPORT - explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Selection& theFirstPoint, - const ModelHighAPI_Selection& theSecondPoint);*/ - /// Destructor. PRIMITIVESAPI_EXPORT virtual ~PrimitivesAPI_Cylinder(); INTERFACE_6(PrimitivesPlugin_Cylinder::ID(), - creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(), - ModelAPI_AttributeString, /** Creation method */, - basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(), - ModelAPI_AttributeSelection, /** Base point */, - axis, PrimitivesPlugin_Cylinder::AXIS_ID(), - ModelAPI_AttributeSelection, /** Axis */, - radius, PrimitivesPlugin_Cylinder::RADIUS_ID(), - ModelAPI_AttributeDouble, /** Radius */, - height, PrimitivesPlugin_Cylinder::HEIGHT_ID(), - ModelAPI_AttributeDouble, /** Height */, - angle, PrimitivesPlugin_Cylinder::ANGLE_ID(), - ModelAPI_AttributeDouble, /** Angle */) - - /// Set base point and axis - PRIMITIVESAPI_EXPORT - void setObjects(const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis); - - /// Set radius and height + creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(), + ModelAPI_AttributeString, /** Creation method */, + basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(), + ModelAPI_AttributeSelection, /** Base point */, + axis, PrimitivesPlugin_Cylinder::AXIS_ID(), + ModelAPI_AttributeSelection, /** Axis */, + radius, PrimitivesPlugin_Cylinder::RADIUS_ID(), + ModelAPI_AttributeDouble, /** Radius */, + height, PrimitivesPlugin_Cylinder::HEIGHT_ID(), + ModelAPI_AttributeDouble, /** Height */, + angle, PrimitivesPlugin_Cylinder::ANGLE_ID(), + ModelAPI_AttributeDouble, /** Angle */) + + /// Set dimensions PRIMITIVESAPI_EXPORT void setSizes(const ModelHighAPI_Double& theRadius, const ModelHighAPI_Double& theHeight); - /// Set angle - PRIMITIVESAPI_EXPORT - void setAngle(const ModelHighAPI_Double& theAngle); - /// Dump wrapped feature PRIMITIVESAPI_EXPORT virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; -/// Pointer on primitive Box object +/// Pointer on primitive Cylinder object typedef std::shared_ptr CylinderPtr; /// \ingroup CPPHighAPI @@ -95,8 +96,7 @@ CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle); + const ModelHighAPI_Double& theHeight); /// \ingroup CPPHighAPI /// \brief Create primitive Cylinder feature. @@ -105,20 +105,22 @@ CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight); + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle); + /// \ingroup CPPHighAPI /// \brief Create primitive Cylinder feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle); + const ModelHighAPI_Double& theHeight); /// \ingroup CPPHighAPI /// \brief Create primitive Cylinder feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight); + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle); #endif // PRIMITIVESAPI_CYLINDER_H_ \ No newline at end of file