]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
New features are able to be created by SketchPlugin
authorazv <azv@opencascade.com>
Tue, 27 May 2014 04:59:45 +0000 (08:59 +0400)
committerazv <azv@opencascade.com>
Tue, 27 May 2014 04:59:45 +0000 (08:59 +0400)
src/SketchPlugin/SketchPlugin_Plugin.cpp

index bef72b89daba45c662e0d7ba3e670cb0ecc9b5c1..bbbbd878e55ae9b791ddae879d7c0b9981293837 100644 (file)
@@ -1,7 +1,14 @@
 #include "SketchPlugin_Plugin.h"
 #include "SketchPlugin_Sketch.h"
 #include "SketchPlugin_Line.h"
+#include "SketchPlugin_Point.h"
+#include "SketchPlugin_Circle.h"
+#include "SketchPlugin_Arc.h"
 #include "SketchPlugin_ConstraintCoincidence.h"
+#include "SketchPlugin_ConstraintDistance.h"
+#include "SketchPlugin_ConstraintDiameter.h"
+#include "SketchPlugin_ConstraintParallel.h"
+#include "SketchPlugin_ConstraintPerpendicular.h"
 #include <ModelAPI_PluginManager.h>
 #include <ModelAPI_Document.h>
 
@@ -21,12 +28,30 @@ boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Plugin::createFeature(string th
   if (theFeatureID == "Sketch") {
     return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Sketch);
   }
+  else if (theFeatureID == "SketchPoint") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Point);
+  }
   else if (theFeatureID == "SketchLine") {
     return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Line);
   }
+  else if (theFeatureID == "SketchCircle") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Circle);
+  }
   else if (theFeatureID == "SketchConstraintCoincidence") {
     return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintCoincidence);
   }
+  else if (theFeatureID == "SketchConstraintDistance") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintDistance);
+  }
+  else if (theFeatureID == "SketchConstraintDiameter") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintDiameter);
+  }
+  else if (theFeatureID == "SketchConstraintParallel") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintParallel);
+  }
+  else if (theFeatureID == "SketchConstraintPerpendicular") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintPerpendicular);
+  }
   // feature of such kind is not found
   return boost::shared_ptr<ModelAPI_Feature>();
 }