]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/OCC2VTK/GEOM_EdgeSource.cxx
Salome HOME
Copyright update 2022
[modules/geom.git] / src / OCC2VTK / GEOM_EdgeSource.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 0a3a41a..83928b3
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,6 @@
 //
 
 #include "GEOM_EdgeSource.h" 
-#include "OCC2VTK_internal.h"
  
 #include <vtkObjectFactory.h> 
 
 #include <vtkInformation.h>
 #include <vtkInformationVector.h>
 
-vtkStandardNewMacro(GEOM_EdgeSource);
+vtkStandardNewMacro(GEOM_EdgeSource)
  
 GEOM_EdgeSource::GEOM_EdgeSource() :
   myIsVector(false)
 { 
-  myData = new EdgeSourceInternal;
   this->SetNumberOfInputPorts(0);
 } 
  
 GEOM_EdgeSource::~GEOM_EdgeSource() 
-{
-  delete myData;
+{ 
 } 
 
 void GEOM_EdgeSource::AddEdge (const TopoDS_Edge& theEdge,
                                bool theIsVector)
 {
-  myData->myEdgeSet.Add(theEdge);
+  myEdgeSet.Add(theEdge);
   myIsVector = theIsVector;
 }
 
-void GEOM_EdgeSource::Clear()
-{
-  myData->myEdgeSet.Clear();
-}
-
-bool GEOM_EdgeSource::IsEmpty()
-{
-  return myData->myEdgeSet.IsEmpty();
-}
-
 int GEOM_EdgeSource::RequestData(vtkInformation *vtkNotUsed(request),
                                  vtkInformationVector **vtkNotUsed(inputVector),
                                  vtkInformationVector *outputVector)
@@ -82,7 +69,7 @@ int GEOM_EdgeSource::RequestData(vtkInformation *vtkNotUsed(request),
   aPolyData->SetPoints(aPts);
   aPts->Delete();
 
-  TEdgeSet::Iterator anIter (myData->myEdgeSet);
+  TEdgeSet::Iterator anIter (myEdgeSet);
   for (; anIter.More(); anIter.Next()) {
     TopoDS_Edge anEdge = anIter.Value();
     if ( !myIsVector )
@@ -139,11 +126,11 @@ void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,
         pt2.Transform(edgeTransf);
       }
 
-      float aCoord1[3] = {pt1.X(), pt1.Y(), pt1.Z()};
+      float aCoord1[3] = {(float)pt1.X(), (float)pt1.Y(), (float)pt1.Z()};
       vtkIdType anIds[2];
       anIds[0] = thePts->InsertNextPoint(aCoord1);
 
-      float aCoord2[3] = {pt2.X(), pt2.Y(), pt2.Z()};
+      float aCoord2[3] = {(float)pt2.X(), (float)pt2.Y(), (float)pt2.Z()};
       anIds[1] = thePts->InsertNextPoint(aCoord2);
 
       thePolyData->InsertNextCell(VTK_LINE,2,anIds);
@@ -169,11 +156,11 @@ void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,
         pt2.Transform(edgeTransf);
       }
       
-      float aCoord1[3] = {pt1.X(), pt1.Y(), pt1.Z()};
+      float aCoord1[3] = {(float)pt1.X(), (float)pt1.Y(), (float)pt1.Z()};
       vtkIdType anIds[2];
       anIds[0] = thePts->InsertNextPoint(aCoord1);
 
-      float aCoord2[3] = {pt2.X(), pt2.Y(), pt2.Z()};
+      float aCoord2[3] = {(float)pt2.X(), (float)pt2.Y(), (float)pt2.Z()};
       anIds[1] = thePts->InsertNextPoint(aCoord2);
 
       thePolyData->InsertNextCell(VTK_LINE,2,anIds);
@@ -239,7 +226,7 @@ void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,
     // Add points and segments, composing the arrow
     Standard_Real cosinus, sinus, Tg = tan(anAngle);
 
-    float coord[3] = {xo, yo, zo};
+    float coord[3] = {(float)xo, (float)yo, (float)zo};
 
     vtkIdType ptLoc = thePts->InsertNextPoint(coord);
     vtkIdType ptFirst = 0;