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