]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
PlaneGCS: conflicting constraints after abort
authorazv <azv@opencascade.com>
Thu, 9 Jun 2016 12:20:46 +0000 (15:20 +0300)
committerazv <azv@opencascade.com>
Thu, 9 Jun 2016 12:20:46 +0000 (15:20 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp

index 40c524e9446d9c1bc57342fbe5c211d8876cbb6a..a3f832e6e516372cace418466678d2496ebd794b 100644 (file)
@@ -242,6 +242,11 @@ bool PlaneGCSSolver_Storage::remove(ConstraintWrapperPtr theConstraint)
 
 bool PlaneGCSSolver_Storage::remove(EntityWrapperPtr theEntity)
 {
+  // do not remove entity, if it is used by constraints or other entities
+  if ((theEntity->baseFeature() && isUsed(theEntity->baseFeature())) ||
+      (theEntity->baseAttribute() && isUsed(theEntity->baseAttribute())))
+    return false;
+
   bool isFullyRemoved = SketchSolver_Storage::remove(theEntity);
   if (isFullyRemoved) {
     if (theEntity->type() == ENTITY_ARC) {