From 48665a23b836865ef9a8e4bf7be34e090098b099 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 26 Sep 2014 14:58:42 +0400 Subject: [PATCH] Issue #168: Arc creation on existing points Added verification that all attributes of entity are intialized --- src/SketchSolver/SketchSolver_ConstraintGroup.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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( -- 2.39.2