]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #168: Arc creation on existing points
authorazv <azv@opencascade.com>
Fri, 26 Sep 2014 10:58:42 +0000 (14:58 +0400)
committerazv <azv@opencascade.com>
Fri, 26 Sep 2014 11:26:02 +0000 (15:26 +0400)
Added verification that all attributes of entity are intialized

src/SketchSolver/SketchSolver_ConstraintGroup.cpp

index 6426544079878b02817246975218a6cdeaeb3021..68b5c4736f710c4c9dea6dd697fbd91fe5416a1a 100644 (file)
@@ -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<AttributePtr> anAttributes = aFeature->data()->attributes(std::string());
+    std::list<AttributePtr>::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(