Salome HOME
It replaces using of direct value "Sketch" to SKETCH_KIND, which is defined in the...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Plugin.cpp
index bef72b89daba45c662e0d7ba3e670cb0ecc9b5c1..be1c3f581aacc784beb6593d418fadef19019a4f 100644 (file)
@@ -1,7 +1,15 @@
 #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_ConstraintLength.h"
+#include "SketchPlugin_ConstraintParallel.h"
+#include "SketchPlugin_ConstraintPerpendicular.h"
+#include "SketchPlugin_ConstraintRadius.h"
 #include <ModelAPI_PluginManager.h>
 #include <ModelAPI_Document.h>
 
@@ -18,15 +26,36 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
 
 boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Plugin::createFeature(string theFeatureID)
 {
-  if (theFeatureID == "Sketch") {
+  if (theFeatureID == SKETCH_KIND) {
     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 == "SketchConstraintLength") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintLength);
+  }
+  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);
+  }
+  else if (theFeatureID == "SketchConstraintRadius") {
+    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintRadius);
+  }
   // feature of such kind is not found
   return boost::shared_ptr<ModelAPI_Feature>();
 }