X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Axis.h;h=ffaa95d04ed0614e0a1de31334fdd197250b9544;hb=f387a286673e6be6e5c065f3bbf3c19ed5981a30;hp=473d3e3524e18f86435d88e3e9df969656fb4a29;hpb=509293dabae95f38abae3b8845cc7819736395a0;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Axis.h b/src/ConstructionPlugin/ConstructionPlugin_Axis.h index 473d3e352..ffaa95d04 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Axis.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Axis.h @@ -9,6 +9,7 @@ #include "ConstructionPlugin.h" #include +#include #include /**\class ConstructionPlugin_Axis @@ -35,34 +36,29 @@ class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomP /// attribute name for first point inline static const std::string& METHOD() { - static const std::string METHOD_ATTR("creationMethod"); + 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"); + 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"); + 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"); + 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; - } + /// Returns a minimal length for axis inline static const double MINIMAL_LENGTH() { return 1.e-5; } /// Creates a new part document if needed @@ -78,7 +74,14 @@ class ConstructionPlugin_Axis : public ModelAPI_Feature, public GeomAPI_ICustomP ConstructionPlugin_Axis(); /// Customize presentation of the feature - virtual void customisePresentation(AISObjectPtr thePrs); + virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs, + std::shared_ptr theDefaultPrs); + + protected: + /// Creates a new axis by two defined points + void createAxisByTwoPoints(); + /// Creates a new axis as copy of cylindrical face axis + void createAxisByCylindricalFace(); };