From: pkv Date: Wed, 14 Sep 2005 06:39:56 +0000 (+0000) Subject: Replaces method SetImplicitBoolean() by the method SetImplicitFunction() X-Git-Tag: BR-D5-38-2003_D2005-12-10~198 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1668523be7fb5f16c04bdab8210ae827bcef449b;p=modules%2Fvisu.git Replaces method SetImplicitBoolean() by the method SetImplicitFunction() --- diff --git a/src/PIPELINE/SALOME_ExtractGeometry.cxx b/src/PIPELINE/SALOME_ExtractGeometry.cxx index 13655093..a6647893 100755 --- a/src/PIPELINE/SALOME_ExtractGeometry.cxx +++ b/src/PIPELINE/SALOME_ExtractGeometry.cxx @@ -81,14 +81,15 @@ vtkIdType SALOME_ExtractGeometry::GetNodeObjId(int theVtkID) #endif } - -void SALOME_ExtractGeometry::SetImplicitBoolean(vtkImplicitBoolean* theImplicitBoolean) +//void SALOME_ExtractGeometry::SetImplicitBoolean(vtkImplicitBoolean* theImplicitBoolean) +void SALOME_ExtractGeometry::SetImplicitFunction(vtkImplicitFunction* theImplicitFunction) { - myImplicitBoolean = theImplicitBoolean; - SetImplicitFunction(theImplicitBoolean); + //myImplicitBoolean = theImplicitBoolean; + //SetImplicitFunction(theImplicitBoolean); + myImplicitBoolean=dynamic_cast(theImplicitFunction); + vtkExtractGeometry::SetImplicitFunction(theImplicitFunction); } - void SALOME_ExtractGeometry::SetStoreMapping(bool theStoreMapping) { myStoreMapping = theStoreMapping; @@ -103,7 +104,7 @@ void SALOME_ExtractGeometry::Execute() if(aFunction->GetNumberOfItems() == 0){ myElemVTK2ObjIds.clear(); myNodeVTK2ObjIds.clear(); - + printf(" * SALOME_ExtractGeometry::Execute\n"); vtkDebugMacro(<< "Extracting geometry - ShallowCopy"); GetOutput()->ShallowCopy(GetInput()); Modified(); diff --git a/src/PIPELINE/SALOME_ExtractGeometry.h b/src/PIPELINE/SALOME_ExtractGeometry.h index 74c1ec30..bc707008 100755 --- a/src/PIPELINE/SALOME_ExtractGeometry.h +++ b/src/PIPELINE/SALOME_ExtractGeometry.h @@ -27,6 +27,7 @@ #include //class vtkImplicitBoolean; +class vtkImplicitFunction; class SALOME_ExtractGeometry : public vtkExtractGeometry { @@ -35,7 +36,9 @@ public: static SALOME_ExtractGeometry *New(); - void SetImplicitBoolean(vtkImplicitBoolean* theImplicitBoolean); + //void SetImplicitBoolean(vtkImplicitBoolean* theImplicitBoolean); + virtual void SetImplicitFunction(vtkImplicitFunction* theImplicitFunction); + vtkImplicitBoolean* GetImplicitBoolean() const { return myImplicitBoolean.GetPointer(); } diff --git a/src/PIPELINE/VISU_PipeLine.cxx b/src/PIPELINE/VISU_PipeLine.cxx index c0211b34..cfae1b28 100644 --- a/src/PIPELINE/VISU_PipeLine.cxx +++ b/src/PIPELINE/VISU_PipeLine.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -61,7 +62,8 @@ VISU_PipeLine::VISU_PipeLine() //myExtractGeometry->DebugOn(); vtkImplicitBoolean* anImplicitBoolean = vtkImplicitBoolean::New(); - myExtractGeometry->SetImplicitBoolean(anImplicitBoolean); + //myExtractGeometry->SetImplicitBoolean(anImplicitBoolean); + myExtractGeometry->SetImplicitFunction(anImplicitBoolean); anImplicitBoolean->SetOperationTypeToIntersection(); anImplicitBoolean->Delete(); @@ -86,13 +88,15 @@ VISU_PipeLine { SetIDMapper(thePipeLine->GetIDMapper()); myMapper->ShallowCopy(thePipeLine->GetMapper()); - myExtractGeometry->SetImplicitBoolean(thePipeLine->myExtractGeometry->GetImplicitBoolean()); + //myExtractGeometry->SetImplicitBoolean(thePipeLine->myExtractGeometry->GetImplicitBoolean()); + myExtractGeometry->SetImplicitFunction(thePipeLine->myExtractGeometry->GetImplicitBoolean()); Build(); } void VISU_PipeLine::SameAs(VISU_PipeLine *thePipeLine){ ShallowCopy(thePipeLine); - myExtractGeometry->SetImplicitBoolean(vtkImplicitBoolean::New()); + //myExtractGeometry->SetImplicitBoolean(vtkImplicitBoolean::New()); + myExtractGeometry->SetImplicitFunction(vtkImplicitBoolean::New()); myExtractGeometry->GetImplicitBoolean()->Delete(); } @@ -377,3 +381,18 @@ VISU_PipeLine { return myIDMapper; } +//======================================================================= +void VISU_PipeLine::SetImplicitFunction(vtkImplicitFunction *theFunction) +{ + myExtractGeometry->SetImplicitFunction(theFunction); +} +//======================================================================= +vtkImplicitFunction * VISU_PipeLine::GetImplicitFunction() +{ + return myExtractGeometry->GetImplicitFunction(); +} +//======================================================================= +void VISU_PipeLine::SetExtractInside(int theFlag) +{ + myExtractGeometry->SetExtractInside(theFlag); +} diff --git a/src/PIPELINE/VISU_PipeLine.hxx b/src/PIPELINE/VISU_PipeLine.hxx index fd4df1bc..5f840922 100644 --- a/src/PIPELINE/VISU_PipeLine.hxx +++ b/src/PIPELINE/VISU_PipeLine.hxx @@ -34,6 +34,7 @@ #include "VISU_IDMapper.hxx" class vtkCell; +class vtkImplicitFunction; template class TVTKSmartPtr: public vtkSmartPointer @@ -144,6 +145,10 @@ public: const VISU::PIDMapper& GetIDMapper()const; + void SetImplicitFunction(vtkImplicitFunction *theFunction); + vtkImplicitFunction* GetImplicitFunction(); + void SetExtractInside (int); + protected: VISU_PipeLine(); VISU_PipeLine(const VISU_PipeLine&);