Salome HOME
[bos #39942] EDF 25230 - New problem with XYZtoUV
[modules/geom.git] / src / OCC2VTK / GEOM_WireframeFace.cxx
old mode 100755 (executable)
new mode 100644 (file)
index cf91f71..427c4c3
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, 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_WireframeFace.h"
-#include "OCC2VTK_internal.h"
 
 #include <GEOMUtils_Hatcher.hxx>
  
 #include <vtkInformation.h>
 #include <vtkInformationVector.h>
  
-#include <Adaptor3d_HCurve.hxx>
 #include <BRep_Tool.hxx>
 #include <TColStd_Array1OfReal.hxx>
 
-vtkStandardNewMacro(GEOM_WireframeFace);
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
+#include <Adaptor3d_HCurve.hxx>
+#else
+#include <Adaptor3d_Curve.hxx>
+#endif
+
+vtkStandardNewMacro(GEOM_WireframeFace)
  
 GEOM_WireframeFace::GEOM_WireframeFace(): 
   Discret(15)
@@ -64,7 +70,7 @@ int GEOM_WireframeFace::RequestData(vtkInformation *vtkNotUsed(request),
   aPolyData->SetPoints(aPts);
   aPts->Delete();
 
-  TFaceSet::Iterator anIter(myData->myFaceSet);
+  TFaceSet::Iterator anIter(myFaceSet);
   for(; anIter.More(); anIter.Next()){
     const TopoDS_Face& aFace = anIter.Value();
     OCC2VTK(aFace,aPolyData,aPts,NbIso,Discret);
@@ -110,7 +116,7 @@ CreateIso(const TopoDS_Face& theFace,
           vtkPolyData* thePolyData,
           vtkPoints* thePts)
 {
-  GEOMUtils_Hatcher aHatcher(theFace);
+  GEOMUtils::Hatcher aHatcher(theFace);
 
   aHatcher.Init(theNbIso[0], theNbIso[1]);
   aHatcher.Perform();
@@ -126,11 +132,11 @@ CreateIso(const TopoDS_Face& theFace,
 
 void
 GEOM_WireframeFace::
-CreateIso(const GEOMUtils_Hatcher &theHatcher,
+CreateIso(const GEOMUtils::Hatcher &theHatcher,
           const Standard_Boolean   IsUIso,
           const int                theDiscret,
-          vtkPolyData       *thePolyData,
-          vtkPoints         *thePts)
+          vtkPolyData              *thePolyData,
+          vtkPoints                *thePts)
 {
   Handle(TColStd_HArray1OfInteger) anIndices;
   Handle(TColStd_HArray1OfReal)    aParams;
@@ -310,12 +316,14 @@ CreateIso_(const TopoDS_Face& theFace,
                 case GeomAbs_BSplineCurve :
                 case GeomAbs_OtherCurve :
                   for(j = 1; j <= theDiscret/2; j++){
-              Standard_Real aStep = (theIsoType == GeomAbs_IsoV) ? stepU*2. : stepV*2.;
-                  CreateIso__(S, theIsoType, U1, V1, aStep, thePolyData, thePts);
+                    Standard_Real aStep = (theIsoType == GeomAbs_IsoV) ? stepU*2. : stepV*2.;
+                    CreateIso__(S, theIsoType, U1, V1, aStep, thePolyData, thePts);
                     U1 += stepU*2.;
                     V1 += stepV*2.;
                   }
                   break;
+                default:
+                  break;
                 }
               }
       }