if ( aFace->GetValue().ShapeType() != TopAbs_FACE )
// constraint face can be omitted - it is a valid case
continue;
+ // Keep the old error code as IsSubShapeBelongsTo changes it.
+ TCollection_AsciiString anOldCode = GetErrorCode();
+
if ( IsSubShapeBelongsTo( anObject, 0, aFace, 0 ) ) {
// valid constraint
+ SetErrorCode(anOldCode);
aRefSh = aFace->GetLastFunction();
aConstraints->Append(aRefSh);
it++;
Handle(GEOM_Object) theObject,
const Standard_Integer theObjectIndex)
{
+ SetErrorCode(KO);
+
if ( theObject.IsNull() || theSubObject.IsNull() )
return false;
}
TopExp::MapShapes( shape, anIndices );
- return anIndices.Contains( subShape );
+
+ const Standard_Boolean isBelongTo = anIndices.Contains(subShape);
+
+ SetErrorCode(OK);
+
+ return isBelongTo;
}
//=============================================================================