X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Plane.h;h=b82f1e8c3f8b238b1fd2b804618c5e096ded9923;hb=3e7f97125b2198724911564b24b0a30cbd393e3d;hp=fd73f263e2fdbf2a1f770d15de9f4226aa75aea2;hpb=94303d51165398c71527f80bc3f8e17e75ee5523;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.h b/src/ConstructionPlugin/ConstructionPlugin_Plane.h index fd73f263e..b82f1e8c3 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.h @@ -9,6 +9,7 @@ #include "ConstructionPlugin.h" #include +#include #include @@ -27,12 +28,27 @@ class ConstructionPlugin_Plane : public ModelAPI_Feature, public GeomAPI_ICustom return MY_KIND; } + /// default color for a plane + inline static const std::string& DEFAULT_COLOR() + { + static const std::string CONSTRUCTION_PLANE_COLOR("150,150,180"); + return CONSTRUCTION_PLANE_COLOR; + } + /// Plane kind inline static const std::string& ID() { 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() { @@ -84,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