From: azv Date: Fri, 26 Sep 2014 10:58:42 +0000 (+0400) Subject: Issue #168: Arc creation on existing points X-Git-Tag: V_0.4.4~7^2~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=48665a23b836865ef9a8e4bf7be34e090098b099;p=modules%2Fshaper.git Issue #168: Arc creation on existing points Added verification that all attributes of entity are intialized --- diff --git a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp index 642654407..68b5c4736 100644 --- a/src/SketchSolver/SketchSolver_ConstraintGroup.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintGroup.cpp @@ -439,6 +439,12 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(FeaturePtr theEntity) if (aFeature) { // Verify the feature by its kind const std::string& aFeatureKind = aFeature->getKind(); + std::list anAttributes = aFeature->data()->attributes(std::string()); + std::list::iterator anAttrIter = anAttributes.begin(); + for ( ; anAttrIter != anAttributes.end(); anAttrIter++) + if (!(*anAttrIter)->isInitialized()) // the entity is not fully initialized, don't add it into solver + return SLVS_E_UNKNOWN; + // Line if (aFeatureKind.compare(SketchPlugin_Line::ID()) == 0) { Slvs_hEntity aStart = changeEntity(