]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMImpl/GEOMImpl_HealingDriver.cxx
Salome HOME
Merge remote branch 'origin/gdd/translations'
[modules/geom.git] / src / GEOMImpl / GEOMImpl_HealingDriver.cxx
index edce49658cdb93a9dcece06a8ca2831fc0fcda1f..3c519465c76fad30fb043e9b86e5deaf8b9fe45c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -450,26 +450,19 @@ Standard_Boolean GEOMImpl_HealingDriver::Sew (GEOMImpl_IHealing*  theHI,
 {
   Standard_Real aTol = theHI->GetTolerance();
 
-  TopoDS_Compound faceCompound;
+  TopoDS_Compound aCompound;
   BRep_Builder builder;
-  builder.MakeCompound( faceCompound );
+  builder.MakeCompound( aCompound );
 
-  TopExp_Explorer faceExp( theOriginalShape, TopAbs_FACE );
-  for ( ; faceExp.More(); faceExp.Next() )
-    builder.Add( faceCompound, faceExp.Current() );
-  
+  builder.Add( aCompound, theOriginalShape );
   Handle(TColStd_HSequenceOfTransient) otherObjs = theHI->GetShapes();
   for ( int ind = 1; ind <= otherObjs->Length(); ind++)
   {
     Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(otherObjs->Value(ind));
-    TopoDS_Shape aShape = aRefShape->GetValue();
-    if (aShape.IsNull())
-      Standard_NullObject::Raise("Null object given");
-    for ( faceExp.Init( aShape, TopAbs_FACE ); faceExp.More(); faceExp.Next() )
-      builder.Add( faceCompound, faceExp.Current() );
+    builder.Add( aCompound, aRefShape->GetValue() );
   }
 
-  ShHealOper_Sewing aHealer (faceCompound, aTol);
+  ShHealOper_Sewing aHealer (aCompound, aTol);
 
   // Set non-manifold mode.
   aHealer.SetNonManifoldMode(isAllowNonManifold);