]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Draw AIS presentations for perpendicular and parallel constraints
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 28 Jul 2014 07:52:38 +0000 (11:52 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 28 Jul 2014 07:52:38 +0000 (11:52 +0400)
src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp
src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp

index 0d73cba025f4cacedbc4ba15403962679b7532d7..4a971e8c7e3c27ab72870d3dfef5d49b6a863d55 100644 (file)
@@ -63,10 +63,10 @@ boost::shared_ptr<GeomAPI_AISObject> SketchPlugin_ConstraintParallel::getAISObje
   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<GeomDataAPI_Point2D> aFlyoutAttr = 
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;