X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_Group.cpp;h=11f334f51922cf00be3712b150d2560a9f06f34a;hb=d3883990177d27a12b8a2278cdbb82250ff19b79;hp=794eb1a3f355ec24bee87d9065ff3c69cf2cf186;hpb=ab35630144a13fa0129bb013fbd910ce8a928976;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_Group.cpp b/src/SketchSolver/SketchSolver_Group.cpp index 794eb1a3f..11f334f51 100644 --- a/src/SketchSolver/SketchSolver_Group.cpp +++ b/src/SketchSolver/SketchSolver_Group.cpp @@ -242,12 +242,14 @@ bool SketchSolver_Group::changeConstraint( theConstraint->attribute(SketchPlugin_ConstraintMirror::ENTITY_A())); if (aRefAttr && aRefAttr->isObject()) { FeaturePtr aFeature = ModelAPI_Feature::feature(aRefAttr->object()); - SolverConstraintPtr aConstraint = - SketchSolver_Builder::getInstance()->createRigidConstraint(aFeature); - if (aConstraint) { - aConstraint->setGroup(this); - aConstraint->setStorage(myStorage); - setTemporary(aConstraint); + if (aFeature) { + SolverConstraintPtr aConstraint = + SketchSolver_Builder::getInstance()->createRigidConstraint(aFeature); + if (aConstraint) { + aConstraint->setGroup(this); + aConstraint->setStorage(myStorage); + setTemporary(aConstraint); + } } } } @@ -283,7 +285,7 @@ void SketchSolver_Group::moveFeature(std::shared_ptr theFe { // Firstly, create temporary rigid constraint SolverConstraintPtr aConstraint = - SketchSolver_Builder::getInstance()->createRigidConstraint(theFeature); + SketchSolver_Builder::getInstance()->createMovementConstraint(theFeature); if (!aConstraint) return; aConstraint->setGroup(this);