From 42a1cf1aa3d6549b76bb6a0a8ca5ee4350ff820e Mon Sep 17 00:00:00 2001 From: azv Date: Tue, 27 May 2014 08:59:45 +0400 Subject: [PATCH] New features are able to be created by SketchPlugin --- src/SketchPlugin/SketchPlugin_Plugin.cpp | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index bef72b89d..bbbbd878e 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -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 #include @@ -21,12 +28,30 @@ boost::shared_ptr SketchPlugin_Plugin::createFeature(string th if (theFeatureID == "Sketch") { return boost::shared_ptr(new SketchPlugin_Sketch); } + else if (theFeatureID == "SketchPoint") { + return boost::shared_ptr(new SketchPlugin_Point); + } else if (theFeatureID == "SketchLine") { return boost::shared_ptr(new SketchPlugin_Line); } + else if (theFeatureID == "SketchCircle") { + return boost::shared_ptr(new SketchPlugin_Circle); + } else if (theFeatureID == "SketchConstraintCoincidence") { return boost::shared_ptr(new SketchPlugin_ConstraintCoincidence); } + else if (theFeatureID == "SketchConstraintDistance") { + return boost::shared_ptr(new SketchPlugin_ConstraintDistance); + } + else if (theFeatureID == "SketchConstraintDiameter") { + return boost::shared_ptr(new SketchPlugin_ConstraintDiameter); + } + else if (theFeatureID == "SketchConstraintParallel") { + return boost::shared_ptr(new SketchPlugin_ConstraintParallel); + } + else if (theFeatureID == "SketchConstraintPerpendicular") { + return boost::shared_ptr(new SketchPlugin_ConstraintPerpendicular); + } // feature of such kind is not found return boost::shared_ptr(); } -- 2.39.2