From: azv Date: Wed, 16 Sep 2015 06:26:05 +0000 (+0300) Subject: Update merging two Coincidence constraints (issue #955) X-Git-Tag: V_1.4.0~62 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec6769ca1253d91c847027b5d36c800d9b5ed793;p=modules%2Fshaper.git Update merging two Coincidence constraints (issue #955) --- diff --git a/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp b/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp index 205c744e9..1bfa09e72 100644 --- a/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp @@ -3,6 +3,7 @@ #include #include +#include #include @@ -187,8 +188,18 @@ void SketchSolver_ConstraintCoincidence::addConstraint(ConstraintPtr theConstrai anEntity = myGroup->getFeatureId(aFeature); if (anEntity == SLVS_E_UNKNOWN) anEntity = changeEntity(aFeature, anEntType); - else + else { myFeatureMap[aFeature] = anEntity; + // Obtain relations between attributes of the feature and SolveSpace entities + std::list anAttrList = + aFeature->data()->attributes(GeomDataAPI_Point2D::typeId()); + std::list::iterator anIt = anAttrList.begin(); + for (; anIt != anAttrList.end(); ++anIt) { + Slvs_hEntity anAttrID = myGroup->getAttributeId(*anIt); + if (anAttrID != SLVS_E_UNKNOWN) + myAttributeMap[*anIt] = anAttrID; + } + } } // If the feature is a point, add it to the list of coincident points if (aFeature->getKind() == SketchPlugin_Point::ID()) {