Salome HOME
projects
/
modules
/
shaper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0da6013
)
PlaneGCS: conflicting constraints after abort
author
azv
<azv@opencascade.com>
Thu, 9 Jun 2016 12:20:46 +0000
(15:20 +0300)
committer
azv
<azv@opencascade.com>
Thu, 9 Jun 2016 12:20:46 +0000
(15:20 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
patch
|
blob
|
history
diff --git
a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
index 40c524e9446d9c1bc57342fbe5c211d8876cbb6a..a3f832e6e516372cace418466678d2496ebd794b 100644
(file)
--- 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) {