ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(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;
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;