]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp
Salome HOME
Empty AIS in the viewer: throw c++ exception (to be finalized, currently do nothing)
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintHorizontal.cpp
index 9fe7e5188793955e98975860a063f0acaf706abf..0f7aa24926376731fc126ddd956c34badf04853c 100644 (file)
@@ -14,6 +14,7 @@
 #include <SketchPlugin_Sketch.h>
 
 #include <SketcherPrs_Factory.h>
+//#include <SketcherPrs_Tools.h>
 
 #include <Config_PropManager.h>
 
@@ -36,9 +37,21 @@ AISObjectPtr SketchPlugin_ConstraintHorizontal::getAISObject(AISObjectPtr thePre
     return thePrevious;
 
   AISObjectPtr anAIS = thePrevious;
+
   if (!anAIS) {
     anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane());
+    /*
+    ObjectPtr aObj = SketcherPrs_Tools::getResult(this, SketchPlugin_Constraint::ENTITY_A());
+    if (SketcherPrs_Tools::getShape(aObj).get() != NULL) {
+      anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane());
+    }*/
   }
+  /*else {
+    ObjectPtr aObj = SketcherPrs_Tools::getResult(this, SketchPlugin_Constraint::ENTITY_A());
+    if (SketcherPrs_Tools::getShape(aObj).get() == NULL) {
+      anAIS = AISObjectPtr();
+    }
+  }*/
   return anAIS;
 }