Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/geom.git] / src / OCC2VTK / GEOM_WireframeFace.h
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef GEOM_WIREFRAME_FACE_H 
21 #define GEOM_WIREFRAME_FACE_H 
22  
23 #include "OCC2VTK.h" 
24 #include "GEOM_FaceSource.h" 
25
26 #include <GeomAbs_IsoType.hxx>
27 #include <BRepAdaptor_Surface.hxx>
28  
29 class vtkPolyData;
30
31 class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource 
32
33 public: 
34   vtkTypeMacro(GEOM_WireframeFace,GEOM_FaceSource); 
35   static GEOM_WireframeFace* New(); 
36  
37   /*  vtkSetMacro(NbIso,int); 
38       vtkGetMacro(NbIso,int);*/
39  
40   vtkSetMacro(Discret,int); 
41   vtkGetMacro(Discret,int); 
42  
43   static  
44   void OCC2VTK(const TopoDS_Face& theFace,  
45                vtkPolyData* thePolyData, 
46                vtkPoints* thePts, 
47                const int theNbIso[2], 
48                const int theDiscret = 15);
49
50   //! IsoLines management
51   // theNb[0] - number of U lines
52   // theNb[1] - number of V lines
53   virtual void SetNbIso(const int theNb[2]);
54   virtual void GetNbIso(int &theNbU,int &theNbV);
55
56 protected: 
57   int NbIso[2], Discret; 
58  
59   static  
60   void 
61   CreateIso(const TopoDS_Face& theFace,
62             const int theNbIso[2], 
63             const int theDiscret, 
64             vtkPolyData* thePolyData,
65             vtkPoints* thePts);
66  
67   static  
68   void 
69   CreateIso_(const TopoDS_Face& theFace,
70              GeomAbs_IsoType theIsoType, 
71              Standard_Real Par, 
72              Standard_Real T1,
73              Standard_Real T2,
74              const int theDiscret, 
75              vtkPolyData* thePolyData,
76              vtkPoints* thePts);
77  
78   static  
79   void 
80   CreateIso__(const BRepAdaptor_Surface& theSurface, 
81               GeomAbs_IsoType theIsoType,
82                                     Standard_Real& theU, 
83                                     Standard_Real& theV, 
84                                       Standard_Real theStep, 
85               vtkPolyData* thePolyData,
86               vtkPoints* thePts);
87
88   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
89  
90   GEOM_WireframeFace(); 
91   ~GEOM_WireframeFace(); 
92  
93 private: 
94   // Not implememnted 
95   GEOM_WireframeFace(const GEOM_WireframeFace&); 
96   void operator=(const GEOM_WireframeFace&); 
97 }; 
98  
99  
100 #endif //GEOM_WFACEACTOR_H