X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Axis.h;h=473d3e3524e18f86435d88e3e9df969656fb4a29;hb=676e0178fdedf35ba607ef9d4f02d871dd06fa28;hp=099d547e35016bf482d28698ac12c1bd4d9903a9;hpb=a3cd8f27f76183cfc2d0728e6388696ab9dce1b8;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Axis.h b/src/ConstructionPlugin/ConstructionPlugin_Axis.h index 099d547e3..473d3e352 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Axis.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Axis.h @@ -11,18 +11,8 @@ #include #include - -/// Point kind -const std::string CONSTRUCTION_AXIS_KIND("Axis"); - -/// attribute name for first point -const std::string POINT_ATTR_FIRST = "firstPoint"; - -/// attribute name for second point -const std::string POINT_ATTR_SECOND = "secondPoint"; - /**\class ConstructionPlugin_Axis - * \ingroup DataModel + * \ingroup Plugins * \brief Feature for creation of the new axis in PartSet. */ class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomPrs @@ -31,10 +21,50 @@ class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomP /// Returns the kind of a feature CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind() { - static std::string MY_KIND = CONSTRUCTION_AXIS_KIND; + static std::string MY_KIND = ConstructionPlugin_Axis::ID(); return MY_KIND; } + /// Axis kind + inline static const std::string& ID() + { + static const std::string CONSTRUCTION_AXIS_KIND("Axis"); + return CONSTRUCTION_AXIS_KIND; + } + + /// attribute name for first point + inline static const std::string& METHOD() + { + static const std::string METHOD_ATTR("creationMethod"); + return METHOD_ATTR; + } + /// attribute name for first point + inline static const std::string& POINT_FIRST() + { + static const std::string POINT_ATTR_FIRST("firstPoint"); + return POINT_ATTR_FIRST; + } + /// attribute name for second point + inline static const std::string& POINT_SECOND() + { + static const std::string POINT_ATTR_SECOND("secondPoint"); + return POINT_ATTR_SECOND; + } + /// attribute name for second point + inline static const std::string& CYLINDRICAL_FACE() + { + static const std::string CYLINDRICAL_FACE_ATTR("cylindricalFace"); + return CYLINDRICAL_FACE_ATTR; + } + /// default color for an axis + inline static const std::string& DEFAULT_COLOR() + { + static const std::string CONSTRUCTION_AXIS_COLOR("#000000"); + return CONSTRUCTION_AXIS_COLOR; + } + + inline static const double MINIMAL_LENGTH() { return 1.e-5; } + /// Creates a new part document if needed CONSTRUCTIONPLUGIN_EXPORT virtual void execute(); @@ -52,4 +82,4 @@ class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomP }; -#endif \ No newline at end of file +#endif