X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Angle.cpp;h=b363fdfc163690efb813328b365f73fee89027dd;hb=752b7b296bc5884b6bf355f03a67369cf717b6b5;hp=704926a204250005a7ce1f143a564fcdc5d58972;hpb=9eddf4ac8cc3ba51430c59de5a35071bc5745de2;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Angle.cpp b/src/SketcherPrs/SketcherPrs_Angle.cpp index 704926a20..b363fdfc1 100644 --- a/src/SketcherPrs/SketcherPrs_Angle.cpp +++ b/src/SketcherPrs/SketcherPrs_Angle.cpp @@ -154,13 +154,19 @@ bool SketcherPrs_Angle::readyToDisplay(ModelAPI_Feature* theConstraint, gp_Pnt2d aCenterPoint = anAng->center()->impl(); gp_Pnt2d aFirstPoint, aSecondPoint; - if (anAng->angleRadian() > 0.0) { - aFirstPoint = anAng->firstPoint()->impl(); - aSecondPoint = anAng->secondPoint()->impl(); + try { + if (anAng->angleRadian() > 0.0) { + aFirstPoint = anAng->firstPoint()->impl(); + aSecondPoint = anAng->secondPoint()->impl(); + } + else { + aFirstPoint = anAng->secondPoint()->impl(); + aSecondPoint = anAng->firstPoint()->impl(); + } } - else { - aFirstPoint = anAng->secondPoint()->impl(); - aSecondPoint = anAng->firstPoint()->impl(); + catch (...) { + // one of angle lines is degenerated, the presentation cannot be shown + return false; } if (aData->integer(SketchPlugin_ConstraintAngle::TYPE_ID())->value() ==