From d529c4223d21a653039fb54c16043139a417cdb5 Mon Sep 17 00:00:00 2001 From: dcq Date: Wed, 5 May 2004 10:01:35 +0000 Subject: [PATCH] DCQ: Debug MakeFaces --- src/GEOM/GEOM_Gen_i.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/GEOM/GEOM_Gen_i.cc b/src/GEOM/GEOM_Gen_i.cc index 35a521545..41506b1e7 100644 --- a/src/GEOM/GEOM_Gen_i.cc +++ b/src/GEOM/GEOM_Gen_i.cc @@ -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); + } } } } -- 2.39.2