+#ifdef _DEBUG
+ // Verify attributes of constraint and generate errors
+ std::list<AttributePtr> anAttrList = aData->attributes(std::string());
+ std::list<AttributePtr>::iterator anIter = anAttrList.begin();
+ for (; anIter != anAttrList.end(); anIter++) {
+ AttributeRefAttrPtr aRefAttr = std::dynamic_pointer_cast<ModelAPI_AttributeRefAttr>(*anIter);
+ if (aRefAttr) {
+ if (aRefAttr->isObject() && aRefAttr->object()) {
+ ResultConstructionPtr aRC =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aRefAttr->object());
+ if (!aRC)
+ Events_Error::send(SketchSolver_Error::NEED_OBJECT_NOT_FEATURE(), this);
+ }
+ continue;
+ }
+ AttributeRefListPtr aRefList = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(*anIter);
+ if (aRefList) {
+ std::list<ObjectPtr> aList = aRefList->list();
+ std::list<ObjectPtr>::iterator aListIter = aList.begin();
+ for (; aListIter != aList.end(); aListIter++) {
+ ResultConstructionPtr aRC =
+ std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(*aListIter);
+ if (*aListIter && !aRC)
+ Events_Error::send(SketchSolver_Error::NEED_OBJECT_NOT_FEATURE(), this);
+ }
+ }
+ }
+#endif
+