Salome HOME
Draw AIS presentations for perpendicular and parallel constraints
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintPerpendicular.cpp
index 0aa05e89d19671b353d466a6b0f3199e40bd8b89..8985eb061bb3f6ef15164d7b61e0d4801b296b3c 100644 (file)
@@ -63,10 +63,10 @@ boost::shared_ptr<GeomAPI_AISObject> SketchPlugin_ConstraintPerpendicular::getAI
   boost::shared_ptr<GeomAPI_Pln> aPlane = sketch()->plane();
   boost::shared_ptr<GeomAPI_Shape> aLine1, aLine2;
   boost::shared_ptr<ModelAPI_ResultConstruction> aConst1 = 
-    boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aLine1Feature->firstResult());
+    boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(anAttr1->object());
   if (aConst1) aLine1 = aConst1->shape();
   boost::shared_ptr<ModelAPI_ResultConstruction> aConst2 = 
-    boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aLine1Feature->firstResult());
+    boost::dynamic_pointer_cast<ModelAPI_ResultConstruction>(anAttr2->object());
   if (aConst2) aLine2 = aConst2->shape();
 
   boost::shared_ptr<GeomAPI_AISObject> anAIS = thePrevious;