From: Clarisse Genrault Date: Thu, 16 Mar 2017 15:28:02 +0000 (+0100) Subject: Updated the code of the "Cylinder" primitive. X-Git-Tag: V_2.9.0~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=acded43ea2ec19ea995e087ab651bd6360f7ac57;p=modules%2Fshaper.git Updated the code of the "Cylinder" primitive. --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h b/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h index 6bffee998..3577d3b1d 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h @@ -39,7 +39,7 @@ class GeomAlgoAPI_Cylinder : public GeomAlgoAPI_MakeShape const double theHeight, const double theAngle); - /// Checks if data for the cyminder construction is OK. + /// Checks if data for the cylinder construction is OK. GEOMALGOAPI_EXPORT bool check(); /// Builds the cylinder. diff --git a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp index 4bd696da7..6e1491929 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp +++ b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp @@ -10,8 +10,6 @@ #include #include -#include - //================================================================================================== PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature) : ModelHighAPI_Interface(theFeature) @@ -21,10 +19,10 @@ PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis, - const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight) + const ModelHighAPI_Selection& theBasePoint, + const ModelHighAPI_Selection& theAxis, + const ModelHighAPI_Double& theRadius, + const ModelHighAPI_Double& theHeight) : ModelHighAPI_Interface(theFeature) { if (initialize()) { @@ -37,11 +35,11 @@ PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis, - const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle) + const ModelHighAPI_Selection& theBasePoint, + const ModelHighAPI_Selection& theAxis, + const ModelHighAPI_Double& theRadius, + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle) : ModelHighAPI_Interface(theFeature) { if (initialize()) { diff --git a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h index 3d473798b..ee128ef51 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h +++ b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h @@ -17,9 +17,9 @@ class ModelHighAPI_Double; class ModelHighAPI_Selection; -/// \class PrimitivesAPI_Box +/// \class PrimitivesAPI_Cylinder /// \ingroup CPPHighAPI -/// \brief Interface for primitive Box feature. +/// \brief Interface for primitive Cylinder feature. class PrimitivesAPI_Cylinder: public ModelHighAPI_Interface { public: @@ -27,13 +27,6 @@ public: PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature); - /// Constructor with values. - /*PRIMITIVESAPI_EXPORT - explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Double& theDx, - const ModelHighAPI_Double& theDy, - const ModelHighAPI_Double& theDz);*/ - /// Constructor with values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, @@ -59,15 +52,15 @@ public: creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */, basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(), - ModelAPI_AttributeSelection, /** Dimension in X */, + ModelAPI_AttributeSelection, /** Base point */, axis, PrimitivesPlugin_Cylinder::AXIS_ID(), - ModelAPI_AttributeSelection, /** Dimension in Y */, + ModelAPI_AttributeSelection, /** Axis */, radius, PrimitivesPlugin_Cylinder::RADIUS_ID(), - ModelAPI_AttributeDouble, /** Dimension in Z */, + ModelAPI_AttributeDouble, /** Radius */, height, PrimitivesPlugin_Cylinder::HEIGHT_ID(), - ModelAPI_AttributeDouble, /** First point */, + ModelAPI_AttributeDouble, /** Height */, angle, PrimitivesPlugin_Cylinder::ANGLE_ID(), - ModelAPI_AttributeDouble, /** Second point */) + ModelAPI_AttributeDouble, /** Angle */) /// Set dimensions PRIMITIVESAPI_EXPORT @@ -79,11 +72,11 @@ public: virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; -/// Pointer on primitive Box object +/// Pointer on primitive Cylinder object typedef std::shared_ptr CylinderPtr; /// \ingroup CPPHighAPI -/// \brief Create primitive Box feature. +/// \brief Create primitive Cylinder feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, @@ -92,7 +85,7 @@ CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theHeight); /// \ingroup CPPHighAPI -/// \brief Create primitive Box feature. +/// \brief Create primitive Cylinder feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, @@ -102,14 +95,14 @@ CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theAngle); /// \ingroup CPPHighAPI -/// \brief Create primitive Box feature. +/// \brief Create primitive Cylinder feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, const ModelHighAPI_Double& theHeight); /// \ingroup CPPHighAPI -/// \brief Create primitive Box feature. +/// \brief Create primitive Cylinder feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, diff --git a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp index 83fbb8e88..7a5cbab21 100644 --- a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp +++ b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp @@ -19,8 +19,6 @@ #include #include -#include - //================================================================================================= PrimitivesPlugin_Cylinder::PrimitivesPlugin_Cylinder() {