Salome HOME
Define rigid constraint symbol
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintCoincidence.cpp
index 15f6d1cccfc0844d7e55f573fa3994e588d47781..358158325fc9b4da8f49f9a60ca6efae1e14a66c 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;
+}
\ No newline at end of file