From: mpv Date: Wed, 16 Dec 2015 15:43:45 +0000 (+0300) Subject: Fix for the issue #1051 X-Git-Tag: V_2.1.0~166 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5e375c5660d4b81449e6a3dae671d1d890f01139;p=modules%2Fshaper.git Fix for the issue #1051 --- diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index b8ee2d52f..e8b3479d7 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -766,11 +766,6 @@ std::shared_ptr Model_BodyBuilder::shape() Handle(TNaming_NamedShape) aName; if (aShapeLab.FindAttribute(TNaming_NamedShape::GetID(), aName)) { TopoDS_Shape aShape = aName->Get(); - if (aShape.IsNull()) - std::cout<<"Model_BodyBuilder::shape returns empty shape "< aRes(new GeomAPI_Shape); aRes->setImpl(new TopoDS_Shape(aShape)); diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index fbd8bf5e0..ee4c2da05 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -199,12 +199,6 @@ bool SketchSolver_Group::updateFeature(FeaturePtr theFeature) { if (!checkFeatureValidity(theFeature)) return false; - // the external feature always should keep the up to date values, so, - // refresh from the solver is never needed - std::shared_ptr aSketchFeature = - std::dynamic_pointer_cast(theFeature); - if (aSketchFeature.get() && aSketchFeature->isExternal()) - return false; myStorage->refresh(true); return myStorage->update(theFeature); diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp index 2a6fb95bf..04d8fe663 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Storage.cpp @@ -1708,6 +1708,15 @@ void SolveSpaceSolver_Storage::refresh(bool theFixedOnly) const std::list aParams; std::list::const_iterator aParIt; for (; anIt != myAttributeMap.end(); ++anIt) { + // the external feature always should keep the up to date values, so, + // refresh from the solver is never needed + if (anIt->first.get()) { + std::shared_ptr aSketchFeature = + std::dynamic_pointer_cast(anIt->first->owner()); + if (aSketchFeature.get() && aSketchFeature->isExternal()) + continue; + } + // update parameter wrappers and obtain values of attributes aParams = anIt->second->parameters(); double aCoords[3];