X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Intersection.cpp;h=93a02c79fe6399e022263c595acfd5ce5a4f37be;hb=6e511a39b3b982757b90b73a7cfc4a1139ebc83c;hp=6c8f51aff1447a0b9cd8e116e34777968892822a;hpb=77775df18b724470367a249096344f93fae039c4;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp b/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp index 6c8f51aff..93a02c79f 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Intersection.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -71,19 +72,9 @@ void FeaturesPlugin_Intersection::execute() GeomMakeShapePtr anIntersectionAlgo(new GeomAlgoAPI_Intersection(anObjects)); // Checking that the algorithm worked properly. - if (!anIntersectionAlgo->isDone()) { - static const std::string aFeatureError = "Error: Intersection algorithm failed."; - setError(aFeatureError); - return; - } - if (anIntersectionAlgo->shape()->isNull()) { - static const std::string aShapeError = "Error: Resulting shape is Null."; - setError(aShapeError); - return; - } - if (!anIntersectionAlgo->isValid()) { - std::string aFeatureError = "Error: Resulting shape is not valid."; - setError(aFeatureError); + std::string anError; + if (GeomAlgoAPI_Tools::AlgoError::isAlgorithmFailed(anIntersectionAlgo, getKind(), anError)) { + setError(anError); return; }