X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesAPI%2FFeaturesAPI_Rotation.h;h=a8b17d302001a009aaeddc841a3cc2a49b9f19ec;hb=b5893b0a30fac08134c24de4565cb513a43affa6;hp=c8e74ace884c6ae0a75825d6816bdf1e34133a1b;hpb=f98f887290d4e2b4bd6618389911e82b6b9674f3;p=modules%2Fshaper.git diff --git a/src/FeaturesAPI/FeaturesAPI_Rotation.h b/src/FeaturesAPI/FeaturesAPI_Rotation.h index c8e74ace8..a8b17d302 100644 --- a/src/FeaturesAPI/FeaturesAPI_Rotation.h +++ b/src/FeaturesAPI/FeaturesAPI_Rotation.h @@ -15,6 +15,7 @@ #include class ModelHighAPI_Double; +class ModelHighAPI_Dumper; class ModelHighAPI_Selection; /// \class FeaturesAPI_Rotation @@ -34,14 +35,34 @@ public: const ModelHighAPI_Selection& theAxisObject, const ModelHighAPI_Double& theAngle); + /// Constructor with values. + FEATURESAPI_EXPORT + FeaturesAPI_Rotation(const std::shared_ptr& theFeature, + const std::list& theMainObjects, + const ModelHighAPI_Selection& theCenterPoint, + const ModelHighAPI_Selection& theStartPoint, + const ModelHighAPI_Selection& theEndPoint); + /// Destructor. FEATURESAPI_EXPORT virtual ~FeaturesAPI_Rotation(); - INTERFACE_3(FeaturesPlugin_Rotation::ID(), - mainObjects, FeaturesPlugin_Rotation::OBJECTS_LIST_ID(), ModelAPI_AttributeSelectionList, /** Main objects */, - axisObject, FeaturesPlugin_Rotation::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection, /** Axis object */, - angle, FeaturesPlugin_Rotation::ANGLE_ID(), ModelAPI_AttributeDouble, /** Angle */) + INTERFACE_7(FeaturesPlugin_Rotation::ID(), + creationMethod, FeaturesPlugin_Rotation::CREATION_METHOD(), + ModelAPI_AttributeString, /** Creation method */, + mainObjects, FeaturesPlugin_Rotation::OBJECTS_LIST_ID(), + ModelAPI_AttributeSelectionList, /** Main objects */, + axisObject, FeaturesPlugin_Rotation::AXIS_OBJECT_ID(), + ModelAPI_AttributeSelection, /** Axis object */, + angle, FeaturesPlugin_Rotation::ANGLE_ID(), + ModelAPI_AttributeDouble, /** Angle */, + centerPoint, FeaturesPlugin_Rotation::CENTER_POINT_ID(), + ModelAPI_AttributeSelection, /** Center point */, + startPoint, FeaturesPlugin_Rotation::START_POINT_ID(), + ModelAPI_AttributeSelection, /** Start point */, + endPoint, FeaturesPlugin_Rotation::END_POINT_ID(), + ModelAPI_AttributeSelection, /** End point */ + ) /// Set main objects. FEATURESAPI_EXPORT @@ -54,6 +75,16 @@ public: /// Set angle. FEATURESAPI_EXPORT void setAngle(const ModelHighAPI_Double& theAngle); + + /// Set center point, start point and end point + FEATURESAPI_EXPORT + void setPoints(const ModelHighAPI_Selection& theCenterPoint, + const ModelHighAPI_Selection& theStartPoint, + const ModelHighAPI_Selection& theEndPoint); + + /// Dump wrapped feature + FEATURESAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on Rotation object. @@ -65,6 +96,15 @@ FEATURESAPI_EXPORT RotationPtr addRotation(const std::shared_ptr& thePart, const std::list& theMainObjects, const ModelHighAPI_Selection& theAxisObject, - const ModelHighAPI_Double& theDistance); + const ModelHighAPI_Double& theAngle); + +/// \ingroup CPPHighAPI +/// \brief Create Rotation feature. +FEATURESAPI_EXPORT +RotationPtr addRotation(const std::shared_ptr& thePart, + const std::list& theMainObjects, + const ModelHighAPI_Selection& theCenterPoint, + const ModelHighAPI_Selection& theStartPoint, + const ModelHighAPI_Selection& theEndPoint); #endif // FeaturesAPI_Rotation_H_