X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Tools.cpp;h=a4e44a736698eb1ede7e54b2340645a77456a739;hb=1a9c873645580822c23f4abcd374b6c639d5b9cf;hp=a08190d7b5c7caef2afd22b425a72c5ba6f2c0b3;hpb=c8ab29e531ee03054976a7606076f2c4ee1d9f6b;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index a08190d7b..a4e44a736 100755 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include @@ -333,10 +334,14 @@ std::shared_ptr PartSet_Tools::findFirstEqualPoint(const Fe theFeature->data()->attributes(GeomDataAPI_Point2D::typeId()); std::list >::const_iterator anIt = anAttiributes.begin(), aLast = anAttiributes.end(); + ModelAPI_ValidatorsFactory* aValidators = ModelAPI_Session::get()->validators(); + for (; anIt != aLast && !aFPoint; anIt++) { std::shared_ptr aCurPoint = - std::dynamic_pointer_cast(*anIt); - if (aCurPoint && (aCurPoint->pnt()->distance(thePoint) < Precision::Confusion())) { + std::dynamic_pointer_cast(*anIt); + if (aCurPoint && aCurPoint->isInitialized() && + aValidators->isCase(theFeature, aCurPoint->id()) && + (aCurPoint->pnt()->distance(thePoint) < Precision::Confusion())) { aFPoint = aCurPoint; break; }