]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Porting to VTK 6.
authorouv <ouv@opencascade.com>
Wed, 30 Jan 2013 11:09:49 +0000 (11:09 +0000)
committerouv <ouv@opencascade.com>
Wed, 30 Jan 2013 11:09:49 +0000 (11:09 +0000)
First compilable version of GEOM and SMESH modules.

16 files changed:
src/OBJECT/GEOM_Actor.cxx
src/OBJECT/GEOM_DeviceActor.cxx
src/OBJECT/GEOM_DeviceActor.h
src/OBJECT/GEOM_OCCReader.cxx
src/OBJECT/GEOM_OCCReader.h
src/OBJECT/GEOM_VTKTrihedron.cxx
src/OCC2VTK/GEOM_EdgeSource.cxx
src/OCC2VTK/GEOM_EdgeSource.h
src/OCC2VTK/GEOM_FaceSource.h
src/OCC2VTK/GEOM_ShadingFace.cxx
src/OCC2VTK/GEOM_ShadingFace.h
src/OCC2VTK/GEOM_VertexSource.cxx
src/OCC2VTK/GEOM_VertexSource.h
src/OCC2VTK/GEOM_WireframeFace.cxx
src/OCC2VTK/GEOM_WireframeFace.h
src/VTKExport/VTKExport.cxx

index 5865ba5d28ccc5759e5858a7ddac1c1a58f14aa4..6c92ed63d252ab33031e1f29d66fe41afd0a1eaf 100644 (file)
@@ -119,7 +119,7 @@ GEOM_Actor::GEOM_Actor():
   MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
 #endif
 
-  myPolyDataMapper->SetInput(myAppendFilter->GetOutput()); 
+  myPolyDataMapper->SetInputConnection(myAppendFilter->GetOutputPort()); 
   vtkProperty* aProperty; 
 
   myHighlightProp->SetAmbient(0.5);
@@ -132,45 +132,45 @@ GEOM_Actor::GEOM_Actor():
   myHighlightProp->SetPointSize(SALOME_POINT_SIZE);
   myHighlightActor->SetProperty(myHighlightProp.GetPointer());
 
-  this->myHighlightActor->SetInput(myAppendFilter->GetOutput(),false);
+  this->myHighlightActor->SetInput(myAppendFilter->GetOutputPort(),false);
 
   myPreHighlightProp->SetColor(0,1,1);
   myPreHighlightProp->SetPointSize(SALOME_POINT_SIZE+2);
   myPreHighlightProp->SetLineWidth(SALOME_LINE_WIDTH+1);
   myPreHighlightProp->SetRepresentationToWireframe();
 
-  myAppendFilter->AddInput(myVertexSource->GetOutput()); 
-  myVertexActor->SetInput(myVertexSource->GetOutput(),false); 
+  myAppendFilter->AddInputConnection(myVertexSource->GetOutputPort()); 
+  myVertexActor->SetInput(myVertexSource->GetOutputPort(),false); 
   aProperty = myVertexActor->GetProperty(); 
   aProperty->SetRepresentation(VTK_POINTS); 
   aProperty->SetPointSize(3); 
   aProperty->SetColor(1, 1, 0);
  
-  myAppendFilter->AddInput(myIsolatedEdgeSource->GetOutput());
-  myIsolatedEdgeActor->SetInput(myIsolatedEdgeSource->GetOutput(),false); 
+  myAppendFilter->AddInputConnection(myIsolatedEdgeSource->GetOutputPort());
+  myIsolatedEdgeActor->SetInput(myIsolatedEdgeSource->GetOutputPort(),false); 
   aProperty = myIsolatedEdgeActor->GetProperty(); 
   aProperty->SetRepresentation(VTK_WIREFRAME); 
   aProperty->SetColor(1, 0, 0);
  
-  myAppendFilter->AddInput(myOneFaceEdgeSource->GetOutput());
-  myOneFaceEdgeActor->SetInput(myOneFaceEdgeSource->GetOutput(),false); 
+  myAppendFilter->AddInputConnection(myOneFaceEdgeSource->GetOutputPort());
+  myOneFaceEdgeActor->SetInput(myOneFaceEdgeSource->GetOutputPort(),false); 
   aProperty = myOneFaceEdgeActor->GetProperty(); 
   aProperty->SetRepresentation(VTK_WIREFRAME); 
   aProperty->SetColor(0, 1, 0);
  
-  myAppendFilter->AddInput(mySharedEdgeSource->GetOutput()); 
-  mySharedEdgeActor->SetInput(mySharedEdgeSource->GetOutput(),false); 
+  myAppendFilter->AddInputConnection(mySharedEdgeSource->GetOutputPort()); 
+  mySharedEdgeActor->SetInput(mySharedEdgeSource->GetOutputPort(),false); 
   aProperty = mySharedEdgeActor->GetProperty(); 
   aProperty->SetRepresentation(VTK_WIREFRAME); 
   aProperty->SetColor(1, 1, 0);
  
-  myAppendFilter->AddInput(myWireframeFaceSource->GetOutput()); 
-  myWireframeFaceActor->SetInput(myWireframeFaceSource->GetOutput(),false); 
+  myAppendFilter->AddInputConnection(myWireframeFaceSource->GetOutputPort()); 
+  myWireframeFaceActor->SetInput(myWireframeFaceSource->GetOutputPort(),false); 
   aProperty = myWireframeFaceActor->GetProperty(); 
   aProperty->SetRepresentation(VTK_WIREFRAME); 
   aProperty->SetColor(0.5, 0.5, 0.5);
 
-  myShadingFaceActor->SetInput(myShadingFaceSource->GetOutput(),true); 
+  myShadingFaceActor->SetInput(myShadingFaceSource->GetOutputPort(),true); 
 
   myShadingFaceProp->SetRepresentation(VTKViewer::Representation::Surface); 
   myShadingFaceProp->SetInterpolationToGouraud(); 
@@ -218,7 +218,7 @@ New()
 void Write(vtkPolyData* theDataSet, const char* theFileName){ 
   vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New(); 
   MESSAGE ("Write - "<<theFileName<<"' : "<<theDataSet->GetNumberOfPoints()<<"; "<<theDataSet->GetNumberOfCells()); 
-  aWriter->SetInput(theDataSet); 
+  aWriter->SetInputData(theDataSet); 
   aWriter->SetFileName(theFileName); 
   //aWriter->Write(); 
   aWriter->Delete(); 
index 9a25e86e57f99c5e30f6c34d733eebdd19eb0015..cd43d4d2e57341e69e1be094c33becfbcac28b0a 100755 (executable)
@@ -38,8 +38,8 @@ GEOM_DeviceActor::GEOM_DeviceActor():
   myPolyDataNormals(vtkPolyDataNormals::New(),true), 
   myActor(VTKViewer_Actor::New(),true) 
 { 
-  myStripper->SetInput(myPolyDataNormals->GetOutput()); 
-  myPolyDataMapper->SetInput(myStripper->GetOutput()); 
+  myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort()); 
+  myPolyDataMapper->SetInputConnection(myStripper->GetOutputPort()); 
  
   myActor->SetMapper(myPolyDataMapper.Get()); 
   myActor->PickableOff(); 
@@ -51,12 +51,12 @@ GEOM_DeviceActor::~GEOM_DeviceActor()
  
 void 
 GEOM_DeviceActor:: 
-SetInput(vtkPolyData* thePolyData, bool theUseStripper)
+SetInput(vtkAlgorithmOutput* thePolyData, bool theUseStripper)
 { 
   if(theUseStripper)
-    myPolyDataNormals->SetInput(thePolyData); 
+    myPolyDataNormals->SetInputConnection(thePolyData); 
   else 
-    myPolyDataMapper->SetInput(thePolyData); 
+    myPolyDataMapper->SetInputConnection(thePolyData); 
 }
  
 void 
@@ -72,20 +72,20 @@ GetProperty()
 {
   return myActor->GetProperty();
 }
-
-void \r
-GEOM_DeviceActor:: \r
-SetBackfaceProperty(vtkProperty* theProperty)\r
-{\r
-  myActor->SetBackfaceProperty(theProperty);\r
-}\r
\r
-vtkProperty* \r
-GEOM_DeviceActor:: \r
-GetBackfaceProperty()\r
-{\r
-  return myActor->GetBackfaceProperty();\r
-}\r
+void
+GEOM_DeviceActor::
+SetBackfaceProperty(vtkProperty* theProperty)
+{
+  myActor->SetBackfaceProperty(theProperty);
+}
+vtkProperty*
+GEOM_DeviceActor::
+GetBackfaceProperty()
+{
+  return myActor->GetBackfaceProperty();
+}
  
 void 
 GEOM_DeviceActor:: 
index 67edada940fa30d9b8d691fc6e4c635ee3a392d9..c7baebeee885a3fe716daef584061341043438ca 100755 (executable)
@@ -43,6 +43,7 @@ class vtkRenderer;
  
 #include <vtkObject.h> 
  
+class vtkAlgorithmOutput;
  
 class VTK_EXPORT GEOM_DeviceActor: public vtkObject 
 {  
@@ -52,14 +53,14 @@ public:
 
   void SetProperty(vtkProperty* theProperty);
   vtkProperty* GetProperty();
\r
-  void SetBackfaceProperty(vtkProperty* theProperty);\r
+
+  void SetBackfaceProperty(vtkProperty* theProperty);
   vtkProperty* GetBackfaceProperty();
 
   void SetVisibility(int theVisibility); 
   int GetVisibility(); 
  
-  void SetInput(vtkPolyData* thePolyData, bool theUseStripper); 
+  void SetInput(vtkAlgorithmOutput* thePolyData, bool theUseStripper); 
 
   void AddToRender(vtkRenderer* theRenderer); 
   void RemoveFromRender(vtkRenderer* theRenderer);
index d9f1331a988553855750dcc540d927f993426ed2..0318da56780cc1f2e07069d261efbdb9e6ad7f52 100644 (file)
@@ -33,6 +33,8 @@
 
 #include <vtkObjectFactory.h>
 #include <vtkPolyData.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 // OpenCASCADE Includes
 #include <TopExp_Explorer.hxx>
@@ -114,14 +116,18 @@ GEOM_OCCReader::~GEOM_OCCReader()
 
 
 //=======================================================================
-// Function : Execute
+// Function : RequestData
 // Purpose  : 
 //=======================================================================
 
+int GEOM_OCCReader::RequestData(vtkInformation *vtkNotUsed(request),
+                                vtkInformationVector **inputVector,
+                                vtkInformationVector *outputVector)
+{
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  vtkPolyData *output = vtkPolyData::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
 
-void GEOM_OCCReader::Execute() {
-
-  vtkPolyData* output = this->GetOutput();
   vtkPoints* Pts = NULL;
   vtkCellArray* Cells = NULL;
   TopLoc_Location aLoc;
@@ -143,7 +149,7 @@ void GEOM_OCCReader::Execute() {
       if(aPoly.IsNull()) {
         Pts->Delete();
         Cells->Delete();
-        return;
+        return 0;
       }
 
       nbpts = aPoly->NbNodes();
@@ -155,7 +161,7 @@ void GEOM_OCCReader::Execute() {
     else { 
         Cells->Delete();
         Pts->Delete();
-        return; 
+        return 0
     }
   }
 
@@ -177,7 +183,7 @@ void GEOM_OCCReader::Execute() {
   }
   Pts->Delete();
   Cells->Delete();
-  
+  return 1;
 }
 
 //=======================================================================
index c69b67d357cb2c9498bf653222d75cb44622ed09..350bb0113e6ec6cb91d6086474465eb1990623c5 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "GEOM_OBJECT_defs.hxx"
 
-#include <vtkPolyDataSource.h>
+#include <vtkAlgorithm.h>
 
 class vtkPoints;
 class vtkCellArray;
@@ -46,7 +46,7 @@ class vtkCellArray;
 #include <GeomAbs_IsoType.hxx>
 #include <BRepAdaptor_Surface.hxx>
 
-class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
+class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkAlgorithm {
 
   // methods    
 
@@ -67,7 +67,8 @@ class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
 
   GEOM_OCCReader();
   ~GEOM_OCCReader();
-  void Execute();       
+
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
 
   void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells);
   void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells);
index 5c525974510114af88a3c53d4c6bf216e79449ae..e984c7d54f653c78bbf164a1a150dfc32b3b2148 100644 (file)
@@ -254,11 +254,11 @@ void GEOM_VTKTrihedron::SetSize( vtkFloatingPointType theSize )
   aSrcZ->SetPoint2( aEndZ.X(), aEndZ.Y(), aEndZ.Z() );
 
   vtkAppendPolyData* aRes = vtkAppendPolyData::New();
-  aRes->AddInput( aSrcX->GetOutput() );
-  aRes->AddInput( aSrcY->GetOutput() );
-  aRes->AddInput( aSrcZ->GetOutput() );
+  aRes->AddInputConnection( aSrcX->GetOutputPort() );
+  aRes->AddInputConnection( aSrcY->GetOutputPort() );
+  aRes->AddInputConnection( aSrcZ->GetOutputPort() );
   
-  myMapper->SetInput( aRes->GetOutput() );
+  myMapper->SetInputConnection( aRes->GetOutputPort() );
   SALOME_Actor::SetMapper( myMapper );
 
   aSrcX->Delete();
index d7d3a41747fd0b1435b427f73e4fbb361460e204..66dafa00804d593a93c1598744b0c4d48870b994 100755 (executable)
@@ -34,6 +34,8 @@
  
 #include <vtkStripper.h>  
 #include <vtkPolyData.h>  
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 vtkStandardNewMacro(GEOM_EdgeSource);
  
@@ -53,11 +55,14 @@ void GEOM_EdgeSource::AddEdge (const TopoDS_Edge& theEdge,
   myIsVector = theIsVector;
 }
 
-void
-GEOM_EdgeSource:: 
-Execute()
+int GEOM_EdgeSource::RequestData(vtkInformation *vtkNotUsed(request),
+                                 vtkInformationVector **inputVector,
+                                 vtkInformationVector *outputVector)
 {
-  vtkPolyData* aPolyData = GetOutput();
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
   aPolyData->Allocate();
   vtkPoints* aPts = vtkPoints::New();
   aPolyData->SetPoints(aPts);
@@ -71,6 +76,7 @@ Execute()
       anEdge.Orientation( TopAbs_FORWARD );
     OCC2VTK(anEdge,aPolyData,aPts,myIsVector||myIsVectorMode);
   }
+  return 1;
 }
 
 void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,  
index 282c4c906452f2739974e3749f1b2309a210454e..89d04f56d384247502fb833ee94cf137a2671254 100755 (executable)
 typedef NCollection_Set<TopoDS_Edge> TEdgeSet; 
  
 #include <vtkPoints.h> 
-#include <vtkPolyDataSource.h> 
+#include <vtkAlgorithm.h> 
 
-class OCC2VTK_EXPORT GEOM_EdgeSource: public vtkPolyDataSource 
+class vtkPolyData;
+
+class OCC2VTK_EXPORT GEOM_EdgeSource: public vtkAlgorithm 
 { 
 public: 
-  vtkTypeMacro(GEOM_EdgeSource,vtkPolyDataSource); 
+  vtkTypeMacro(GEOM_EdgeSource,vtkAlgorithm); 
   static GEOM_EdgeSource* New(); 
  
   void AddEdge (const TopoDS_Edge& theEdge,
@@ -59,7 +61,7 @@ protected:
   // representing a vector, can have only one edge.
   bool myIsVector, myIsVectorMode;
  
-  void Execute(); 
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
  
   GEOM_EdgeSource(); 
   ~GEOM_EdgeSource(); 
index 557c0605d86615f1a6e993c0a850b8318bbbbbd9..e0226cc946fb10599441297951ef02b7e49b6af9 100755 (executable)
 typedef NCollection_Set<TopoDS_Face> TFaceSet; 
  
 #include <vtkPoints.h> 
-#include <vtkPolyDataSource.h> 
+#include <vtkAlgorithm.h> 
 
-class OCC2VTK_EXPORT GEOM_FaceSource: public vtkPolyDataSource 
+class vtkPolyData;
+
+class OCC2VTK_EXPORT GEOM_FaceSource: public vtkAlgorithm 
 { 
 public: 
-  vtkTypeMacro(GEOM_FaceSource,vtkPolyDataSource); 
+  vtkTypeMacro(GEOM_FaceSource,vtkAlgorithm); 
  
   void AddFace(const TopoDS_Face& theFace); 
   void Clear(){ myFaceSet.Clear();} 
index ad2ae5b186eff507d53547bb900ddd193901ed0a..aae437dc862c7645b26dc83225b8fef35eeb5957 100755 (executable)
 
 #include <vtkPolyDataMapper.h>  
 #include <vtkPolyData.h>  
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
 
 #include <BRep_Tool.hxx>
 #include <Poly_Triangulation.hxx>
+
 
 vtkStandardNewMacro(GEOM_ShadingFace);
  
@@ -41,11 +43,14 @@ GEOM_ShadingFace::~GEOM_ShadingFace()
 { 
 } 
  
-void
-GEOM_ShadingFace:: 
-Execute()
+int GEOM_ShadingFace::RequestData(vtkInformation *vtkNotUsed(request),
+                                  vtkInformationVector **inputVector,
+                                  vtkInformationVector *outputVector)
 {
-  vtkPolyData* aPolyData = GetOutput();
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
   aPolyData->Allocate();
   vtkPoints* aPts = vtkPoints::New();
   aPolyData->SetPoints(aPts);
@@ -56,6 +61,7 @@ Execute()
     const TopoDS_Face& aFace = anIter.Value();
     OCC2VTK(aFace,aPolyData,aPts);
   }
+  return 1;
 }
 
 void  
index 64ae2d0ba484ea1e650218871fbc9329bfcb3d1b..ee59b530dca6f2548dda5b491b37345e98c3e78d 100755 (executable)
@@ -35,7 +35,7 @@ public:
                vtkPoints* thePts); 
  
 protected: 
-  void Execute(); 
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
  
   GEOM_ShadingFace(); 
   ~GEOM_ShadingFace(); 
index daf61b192d71024fd34107279f2b176251b180a2..4509dc12a2d0aad245b512a6f2f62d09ef255de6 100755 (executable)
@@ -25,6 +25,8 @@
 #include <vtkCellArray.h> 
 #include <vtkPolyData.h> 
 #include <vtkPolyDataMapper.h> 
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
  
 #include <gp_Pnt.hxx>
 #include <BRep_Tool.hxx>
@@ -46,11 +48,14 @@ AddVertex(const TopoDS_Vertex& theVertex)
   myVertexSet.Add(theVertex); 
 } 
  
-void
-GEOM_VertexSource:: 
-Execute()
+int GEOM_VertexSource::RequestData(vtkInformation *vtkNotUsed(request),
+                                   vtkInformationVector **inputVector,
+                                   vtkInformationVector *outputVector)
 {
-  vtkPolyData* aPolyData = GetOutput();
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
   aPolyData->Allocate();
   vtkPoints* aPts = vtkPoints::New();
   aPolyData->SetPoints(aPts);
@@ -61,6 +66,7 @@ Execute()
     const TopoDS_Vertex& aVertex = anIter.Value();
     OCC2VTK(aVertex,aPolyData,aPts);
   }
+  return 1;
 }
 
 void  
index 9241b2d3afe6ec4177a8fd35eafa4365036b9bc0..47bf37152458d9ee3f80a461e4d43372b0b2e709 100755 (executable)
 typedef NCollection_Set<TopoDS_Vertex> TVertexSet; 
  
 #include <vtkPoints.h> 
-#include <vtkPolyDataSource.h> 
+#include <vtkAlgorithm.h> 
 
-class OCC2VTK_EXPORT GEOM_VertexSource: public vtkPolyDataSource 
+class vtkPolyData;
+
+class OCC2VTK_EXPORT GEOM_VertexSource: public vtkAlgorithm
 { 
 public: 
-  vtkTypeMacro(GEOM_VertexSource,vtkPolyDataSource); 
+  vtkTypeMacro(GEOM_VertexSource,vtkAlgorithm); 
   static GEOM_VertexSource* New(); 
  
   void AddVertex(const TopoDS_Vertex& theVertex); 
@@ -47,7 +49,8 @@ public:
 protected: 
   TVertexSet myVertexSet; 
  
-  void Execute(); 
+  virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
  
   GEOM_VertexSource(); 
   ~GEOM_VertexSource(); 
index 49e2911aefbe459cf8bf2625e328703e25b56897..dceab70b5b5a1fef00e5d68d5280a5612f81a10a 100755 (executable)
@@ -26,6 +26,8 @@
 
 #include <vtkPolyDataMapper.h>  
 #include <vtkPolyData.h>  
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
  
 #include <Precision.hxx>
 #include <BRepTools.hxx>
@@ -61,11 +63,14 @@ GEOM_WireframeFace::~GEOM_WireframeFace()
 { 
 } 
  
-void
-GEOM_WireframeFace:: 
-Execute()
+int GEOM_WireframeFace::RequestData(vtkInformation *vtkNotUsed(request),
+                                    vtkInformationVector **inputVector,
+                                    vtkInformationVector *outputVector)
 {
-  vtkPolyData* aPolyData = GetOutput();
+  vtkInformation *outInfo = outputVector->GetInformationObject(0);
+  vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+    outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
   aPolyData->Allocate();
   vtkPoints* aPts = vtkPoints::New();
   aPolyData->SetPoints(aPts);
@@ -76,6 +81,7 @@ Execute()
     const TopoDS_Face& aFace = anIter.Value();
     OCC2VTK(aFace,aPolyData,aPts,NbIso,Discret);
   }
+  return 1;
 }
 
 void GEOM_WireframeFace::SetNbIso(const int theNb[2])
index bd931a8edb9f987f646a80f4110b03cab2a599a2..2b2814329b9bf244b5c0db7ae147abefb7760f73 100755 (executable)
@@ -26,7 +26,7 @@
 #include <GeomAbs_IsoType.hxx>
 #include <BRepAdaptor_Surface.hxx>
  
-#include <vtkPolyDataSource.h> 
+class vtkPolyData;
 
 class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource 
 { 
@@ -85,7 +85,7 @@ protected:
               vtkPolyData* thePolyData,
               vtkPoints* thePts);
 
-  void Execute(); 
+  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
  
   GEOM_WireframeFace(); 
   ~GEOM_WireframeFace(); 
index d7ab92002138b360baaa4b5d13211eae62d47a1f..8312c28690f33b4535ad280c1dcd634664784279 100644 (file)
@@ -81,12 +81,12 @@ extern "C"
       GEOM_ShadingFace* myShadingFaceSource = GEOM_ShadingFace::New();
 
       vtkAppendPolyData* myAppendFilter = vtkAppendPolyData::New();
-      myAppendFilter->AddInput( myVertexSource->GetOutput() );
-      myAppendFilter->AddInput( myIsolatedEdgeSource->GetOutput() );
-      myAppendFilter->AddInput( myOneFaceEdgeSource->GetOutput() );
-      myAppendFilter->AddInput( mySharedEdgeSource->GetOutput() );
-      //myAppendFilter->AddInput( myWireframeFaceSource->GetOutput() ); // iso-lines are unnecessary
-      myAppendFilter->AddInput( myShadingFaceSource->GetOutput() );
+      myAppendFilter->AddInputConnection( myVertexSource->GetOutputPort() );
+      myAppendFilter->AddInputConnection( myIsolatedEdgeSource->GetOutputPort() );
+      myAppendFilter->AddInputConnection( myOneFaceEdgeSource->GetOutputPort() );
+      myAppendFilter->AddInputConnection( mySharedEdgeSource->GetOutputPort() );
+      //myAppendFilter->AddInputConnection( myWireframeFaceSource->GetOutputPort() ); // iso-lines are unnecessary
+      myAppendFilter->AddInputConnection( myShadingFaceSource->GetOutputPort() );
 
       float aDeflection = 0.001;
       bool anIsVector = false;
@@ -131,7 +131,7 @@ extern "C"
       Kernel_Utils::Localizer loc;
 
       vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New(); 
-      aWriter->SetInput( myAppendFilter->GetOutput() );
+      aWriter->SetInputConnection( myAppendFilter->GetOutputPort() );
       aWriter->SetFileName( theFileName.ToCString() );
       aWriter->Write();
       aWriter->Delete();