-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "SketchPlugin_Tools.h"
std::set<AttributePtr>::const_iterator aIt;
for (aIt = aRefsList.cbegin(); aIt != aRefsList.cend(); ++aIt) {
FeaturePtr aConstrFeature = std::dynamic_pointer_cast<ModelAPI_Feature>((*aIt)->owner());
- if (aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID())
+ if (aConstrFeature && aConstrFeature->getKind() == SketchPlugin_ConstraintCoincidence::ID())
aCoincident.insert(aConstrFeature);
}
return aCoincident;
std::list< std::set<AttributePoint2DPtr> >::iterator aFound1 = find(thePoint1);
std::list< std::set<AttributePoint2DPtr> >::iterator aFound2 = find(thePoint2);
if (aFound1 == myCoincidentPoints.end()) {
- std::set<AttributePoint2DPtr> aNewSet;
- aNewSet.insert(thePoint1);
- if (thePoint2)
- aNewSet.insert(thePoint2);
- myCoincidentPoints.push_back(aNewSet);
+ if (aFound2 == myCoincidentPoints.end()) {
+ std::set<AttributePoint2DPtr> aNewSet;
+ aNewSet.insert(thePoint1);
+ if (thePoint2)
+ aNewSet.insert(thePoint2);
+ myCoincidentPoints.push_back(aNewSet);
+ } else
+ aFound2->insert(thePoint1);
} else if (aFound2 == myCoincidentPoints.end()) {
if (thePoint2)
aFound1->insert(thePoint2);