Salome HOME
Merge branch V7_3_1_BR
[modules/geom.git] / src / OCC2VTK / GEOM_WireframeFace.h
1 // Copyright (C) 2007-2014  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, or (at your option) any later version.
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 class GEOMUtils_Hatcher;
31
32 class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource 
33
34 public: 
35   vtkTypeMacro(GEOM_WireframeFace,GEOM_FaceSource); 
36   static GEOM_WireframeFace* New(); 
37  
38   /*  vtkSetMacro(NbIso,int); 
39       vtkGetMacro(NbIso,int);*/
40  
41   vtkSetMacro(Discret,int); 
42   vtkGetMacro(Discret,int); 
43  
44   static  
45   void OCC2VTK(const TopoDS_Face& theFace,  
46                vtkPolyData* thePolyData, 
47                vtkPoints* thePts, 
48                const int theNbIso[2], 
49                const int theDiscret = 15);
50
51   //! IsoLines management
52   // theNb[0] - number of U lines
53   // theNb[1] - number of V lines
54   virtual void SetNbIso(const int theNb[2]);
55   virtual void GetNbIso(int &theNbU,int &theNbV);
56
57 protected: 
58   int NbIso[2], Discret; 
59  
60   static  
61   void 
62   CreateIso(const TopoDS_Face& theFace,
63             const int theNbIso[2], 
64             const int theDiscret, 
65             vtkPolyData* thePolyData,
66             vtkPoints* thePts);
67
68   static
69   void
70   CreateIso(const GEOMUtils_Hatcher &theHatcher,
71             const Standard_Boolean   IsUIso,
72             const int                theDiscret,
73                   vtkPolyData       *thePolyData,
74                   vtkPoints         *thePts);
75
76   static  
77   void 
78   CreateIso_(const TopoDS_Face& theFace,
79              GeomAbs_IsoType theIsoType, 
80              Standard_Real Par, 
81              Standard_Real T1,
82              Standard_Real T2,
83              const int theDiscret, 
84              vtkPolyData* thePolyData,
85              vtkPoints* thePts);
86  
87   static  
88   void 
89   CreateIso__(const BRepAdaptor_Surface& theSurface, 
90               GeomAbs_IsoType theIsoType,
91                                     Standard_Real& theU, 
92                                     Standard_Real& theV, 
93                                       Standard_Real theStep, 
94               vtkPolyData* thePolyData,
95               vtkPoints* thePts);
96
97   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
98  
99   GEOM_WireframeFace(); 
100   ~GEOM_WireframeFace(); 
101  
102 private: 
103   // Not implememnted 
104   GEOM_WireframeFace(const GEOM_WireframeFace&); 
105   void operator=(const GEOM_WireframeFace&); 
106 }; 
107  
108  
109 #endif //GEOM_WFACEACTOR_H