]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Sketch Point, Line, Circl & Arc have a base class SketchEntity
authorspo <sergey.pokhodenko@opencascade.com>
Wed, 8 Jun 2016 10:30:58 +0000 (13:30 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 17 Jun 2016 11:41:05 +0000 (14:41 +0300)
src/SketchAPI/SketchAPI_Line.cpp
src/SketchAPI/SketchAPI_Line.h
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h

index f36c91c88268dea56f0577bbba4c5855394c1ae9..d6be6744de7bd96ae6d6bbc202520c2f5949a114 100644 (file)
@@ -14,7 +14,7 @@
 //--------------------------------------------------------------------------------------
 SketchAPI_Line::SketchAPI_Line(
     const std::shared_ptr<ModelAPI_Feature> & theFeature)
-: ModelHighAPI_Interface(theFeature)
+: SketchAPI_SketchEntity(theFeature)
 {
   initialize();
 }
@@ -22,7 +22,7 @@ SketchAPI_Line::SketchAPI_Line(
 SketchAPI_Line::SketchAPI_Line(
     const std::shared_ptr<ModelAPI_Feature> & theFeature,
     double theX1, double theY1, double theX2, double theY2)
-: ModelHighAPI_Interface(theFeature)
+: SketchAPI_SketchEntity(theFeature)
 {
   if (initialize()) {
     setByCoordinates(theX1, theY1, theX2, theY2);
@@ -33,7 +33,7 @@ SketchAPI_Line::SketchAPI_Line(
     const std::shared_ptr<ModelAPI_Feature> & theFeature,
     const std::shared_ptr<GeomAPI_Pnt2d> & theStartPoint,
     const std::shared_ptr<GeomAPI_Pnt2d> & theEndPoint)
-: ModelHighAPI_Interface(theFeature)
+: SketchAPI_SketchEntity(theFeature)
 {
   if (initialize()) {
     setByPoints(theStartPoint, theEndPoint);
@@ -43,7 +43,7 @@ SketchAPI_Line::SketchAPI_Line(
 SketchAPI_Line::SketchAPI_Line(
     const std::shared_ptr<ModelAPI_Feature> & theFeature,
     const ModelHighAPI_Selection & theExternal )
-: ModelHighAPI_Interface(theFeature)
+: SketchAPI_SketchEntity(theFeature)
 {
   if (initialize()) {
     setByExternal(theExternal);
@@ -53,7 +53,7 @@ SketchAPI_Line::SketchAPI_Line(
 SketchAPI_Line::SketchAPI_Line(
     const std::shared_ptr<ModelAPI_Feature> & theFeature,
     const std::string & theExternalName )
-: ModelHighAPI_Interface(theFeature)
+: SketchAPI_SketchEntity(theFeature)
 {
   if (initialize()) {
     setByExternalName(theExternalName);
index 5796c66beb19c285e9f1ab2ad6d24a7014088e77..bdedb921b911ef0d4f64a95e224b4a3c85a345b9 100644 (file)
@@ -14,8 +14,7 @@
 
 #include <SketchPlugin_Line.h>
 
-#include <ModelHighAPI_Interface.h>
-#include <ModelHighAPI_Macro.h>
+#include <SketchAPI_SketchEntity.h>
 //--------------------------------------------------------------------------------------
 class ModelHighAPI_Selection;
 //--------------------------------------------------------------------------------------
@@ -23,7 +22,7 @@ class ModelHighAPI_Selection;
  * \ingroup CPPHighAPI
  * \brief Interface for Line feature
  */
-class SketchAPI_Line : public ModelHighAPI_Interface
+class SketchAPI_Line : public SketchAPI_SketchEntity
 {
 public:
   /// Constructor without values
index 93d70ed9364084374ae3a66768588f8fbccad2a8..e16966ecac78be584ec5413fa2cf7d8a442fa686 100644 (file)
@@ -107,4 +107,5 @@ std::shared_ptr<SketchAPI_Line> SketchAPI_Sketch::addLine(const std::string & th
   std::shared_ptr<ModelAPI_Feature> aFeature = compositeFeature()->addFeature(SketchPlugin_Line::ID());
   return LinePtr(new SketchAPI_Line(aFeature, theExternalName));
 }
+
 //--------------------------------------------------------------------------------------
index a85e8ef0df768818f990e124db1263807c01bc6a..cc8e3f64e86b8db451e1fe64a69fc830c7883aac 100644 (file)
@@ -60,6 +60,8 @@ public:
   SKETCHAPI_EXPORT
   void setExternal(const ModelHighAPI_Selection & theExternal);
 
+  // TODO(spo): addPoint
+
   /// Add line
   SKETCHAPI_EXPORT
   std::shared_ptr<SketchAPI_Line> addLine(
@@ -76,6 +78,14 @@ public:
   SKETCHAPI_EXPORT
   std::shared_ptr<SketchAPI_Line> addLine(const std::string & theExternalName);
 
+  // TODO(spo): addCircle
+  // TODO(spo): addArc
+
+  // TODO(spo): set* (constraints)
+
+  // TODO(spo): setValue
+  // TODO(spo): setText
+
 protected:
   std::shared_ptr<ModelAPI_CompositeFeature> compositeFeature() const;