]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix regressions in unit-tests
authorazv <azv@opencascade.com>
Fri, 7 Jun 2019 10:07:19 +0000 (13:07 +0300)
committerazv <azv@opencascade.com>
Fri, 7 Jun 2019 10:07:19 +0000 (13:07 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/SketchSolver_Group.cpp

index 44cbf86fd1f05f3a73911a93bc9325535235aff0..2f98c88138f5b3814eea5ddea799ec05508d6c5c 100644 (file)
@@ -197,7 +197,8 @@ bool PlaneGCSSolver_Storage::update(FeaturePtr theFeature, bool theForce)
       isUpdated = update(*anAttrIt) || isUpdated;
 
   // check external attribute is changed
-  bool isExternal = aSketchFeature && aSketchFeature->isExternal();
+  bool isExternal = aSketchFeature &&
+                   (aSketchFeature->isExternal() || isCopyFeature(aSketchFeature));
   if (aRelated && isExternal != aRelated->isExternal()) {
     if (isExternal)
       makeExternal(aRelated);
index 637719d26f79ca030183584674800684dffa40b6..5a66f99b006ed8b2f3764f0d53d404b6223737d2 100644 (file)
@@ -136,9 +136,9 @@ bool SketchSolver_Group::updateSketch(CompositeFeaturePtr theSketch)
       theSketch->attribute(SketchPlugin_Sketch::DIRX_ID()));
 
   isChanged = isChanged
-      || (mySketchOrigin && anOrigin->pnt()->distance(mySketchOrigin) > THE_TOLERANCE)
-      || (mySketchNormal && aNorm->xyz()->distance(mySketchNormal->xyz()) > THE_TOLERANCE)
-      || (mySketchXDir && aDirX->xyz()->distance(mySketchXDir->xyz()) > THE_TOLERANCE);
+      || (mySketchOrigin && anOrigin && anOrigin->pnt()->distance(mySketchOrigin) > THE_TOLERANCE)
+      || (mySketchNormal && aNorm && aNorm->xyz()->distance(mySketchNormal->xyz()) > THE_TOLERANCE)
+      || (mySketchXDir && aDirX && aDirX->xyz()->distance(mySketchXDir->xyz()) > THE_TOLERANCE);
 
   if (isChanged) {
     mySketch = theSketch;