From: azv Date: Fri, 7 Jun 2019 10:07:19 +0000 (+0300) Subject: Fix regressions in unit-tests X-Git-Tag: VEDF2019Lot4~114^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=98e1de92eef3295961118e52e0752647e29681f5;p=modules%2Fshaper.git Fix regressions in unit-tests --- diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 44cbf86fd..2f98c8813 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -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); diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 637719d26..5a66f99b0 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -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;