+static bool isEqual(const GCS::Point& thePoint1, const GCS::Point& thePoint2)
+{
+ return thePoint1.x == thePoint2.x && thePoint1.y == thePoint2.y;
+}
+
+bool PlaneGCSSolver_UpdateCoincidence::CoincidentEntities::isExist(
+ const GCS::Point& thePoint) const
+{
+ std::map<EntityWrapperPtr, std::set<EntityWrapperPtr> >::const_iterator
+ anIt = myExternalAndConnected.begin();
+ for (; anIt != myExternalAndConnected.end(); ++anIt) {
+ if (anIt->first && anIt->first->type() == ENTITY_POINT) {
+ const GCSPointPtr& aPoint =
+ std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(anIt->first)->point();
+ if (isEqual(*aPoint, thePoint))
+ return true;
+ }
+
+ std::set<EntityWrapperPtr>::const_iterator anEntIt = anIt->second.begin();
+ for (; anEntIt != anIt->second.end(); ++anEntIt)
+ if ((*anEntIt)->type() == ENTITY_POINT) {
+ const GCSPointPtr& aPoint =
+ std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(*anEntIt)->point();
+ if (isEqual(*aPoint, thePoint))
+ return true;
+ }
+ }
+ return false;
+}
+