//// theConstraint->data()->attributes(ModelAPI_AttributeRefAttr::typeId());
//// std::list<AttributePtr>::const_iterator anAttrIt = aRefAttrs.begin();
//// for (; anAttrIt != aRefAttrs.end(); ++anAttrIt) {
-//// AttributeRefAttrPtr aRef = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttrIt);
+//// AttributeRefAttrPtr aRef =
+//// std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anAttrIt);
//// if (aRef->isObject()) {
//// FeaturePtr aFeature = ModelAPI_Feature::feature(aRef->object());
//// if (aFeature) addEntity(aFeature, EntityWrapperPtr());
//// std::list<AttributePtr> aRefLists =
//// theConstraint->data()->attributes(ModelAPI_AttributeRefList::typeId());
//// for (anAttrIt = aRefLists.begin(); anAttrIt != aRefLists.end(); ++anAttrIt) {
-//// AttributeRefListPtr aRef = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anAttrIt);
+//// AttributeRefListPtr aRef =
+//// std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anAttrIt);
//// std::list<ObjectPtr> anObj = aRef->list();
//// std::list<ObjectPtr>::iterator anIt = anObj.begin();
//// for (; anIt != anObj.end(); ++anIt) {
}
-bool SketchSolver_Storage::isConsistent() const
+bool SketchSolver_Storage::areFeaturesValid() const
{
- // Check the constraints are valid
- std::map<ConstraintPtr, ConstraintWrapperPtr>::const_iterator
- aCIter = myConstraintMap.begin();
- for (; aCIter != myConstraintMap.end(); ++aCIter)
- if (!aCIter->first->data() || !aCIter->first->data()->isValid())
- return false;
// Check the features are valid
std::map<FeaturePtr, EntityWrapperPtr>::const_iterator aFIter = myFeatureMap.begin();
for (; aFIter != myFeatureMap.end(); aFIter++)
std::map<ConstraintPtr, ConstraintWrapperPtr>::const_iterator
aConstrIt = myConstraintMap.begin();
for (; aConstrIt != myConstraintMap.end(); ++aConstrIt) {
- if (theSolver->isConflicting(aConstrIt->second->id())) {
+ if (theSolver->isConflicting(aConstrIt->second->id()))
aConflicting.insert(aConstrIt->first);
- break;
- }
}
return aConflicting;
}