From b73343ea5c7f1449889d30d0593f319e617a13aa Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 12 Apr 2017 11:31:07 +0300 Subject: [PATCH] Adjust arc intersection validator (issue #2120) --- src/SketchPlugin/SketchPlugin_Validators.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; -- 2.39.2