X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Plane.h;h=b82f1e8c3f8b238b1fd2b804618c5e096ded9923;hb=4d6bb9de0e54f09a9bbacc94a058cb7cd437d535;hp=f57ff1eb10099565f71d87486d4da7465c0ccb85;hpb=0a76161addf39a6d03b90308eb99abc3a8d10e74;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.h b/src/ConstructionPlugin/ConstructionPlugin_Plane.h index f57ff1eb1..b82f1e8c3 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.h @@ -9,6 +9,7 @@ #include "ConstructionPlugin.h" #include +#include #include @@ -30,7 +31,7 @@ class ConstructionPlugin_Plane : public ModelAPI_Feature, public GeomAPI_ICustom /// default color for a plane inline static const std::string& DEFAULT_COLOR() { - static const std::string CONSTRUCTION_PLANE_COLOR("#32FF32"); + static const std::string CONSTRUCTION_PLANE_COLOR("150,150,180"); return CONSTRUCTION_PLANE_COLOR; } @@ -40,6 +41,14 @@ class ConstructionPlugin_Plane : public ModelAPI_Feature, public GeomAPI_ICustom static const std::string CONSTRUCTION_PLANE_KIND("Plane"); return CONSTRUCTION_PLANE_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 base face inline static const std::string& FACE() { @@ -91,7 +100,15 @@ class ConstructionPlugin_Plane : public ModelAPI_Feature, public GeomAPI_ICustom ConstructionPlugin_Plane(); /// 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 plane by copy of face plane with translation along the normal + /// to the specified distance. + std::shared_ptr createPlaneByFaceAndDistance(); + /// Creates a new plane by general equation. + std::shared_ptr createPlaneByGeneralEquation(); }; #endif