From: azv Date: Thu, 9 Jun 2016 12:20:46 +0000 (+0300) Subject: PlaneGCS: conflicting constraints after abort X-Git-Tag: V_2.4.0~122 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bec129ca65149f16eb2de2774c05620df92ef561;p=modules%2Fshaper.git PlaneGCS: conflicting constraints after abort --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 40c524e94..a3f832e6e 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -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) {