Salome HOME
Construction of vertices/edges/faces on the base of sketch: clear list attribute...
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plane.h
index fd73f263e2fdbf2a1f770d15de9f4226aa75aea2..b82f1e8c3f8b238b1fd2b804618c5e096ded9923 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "ConstructionPlugin.h"
 #include <ModelAPI_Feature.h>
+#include <ModelAPI_Result.h>
 #include <GeomAPI_ICustomPrs.h>
 
 
@@ -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<GeomAPI_ICustomPrs> theDefaultPrs);
+
+ protected:
+  /// Creates a new plane by copy of face plane with translation along the normal
+  /// to the specified distance.
+  std::shared_ptr<GeomAPI_Shape> createPlaneByFaceAndDistance();
+  /// Creates a new plane by general equation.
+  std::shared_ptr<GeomAPI_Shape> createPlaneByGeneralEquation();
 };
 
 #endif