]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
DCQ: Debug MakeFaces Ecole_Ete_a4
authordcq <dcq@opencascade.com>
Wed, 5 May 2004 10:01:35 +0000 (10:01 +0000)
committerdcq <dcq@opencascade.com>
Wed, 5 May 2004 10:01:35 +0000 (10:01 +0000)
src/GEOM/GEOM_Gen_i.cc

index 35a5215450c863dffb38005249c4b249560212d1..41506b1e73e2ee029b424e40eac7747507275edc 100644 (file)
@@ -3741,10 +3741,21 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFaces(const GEOM::GEOM_Gen::ListOfIOR& List
        FR.Perform();
     
        if(FR.IsDone()) {
-         for(; FR.More(); FR.Next())
-           aBuilder.Add(C, FR.Current().Oriented(OriF));
-         result = CreateObject(C);
-         InsertInLabelMoreArguments(C, result, ListShapes, myCurrentOCAFDoc);
+         int k = 0;
+         TopoDS_Shape aFace;
+         for(; FR.More(); FR.Next()) {
+           aFace = FR.Current().Oriented(OriF);
+           aBuilder.Add(C, aFace);
+           k++;
+         }
+         if(k == 1) {
+           result = CreateObject(aFace);
+           InsertInLabelMoreArguments(aFace, result, ListShapes, myCurrentOCAFDoc);
+         }
+         else {
+           result = CreateObject(C);
+           InsertInLabelMoreArguments(C, result, ListShapes, myCurrentOCAFDoc);
+         }
        }
       }
     }