X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchSolver%2FSketchSolver_ConstraintCoincidence.cpp;h=934966b523121cc8800b88d63e369fc1a6d3cf39;hb=8476d5e088f7b1b5a414fa5e33ce99d6131929eb;hp=1859ec2156d74979f1f349667fde5cc3adfd31f6;hpb=c48541d1114c5cc388db22ea73af8950de2ffa7b;p=modules%2Fshaper.git diff --git a/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp b/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp index 1859ec215..934966b52 100644 --- a/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintCoincidence.cpp @@ -37,28 +37,3 @@ void SketchSolver_ConstraintCoincidence::getAttributes( } else myErrorMsg = SketchSolver_Error::INCORRECT_ATTRIBUTE(); } - - -static bool isBase(const std::list& theConstraints, AttributePtr theAttribute) -{ - AttributePtr anAttribute = theAttribute; - FeaturePtr aFeature; - AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast(theAttribute); - if (aRefAttr) { - if (aRefAttr->isObject()) - aFeature = ModelAPI_Feature::feature(aRefAttr->object()); - else - anAttribute = aRefAttr->attr(); - } - - std::list::const_iterator aCIt = theConstraints.begin(); - for (; aCIt != theConstraints.end(); ++aCIt) { - std::list aSubs = (*aCIt)->entities(); - std::list::const_iterator aSIt = aSubs.begin(); - for (; aSIt != aSubs.end(); ++aSIt) - if ((aFeature && (*aSIt)->isBase(aFeature)) || - (!aFeature && (*aSIt)->isBase(anAttribute))) - return true; - } - return false; -}