X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Collinear.cpp;h=8b069825aca96ad221829f83d15276b23a7c5ffb;hb=471cc7b52168016a3b6fff7e64cdd800cd7d8f91;hp=57cf26413fa92fd17caaa4c311e69c13c4bf4138;hpb=45bb93054f95112d5e6282f11c364ed5e23fb264;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Collinear.cpp b/src/SketcherPrs/SketcherPrs_Collinear.cpp index 57cf26413..8b069825a 100755 --- a/src/SketcherPrs/SketcherPrs_Collinear.cpp +++ b/src/SketcherPrs/SketcherPrs_Collinear.cpp @@ -10,8 +10,6 @@ #include -#include "Events_Error.h" - #include #include @@ -44,7 +42,7 @@ bool SketcherPrs_Collinear::IsReadyToDisplay(ModelAPI_Feature* theConstraint, return aReadyToDisplay; } -bool SketcherPrs_Collinear::updatePoints(double theStep) const +bool SketcherPrs_Collinear::updateIfReadyToDisplay(double theStep) const { if (!IsReadyToDisplay(myConstraint, myPlane)) return false; @@ -68,18 +66,8 @@ void SketcherPrs_Collinear::drawLines(const Handle(Prs3d_Presentation)& thePrs, Handle(Graphic3d_AspectLine3d) aLineAspect = new Graphic3d_AspectLine3d(theColor, Aspect_TOL_SOLID, 2); aGroup->SetPrimitivesAspect(aLineAspect); - // Draw first line - ObjectPtr aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_A()); - std::shared_ptr aLine = SketcherPrs_Tools::getShape(aObj); - if (aLine.get() == NULL) - return; - drawShape(aLine, thePrs); - - // Draw second line - aObj = SketcherPrs_Tools::getResult(myConstraint, SketchPlugin_Constraint::ENTITY_B()); - aLine = SketcherPrs_Tools::getShape(aObj); - if (aLine.get() == NULL) - return; - drawShape(aLine, thePrs); + // Draw constrained lines + addLine(aGroup, SketchPlugin_Constraint::ENTITY_A()); + addLine(aGroup, SketchPlugin_Constraint::ENTITY_B()); }