1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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, or (at your option) any later version.
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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // GEOM OBJECT : interactive object for Geometry entities visualization
24 // File : GEOM_OCCReader.h
25 // Author : Christophe ATTANASIO
29 \class GEOM_OCCReader GEOM_OCCReader.h
30 \brief This class allow to display a OpenCASCADE CAD model in a VTK viewer.
33 #ifndef GEOM_OCCREADER_H
34 #define GEOM_OCCREADER_H
36 #include "GEOM_OBJECT_defs.hxx"
38 #include <vtkAlgorithm.h>
48 #include <TopoDS_Edge.hxx>
49 #include <TopoDS_Shape.hxx>
50 #include <TopoDS_Vertex.hxx>
51 #include <GeomAbs_IsoType.hxx>
52 #include <BRepAdaptor_Surface.hxx>
54 class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkAlgorithm {
60 static GEOM_OCCReader* New();
62 const TopoDS_Shape& getTopo();
64 void setTopo(const TopoDS_Shape& ashape, bool isVector = false);
67 void setDisplayMode(int);
69 void setForceUpdate(Standard_Boolean bol);
76 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
78 void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells);
79 void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells);
81 void TransferFaceSData(const TopoDS_Face& aFace,
85 void TransferFaceWData(const TopoDS_Face& aFace,
89 void TransferEdgeSData(const TopoDS_Edge& aEdge,
93 void TransferEdgeWData(const TopoDS_Edge& aEdge,
97 void TransferVertexWData(const TopoDS_Vertex& aVertex,
101 void createISO(const TopoDS_Face &,
104 vtkCellArray* Cells);
106 void createIsos(const GEOMUtils::Hatcher &theHatcher,
107 const Standard_Boolean IsUIso,
108 Standard_Integer &pt_start_idx,
112 void DrawIso(GeomAbs_IsoType aType,
118 Standard_Integer& startidx);
120 void MoveTo(gp_Pnt P,
123 void DrawTo(gp_Pnt P,
125 vtkCellArray* Cells);
127 void PlotIso(BRepAdaptor_Surface& S,
132 Standard_Boolean& halt,
134 vtkCellArray* Cells);
140 Standard_Boolean forced;
144 TopoDS_Shape myShape;
149 #endif //GEOM_OCCREADER_H