]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_Sketch.h
Salome HOME
Sketch line feature based on points attributes
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Sketch.h
index ec81fe62e6fc0fe82744163617d108a253e193c8..3c6181200faf5747bc70f4911c8da25dde1ac241 100644 (file)
@@ -7,16 +7,17 @@
 
 #include "SketchPlugin.h"
 #include <SketchPlugin_Feature.h>
+#include <GeomAPI_Pnt.h>
 #include <list>
 
-/// Coefficient A of the sketch plane (Ax+By+Cz+D=0)
-const std::string SKETCH_ATTR_PLANE_A("PlaneA");
-/// Coefficient B of the sketch plane
-const std::string SKETCH_ATTR_PLANE_B("PlaneB");
-/// Coefficient C of the sketch plane
-const std::string SKETCH_ATTR_PLANE_C("PlaneC");
-/// Coefficient D of the sketch plane
-const std::string SKETCH_ATTR_PLANE_D("PlaneD");
+/// Origin point of the sketcher in 3D space
+const std::string SKETCH_ATTR_ORIGIN("Origin");
+/// Vector X inside of the sketch plane
+const std::string SKETCH_ATTR_DIRX("DirX");
+/// Vector Y inside of the sketch plane
+const std::string SKETCH_ATTR_DIRY("DirY");
+/// Vector Z, normal to the sketch plane
+const std::string SKETCH_ATTR_NORM("Norm");
 
 /**\class SketchPlugin_Sketch
  * \ingroup DataModel
@@ -42,6 +43,18 @@ public:
   /// Returns the sketch preview
   SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr<GeomAPI_Shape>& preview();
 
+  /// Sets the sketch as active. All features and features previews 
+  /// will be connected to this sketch.
+  SKETCHPLUGIN_EXPORT static void setActive(boost::shared_ptr<SketchPlugin_Sketch> theSketch);
+
+  /// Returns the currently active sketch. All features and features previews 
+  /// will be connected to this sketch.
+  SKETCHPLUGIN_EXPORT static boost::shared_ptr<SketchPlugin_Sketch> active();
+
+  /// Converts a 2D sketch space point into point in 3D space
+  SKETCHPLUGIN_EXPORT boost::shared_ptr<GeomAPI_Pnt> to3D(
+    const double theX, const double theY);
+
   /// Use plugin manager for features creation
   SketchPlugin_Sketch();
 protected: