From 555afb1e97eb797b62fdee46ef3b493b160b73a2 Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 28 Sep 2005 08:53:34 +0000 Subject: [PATCH] To to shallow copy of input data set to output one if there is no implicit function defined --- src/PIPELINE/SALOME_ExtractGeometry.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/PIPELINE/SALOME_ExtractGeometry.cxx b/src/PIPELINE/SALOME_ExtractGeometry.cxx index 816cf533..55db4664 100755 --- a/src/PIPELINE/SALOME_ExtractGeometry.cxx +++ b/src/PIPELINE/SALOME_ExtractGeometry.cxx @@ -144,16 +144,20 @@ SALOME_ExtractGeometry { myElemVTK2ObjIds.clear(); myNodeVTK2ObjIds.clear(); - if(myImplicitBoolean.GetPointer()){ + + bool anIsNothingToDo = !this->ImplicitFunction; + + if(!anIsNothingToDo && myImplicitBoolean.GetPointer()){ if(vtkImplicitFunctionCollection* aFunction = myImplicitBoolean->GetFunction()){ - if(aFunction->GetNumberOfItems() == 0){ - vtkDebugMacro(<<"Extracting geometry - ShallowCopy"); - GetOutput()->ShallowCopy(GetInput()); - Modified(); - return; - } + anIsNothingToDo = aFunction->GetNumberOfItems() == 0; } } + + if(anIsNothingToDo){ + GetOutput()->ShallowCopy(GetInput()); + return; + } + Execute2(); } @@ -179,8 +183,6 @@ SALOME_ExtractGeometry numCells = input->GetNumberOfCells(); numPts = input->GetNumberOfPoints(); - vtkDebugMacro(<< "Extracting geometry"); - if ( ! this->ImplicitFunction ) { vtkErrorMacro(<<"No implicit function specified"); -- 2.39.2