Salome HOME
#1112 tab key doesn't work on the last field of left panels
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plane.h
index 2ff71979a32780c69cfdeda3ebb3848488322955..b82f1e8c3f8b238b1fd2b804618c5e096ded9923 100644 (file)
@@ -31,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;
   }
 
@@ -41,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()
   {
@@ -94,6 +102,13 @@ class ConstructionPlugin_Plane : public ModelAPI_Feature, public GeomAPI_ICustom
   /// Customize presentation of the feature
   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