From 071297c18a7c1bf8e651b96b5874edad24f42e23 Mon Sep 17 00:00:00 2001 From: dbv Date: Mon, 27 Mar 2017 18:21:49 +0300 Subject: [PATCH] Issue #2024: Redesign of circle and arc of circle Validators update --- src/SketchPlugin/SketchPlugin_Validators.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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(); -- 2.39.2