From: dbv Date: Mon, 27 Mar 2017 15:21:49 +0000 (+0300) Subject: Issue #2024: Redesign of circle and arc of circle X-Git-Tag: V_2.7.0~173 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=071297c18a7c1bf8e651b96b5874edad24f42e23;p=modules%2Fshaper.git Issue #2024: Redesign of circle and arc of circle Validators update --- diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index 398827f61..6683c906f 100755 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -1293,7 +1293,9 @@ bool SketchPlugin_ArcEndPointValidator::isValid( return true; } - if(!anEndPointRef->isInitialized()) { + ObjectPtr anObject = anEndPointRef->object(); + AttributePtr anAttr = anEndPointRef->attr(); + if(!anObject.get() && !anAttr.get()) { return true; } @@ -1301,7 +1303,6 @@ bool SketchPlugin_ArcEndPointValidator::isValid( return false; } - ObjectPtr anObject = anEndPointRef->object(); ResultPtr aResult = std::dynamic_pointer_cast(anObject); if(aResult.get()) { GeomShapePtr aShape = aResult->shape(); @@ -1333,10 +1334,6 @@ bool SketchPlugin_ArcEndPointIntersectionValidator::isValid( return true; } - if(!anEndPointRef->isInitialized()) { - return true; - } - GeomShapePtr anArcShape = anArcFeature->getArcShape(); if(!anArcShape.get() || anArcShape->isNull()) { @@ -1344,6 +1341,11 @@ bool SketchPlugin_ArcEndPointIntersectionValidator::isValid( } ObjectPtr anObject = anEndPointRef->object(); + AttributePtr anAttr = anEndPointRef->attr(); + if(!anObject.get() && !anAttr.get()) { + return true; + } + ResultPtr aResult = std::dynamic_pointer_cast(anObject); if(aResult.get()) { GeomShapePtr aShape = aResult->shape();