Salome HOME
Erroneous cases in SALOME mode: Sketch, start sub-feature operation[some control...
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Equal.cpp
index f26682c3cae4603bccf4c216fc3f7c54691fc9a7..90f705fd8512e2c9692145ef1d20c0a7e1c36e1d 100644 (file)
@@ -52,7 +52,16 @@ void SketcherPrs_Equal::drawLines(const Handle(Prs3d_Presentation)& thePrs, Quan
   Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2);
   aGroup->SetPrimitivesAspect(aLineAspect);
 
-  addLine(aGroup, SketchPlugin_Constraint::ENTITY_A());
-  addLine(aGroup, SketchPlugin_Constraint::ENTITY_B());
+  ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A());
+  std::shared_ptr<GeomAPI_Shape> aLine = SketcherPrs_Tools::getShape(aObj);
+  if (aLine.get() == NULL)
+    return;
+  drawShape(aLine, thePrs);
+
+  aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B());
+  aLine = SketcherPrs_Tools::getShape(aObj);
+  if (aLine.get() == NULL)
+    return;
+  drawShape(aLine, thePrs);
 }