]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Replaces method SetImplicitBoolean() by the method SetImplicitFunction()
authorpkv <pkv@opencascade.com>
Wed, 14 Sep 2005 06:39:56 +0000 (06:39 +0000)
committerpkv <pkv@opencascade.com>
Wed, 14 Sep 2005 06:39:56 +0000 (06:39 +0000)
src/PIPELINE/SALOME_ExtractGeometry.cxx
src/PIPELINE/SALOME_ExtractGeometry.h
src/PIPELINE/VISU_PipeLine.cxx
src/PIPELINE/VISU_PipeLine.hxx

index 13655093f9dec9d295721a61059706aff983f355..a6647893d602ee0ecb047389ff767b53ccf9a2d9 100755 (executable)
@@ -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<vtkImplicitBoolean*>(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();
index 74c1ec301661b05c926adc3808dbdaa218a40285..bc70700835caf150cd8b295d4ec86f03b727af99 100755 (executable)
@@ -27,6 +27,7 @@
 #include <vector>
 
 //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();
   }
index c0211b3483e9140692702c92f421966dbcc53735..cfae1b28a53778183c81d4e80d0c0e5245e5573e 100644 (file)
@@ -40,6 +40,7 @@
 #include <vtkPlane.h>
 #include <vtkExtractGeometry.h>
 #include <vtkImplicitBoolean.h>
+#include <vtkImplicitFunction.h>
 #include <vtkImplicitFunctionCollection.h>
 #include <vtkMath.h>
 
@@ -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);
+} 
index fd4df1bc1f07b7d6b5f1586b2c12c0ad705892e5..5f8409227fc031e01b5efec616e4fd6f87887a8b 100644 (file)
@@ -34,6 +34,7 @@
 #include "VISU_IDMapper.hxx"
 
 class vtkCell;
+class vtkImplicitFunction;
 
 template <class T>
 class TVTKSmartPtr: public vtkSmartPointer<T>
@@ -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&);