Salome HOME
Issue #1692: Explicit send the Create message when external entity appears in the...
authorazv <azv@opencascade.com>
Thu, 1 Sep 2016 10:13:34 +0000 (13:13 +0300)
committerazv <azv@opencascade.com>
Thu, 1 Sep 2016 10:13:58 +0000 (13:13 +0300)
src/PartSet/PartSet_Tools.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp

index 12cb7a9a4a4f2c4c8e284e0323cfbbafc900e8ad..d88fd2ac20da9cfaa78d8898040c52feaee2aec7 100755 (executable)
@@ -539,6 +539,8 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap
           FeaturePtr aFix = theSketch->addFeature(SketchPlugin_ConstraintRigid::ID());
           aFix->data()->refattr(SketchPlugin_Constraint::ENTITY_A())->
             setObject(aMyFeature->lastResult());
+          // we need to flush created signal in order to fixed constraint is processed by solver
+          Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
         //}
         return aMyFeature->lastResult();
       }
@@ -597,6 +599,8 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShap
           FeaturePtr aFix = theSketch->addFeature(SketchPlugin_ConstraintRigid::ID());
           aFix->data()->refattr(SketchPlugin_Constraint::ENTITY_A())->
             setObject(aMyFeature->lastResult());
+          // we need to flush created signal in order to fixed constraint is processed by solver
+          Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
         //}
         return aMyFeature->lastResult();
       }
index 6619c372b526ead79c3d01ea0a8455e881b0bb08..2b83759b82ce4ddada533dfc4b174cd4e76e36bb 100644 (file)
@@ -428,8 +428,8 @@ void PlaneGCSSolver_Storage::processArc(const EntityWrapperPtr& theArc)
     *aEndAngle += anAngle;
   }
 
-  // no need to constraint a copied arc
-  if (anArcFeature->isCopy())
+  // no need to constraint a fixed or a copied arc
+  if (theArc->group() == GID_OUTOFGROUP || anArcFeature->isCopy())
     return;
   // No need to add constraints if they are already exist
   std::map<EntityWrapperPtr, std::vector<GCSConstraintPtr> >::const_iterator