X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPrimitivesAPI%2FPrimitivesAPI_Box.h;h=d4619a8b7f6d75b3e25f15134f4463dee4bbba4c;hb=79099cce04bb946f2cd5152aa1f4df67eaebe181;hp=fc084964d4383ba6ff50b59e3eefbd8794b72659;hpb=0b6a6217d4203167a8044456aed1866335d0c334;p=modules%2Fshaper.git diff --git a/src/PrimitivesAPI/PrimitivesAPI_Box.h b/src/PrimitivesAPI/PrimitivesAPI_Box.h index fc084964d..d4619a8b7 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Box.h +++ b/src/PrimitivesAPI/PrimitivesAPI_Box.h @@ -1,11 +1,25 @@ -// Copyright (C) 2014-2016 CEA/DEN, EDF R&D --> +// 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 +// -// File: PrimitivesAPI_Box.h -// Created: 28 June 2016 -// Author: Clarisse Genrault (CEA) - -#ifndef PrimitivesAPI_Box_H_ -#define PrimitivesAPI_Box_H_ +#ifndef PRIMITIVESAPI_BOX_H_ +#define PRIMITIVESAPI_BOX_H_ #include "PrimitivesAPI.h" @@ -17,7 +31,7 @@ class ModelHighAPI_Double; class ModelHighAPI_Selection; -/// \class PrimitivesPlugin_Box +/// \class PrimitivesAPI_Box /// \ingroup CPPHighAPI /// \brief Interface for primitive Box feature. class PrimitivesAPI_Box: public ModelHighAPI_Interface @@ -26,43 +40,52 @@ public: /// Constructor without values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Box(const std::shared_ptr& theFeature); - + /// Constructor with values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Box(const std::shared_ptr& theFeature, const ModelHighAPI_Double& theDx, const ModelHighAPI_Double& theDy, const ModelHighAPI_Double& theDz); - + /// Constructor with values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Box(const std::shared_ptr& theFeature, const ModelHighAPI_Selection& theFirstPoint, const ModelHighAPI_Selection& theSecondPoint); - + /// Destructor. PRIMITIVESAPI_EXPORT virtual ~PrimitivesAPI_Box(); - - INTERFACE_6(PrimitivesPlugin_Box::ID(), + + INTERFACE_6(PrimitivesPlugin_Box::ID(), creationMethod, PrimitivesPlugin_Box::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */, - dx, PrimitivesPlugin_Box::DX_ID(), ModelAPI_AttributeDouble, /** Dimension in X */, - dy, PrimitivesPlugin_Box::DY_ID(), ModelAPI_AttributeDouble, /** Dimension in Y */, - dz, PrimitivesPlugin_Box::DZ_ID(), ModelAPI_AttributeDouble, /** Dimension in Z */, - firstPoint, PrimitivesPlugin_Box::POINT_FIRST_ID(), ModelAPI_AttributeSelection, /** First point */, - secondPoint, PrimitivesPlugin_Box::POINT_SECOND_ID(), ModelAPI_AttributeSelection, /** Second point */) - + dx, PrimitivesPlugin_Box::DX_ID(), + ModelAPI_AttributeDouble, /** Dimension in X */, + dy, PrimitivesPlugin_Box::DY_ID(), + ModelAPI_AttributeDouble, /** Dimension in Y */, + dz, PrimitivesPlugin_Box::DZ_ID(), + ModelAPI_AttributeDouble, /** Dimension in Z */, + firstPoint, PrimitivesPlugin_Box::POINT_FIRST_ID(), + ModelAPI_AttributeSelection, /** First point */, + secondPoint, PrimitivesPlugin_Box::POINT_SECOND_ID(), + ModelAPI_AttributeSelection, /** Second point */) + /// Set dimensions PRIMITIVESAPI_EXPORT void setDimensions(const ModelHighAPI_Double& theDx, const ModelHighAPI_Double& theDy, const ModelHighAPI_Double& theDz); - + /// Set points PRIMITIVESAPI_EXPORT void setPoints(const ModelHighAPI_Selection& theFirstPoint, const ModelHighAPI_Selection& theSecondPoint); + + /// Dump wrapped feature + PRIMITIVESAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on primitive Box object @@ -83,4 +106,4 @@ BoxPtr addBox(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theFirstPoint, const ModelHighAPI_Selection& theSecondPoint); -#endif // PrimitivesAPI_Box_H_ \ No newline at end of file +#endif // PRIMITIVESAPI_BOX_H_ \ No newline at end of file