Salome HOME
Update Split feature and corresponding unit test
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintMiddle.cpp
index 76e8509cbc012e72a79c645c2f9d9601207b0770..31fc3f1da64ecc9fa2b6868648aa003dea155051 100644 (file)
@@ -6,6 +6,8 @@
 
 #include "SketchPlugin_ConstraintMiddle.h"
 
+#include "SketcherPrs_Factory.h"
+
 SketchPlugin_ConstraintMiddle::SketchPlugin_ConstraintMiddle()
 {
 }
@@ -25,11 +27,8 @@ AISObjectPtr SketchPlugin_ConstraintMiddle::getAISObject(AISObjectPtr thePreviou
   if (!sketch())
     return thePrevious;
 
-  AISObjectPtr anAIS = thePrevious;
-  if (!anAIS) {
-    // TODO
-    //anAIS = SketcherPrs_Factory::collinearConstraint(this, sketch()->coordinatePlane());
-  }
+  AISObjectPtr anAIS = SketcherPrs_Factory::middleConstraint(this, sketch()->coordinatePlane(),
+                                                             thePrevious);
   return anAIS;
 }