From: azv Date: Wed, 12 Apr 2017 08:31:07 +0000 (+0300) Subject: Adjust arc intersection validator (issue #2120) X-Git-Tag: V_2.7.0~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b73343ea5c7f1449889d30d0593f319e617a13aa;p=modules%2Fshaper.git Adjust arc intersection validator (issue #2120) --- diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index e5b194c90..96b01f6d5 100755 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -1442,7 +1442,10 @@ bool SketchPlugin_ArcEndPointIntersectionValidator::isValid( ResultPtr aResult = std::dynamic_pointer_cast(anObject); if(aResult.get()) { - GeomShapePtr aShape = toInfiniteEdge(aResult->shape()); + GeomShapePtr aShape = aResult->shape(); + if (!aShape->isEdge()) + return true; + aShape = toInfiniteEdge(aShape); if(aShape.get() && !aShape->isNull()) { if(anArcShape->isIntersect(aShape)) { return true; @@ -1457,7 +1460,10 @@ bool SketchPlugin_ArcEndPointIntersectionValidator::isValid( anIt != aResults.cend(); ++anIt) { - GeomShapePtr aShape = toInfiniteEdge((*anIt)->shape()); + GeomShapePtr aShape = (*anIt)->shape(); + if (!aShape->isEdge()) + return true; + aShape = toInfiniteEdge(aShape); if(aShape.get() && !aShape->isNull()) { if(anArcShape->isIntersect(aShape)) { return true;