- else {
- GeomAbs_SurfaceType aFaceType = GeomAbs_Plane;
- if (theArguments.size() == 1) aFaceType = faceType(theArguments.front());
- if (aGeomShape->isFace()) {
- isValidFace(aGeomShape, aFaceType, theError);
- }
- else if (aSelectionAttr->isGeometricalSelection() && aGeomShape->isCompound()) {
- for (GeomAPI_ShapeIterator anIt(aGeomShape); anIt.more(); anIt.next()) {
- if (!isValidFace(anIt.current(), aFaceType, theError)) {
- break;
- }
- }
- }
- else {
- aValid = false;
- theError = "The shape is not a face.";
+ else if (aSelectionAttr->isGeometricalSelection() && aGeomShape->isCompound()) {
+ for (GeomAPI_ShapeIterator anIt(aGeomShape); anIt.more() && aValid; anIt.next()) {
+ aValid = isValidFace(anIt.current(), aFaceType, theError);