From: nds Date: Mon, 10 Nov 2014 06:43:40 +0000 (+0300) Subject: Issue #196: Implemented verification of zero distance in SketchSolver X-Git-Tag: V_0.5~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=75150f714725f2d393c760ad32e4fe909374e5e2;p=modules%2Fshaper.git Issue #196: Implemented verification of zero distance in SketchSolver --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp index 2e22f0c32..3ad9b6842 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp @@ -123,6 +123,10 @@ AISObjectPtr SketchPlugin_ConstraintDistance::getAISObject(AISObjectPtr thePrevi boost::shared_ptr aValueAttr = boost::dynamic_pointer_cast< ModelAPI_AttributeDouble>(aData->attribute(SketchPlugin_Constraint::VALUE())); double aValue = aValueAttr->value(); + // Issue #196: checking the positivity of the distance constraint + // there is a validator for a distance constraint, that the value should be positive + if (aValue <= 0) + return AISObjectPtr(); AISObjectPtr anAIS = thePrevious; if (!anAIS)