Salome HOME
Merge branch 'master' into Dev_1.1.0
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCoincidence.cpp
index 02cf66ca06415735860e72076d76f67c2a3f8f03..a78e1b4efc2d0b7b0aeddfc959586679345ecb63 100644 (file)
@@ -6,9 +6,13 @@
 
 #include "SketchPlugin_ConstraintCoincidence.h"
 
+#include <SketcherPrs_Factory.h>
+
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_Data.h>
 #include <SketchPlugin_Point.h>
+#include <GeomDataAPI_Dir.h>
+#include <GeomDataAPI_Point.h>
 
 SketchPlugin_ConstraintCoincidence::SketchPlugin_ConstraintCoincidence()
 {
@@ -24,3 +28,15 @@ void SketchPlugin_ConstraintCoincidence::execute()
 {
 }
 
+AISObjectPtr SketchPlugin_ConstraintCoincidence::getAISObject(AISObjectPtr thePrevious)
+{
+  if (!sketch())
+    return thePrevious;
+
+  AISObjectPtr anAIS = thePrevious;
+  if (!anAIS) {
+    anAIS = SketcherPrs_Factory::coincidentConstraint(this, sketch()->coordinatePlane());
+    anAIS->setColor(0, 0, 255);
+  }
+  return anAIS;
+}