From: azv Date: Thu, 1 Sep 2016 10:13:34 +0000 (+0300) Subject: Issue #1692: Explicit send the Create message when external entity appears in the... X-Git-Tag: V_2.5.0~87 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=89743c07aceefdb20c8d7c53645623f0ace69d97;hp=b297d2c427d389f99bbc8c6c2370382ce6823d16;p=modules%2Fshaper.git Issue #1692: Explicit send the Create message when external entity appears in the sketcher --- diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index 12cb7a9a4..d88fd2ac2 100755 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -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(); } diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 6619c372b..2b83759b8 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -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 >::const_iterator