From 67bfbe92f3a131127d0011865041f94fa2ecc6c2 Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 24 Sep 2015 10:19:39 +0300 Subject: [PATCH] Update merging SketchSolver groups (issue #1013) --- src/SketchSolver/SketchSolver_Group.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index aeac2ebea..52b3d34b7 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -674,9 +674,9 @@ void SketchSolver_Group::splitGroup(std::vector& theCuts) std::vector::iterator aUnuseIt = anUnusedConstraints.begin(); while (aUnuseIt != anUnusedConstraints.end()) { if (aNewFeatStorage->isInteract(*aUnuseIt)) { - size_t aShift = aUnuseIt - anUnusedConstraints.begin(); + aNewFeatStorage->changeConstraint(*aUnuseIt); anUnusedConstraints.erase(aUnuseIt); - aUnuseIt = anUnusedConstraints.begin() + aShift; + aUnuseIt = anUnusedConstraints.begin(); continue; } aUnuseIt++; @@ -700,6 +700,9 @@ void SketchSolver_Group::splitGroup(std::vector& theCuts) theCuts.push_back(aGroup); } } + + // Update feature storage + myFeatureStorage = aNewFeatStorage; } // ============================================================================ -- 2.39.2