Back to index

salome-geom  6.5.0
GEOM_WireframeFace.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef GEOM_WIREFRAME_FACE_H 
00021 #define GEOM_WIREFRAME_FACE_H 
00022  
00023 #include "OCC2VTK.h" 
00024 #include "GEOM_FaceSource.h" 
00025 
00026 #include <GeomAbs_IsoType.hxx>
00027 #include <BRepAdaptor_Surface.hxx>
00028  
00029 #include <vtkPolyDataSource.h> 
00030 
00031 class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource 
00032 { 
00033 public: 
00034   vtkTypeMacro(GEOM_WireframeFace,GEOM_FaceSource); 
00035   static GEOM_WireframeFace* New(); 
00036  
00037   /*  vtkSetMacro(NbIso,int); 
00038       vtkGetMacro(NbIso,int);*/
00039  
00040   vtkSetMacro(Discret,int); 
00041   vtkGetMacro(Discret,int); 
00042  
00043   static  
00044   void OCC2VTK(const TopoDS_Face& theFace,  
00045                vtkPolyData* thePolyData, 
00046                vtkPoints* thePts, 
00047                const int theNbIso[2], 
00048                const int theDiscret = 15);
00049 
00051   // theNb[0] - number of U lines
00052   // theNb[1] - number of V lines
00053   virtual void SetNbIso(const int theNb[2]);
00054   virtual void GetNbIso(int &theNbU,int &theNbV);
00055 
00056 protected: 
00057   int NbIso[2], Discret; 
00058  
00059   static  
00060   void 
00061   CreateIso(const TopoDS_Face& theFace,
00062             const int theNbIso[2], 
00063             const int theDiscret, 
00064             vtkPolyData* thePolyData,
00065             vtkPoints* thePts);
00066  
00067   static  
00068   void 
00069   CreateIso_(const TopoDS_Face& theFace,
00070              GeomAbs_IsoType theIsoType, 
00071              Standard_Real Par, 
00072              Standard_Real T1,
00073              Standard_Real T2,
00074              const int theDiscret, 
00075              vtkPolyData* thePolyData,
00076              vtkPoints* thePts);
00077  
00078   static  
00079   void 
00080   CreateIso__(const BRepAdaptor_Surface& theSurface, 
00081               GeomAbs_IsoType theIsoType,
00082                                     Standard_Real& theU, 
00083                                     Standard_Real& theV, 
00084                                       Standard_Real theStep, 
00085               vtkPolyData* thePolyData,
00086               vtkPoints* thePts);
00087 
00088   void Execute(); 
00089  
00090   GEOM_WireframeFace(); 
00091   ~GEOM_WireframeFace(); 
00092  
00093 private: 
00094   // Not implememnted 
00095   GEOM_WireframeFace(const GEOM_WireframeFace&); 
00096   void operator=(const GEOM_WireframeFace&); 
00097 }; 
00098  
00099  
00100 #endif //GEOM_WFACEACTOR_H