1 // GEOM OBJECT : interactive object for Geometry entities visualization
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : GEOM_OCCReader.h
25 // Author : Christophe ATTANASIO
30 \class GEOM_OCCReader GEOM_OCCReader.h
31 \brief This class allow to display a OpenCASCADE CAD model in a VTK viewer.
34 #ifndef GEOM_OCCREADER_H
35 #define GEOM_OCCREADER_H
37 #include <vtkPolyDataSource.h>
43 #include <TopoDS_Shape.hxx>
45 #include <Poly_Polygon3D.hxx>
46 #include <Poly_PolygonOnTriangulation.hxx>
47 #include <GeomAbs_IsoType.hxx>
48 #include <BRepAdaptor_Surface.hxx>
51 #define VTKOCC_EXPORT __declspec (dllexport)
56 class VTKOCC_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
62 static GEOM_OCCReader* New();
64 const TopoDS_Shape& getTopo();
66 void setTopo(const TopoDS_Shape& ashape);
69 void setDisplayMode(int);
71 void setForceUpdate(Standard_Boolean bol);
79 void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells);
80 void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells);
82 void TransferFaceSData(const TopoDS_Face& aFace,
86 void TransferFaceWData(const TopoDS_Face& aFace,
90 void TransferEdgeSData(const TopoDS_Edge& aEdge,
94 void TransferEdgeWData(const TopoDS_Edge& aEdge,
98 void TransferVertexWData(const TopoDS_Vertex& aVertex,
100 vtkCellArray* Cells);
102 void createISO(const TopoDS_Face &,
105 vtkCellArray* Cells);
107 void DrawIso(GeomAbs_IsoType aType,
113 Standard_Integer& startidx);
115 void MoveTo(gp_Pnt P,
118 void DrawTo(gp_Pnt P,
120 vtkCellArray* Cells);
122 void PlotIso(BRepAdaptor_Surface& S,
127 Standard_Boolean& halt,
129 vtkCellArray* Cells);
135 Standard_Boolean forced;
139 TopoDS_Shape myShape;
143 #endif //GEOM_OCCREADER_H