TopoDS_Shape aRegionShape = aRegion->GetShape();
if( !aRegionShape.IsNull() ) {
- TopExp_Explorer anExp( aRegionShape, TopAbs_FACE );
- if ( anExp.More() ) {
+ if ( aRegionShape.ShapeType() == TopAbs_FACE ) {
+ TopoDS_Face aFace = TopoDS::Face( aRegionShape );
+ if ( !aFace.IsNull() ) {
+ aFacesList.Append( aFace );
+ aSewing.Add( aFace );
+ }
+ } else {
+ TopExp_Explorer anExp( aRegionShape, TopAbs_FACE );
for ( ; anExp.More(); anExp.Next() ) {
TopoDS_Face aFace = TopoDS::Face( anExp.Current() );
if ( !aFace.IsNull() ) {
aSewing.Add( aFace );
}
}
- } else {
- if ( aRegionShape.ShapeType() == TopAbs_FACE ) {
- aFacesList.Append( aRegionShape );
- }
- aSewing.Add( aRegionShape );
}
}
} // regions iterator