Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00034 #ifndef GEOM_OCCREADER_H
00035 #define GEOM_OCCREADER_H
00036
00037 #include "GEOM_OBJECT_defs.hxx"
00038
00039 #include <vtkPolyDataSource.h>
00040
00041 class vtkPoints;
00042 class vtkCellArray;
00043
00044
00045 #include <TopoDS_Shape.hxx>
00046 #include <TopoDS.hxx>
00047 #include <GeomAbs_IsoType.hxx>
00048 #include <BRepAdaptor_Surface.hxx>
00049
00050 class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
00051
00052
00053
00054 public:
00055
00056 static GEOM_OCCReader* New();
00057
00058 const TopoDS_Shape& getTopo();
00059
00060 void setTopo(const TopoDS_Shape& ashape, bool isVector = false);
00061
00062 int getDisplayMode();
00063 void setDisplayMode(int);
00064
00065 void setForceUpdate(Standard_Boolean bol);
00066
00067 protected:
00068
00069 GEOM_OCCReader();
00070 ~GEOM_OCCReader();
00071 void Execute();
00072
00073 void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells);
00074 void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells);
00075
00076 void TransferFaceSData(const TopoDS_Face& aFace,
00077 vtkPoints* Pts,
00078 vtkCellArray* Cells);
00079
00080 void TransferFaceWData(const TopoDS_Face& aFace,
00081 vtkPoints* Pts,
00082 vtkCellArray* Cells);
00083
00084 void TransferEdgeSData(const TopoDS_Edge& aEdge,
00085 vtkPoints* Pts,
00086 vtkCellArray* Cells);
00087
00088 void TransferEdgeWData(const TopoDS_Edge& aEdge,
00089 vtkPoints* Pts,
00090 vtkCellArray* Cells);
00091
00092 void TransferVertexWData(const TopoDS_Vertex& aVertex,
00093 vtkPoints* Pts,
00094 vtkCellArray* Cells);
00095
00096 void createISO(const TopoDS_Face &,
00097 double, int,
00098 vtkPoints* Pts,
00099 vtkCellArray* Cells);
00100
00101 void DrawIso(GeomAbs_IsoType aType,
00102 Standard_Real PParm,
00103 Standard_Real p1,
00104 Standard_Real p2,
00105 vtkPoints* Pts,
00106 vtkCellArray* Cells,
00107 Standard_Integer& startidx);
00108
00109 void MoveTo(gp_Pnt P,
00110 vtkPoints* Pts);
00111
00112 void DrawTo(gp_Pnt P,
00113 vtkPoints* Pts,
00114 vtkCellArray* Cells);
00115
00116 void PlotIso(BRepAdaptor_Surface& S,
00117 GeomAbs_IsoType T,
00118 Standard_Real& U,
00119 Standard_Real& V,
00120 Standard_Real Step,
00121 Standard_Boolean& halt,
00122 vtkPoints* Pts,
00123 vtkCellArray* Cells);
00124
00125
00126
00127 private:
00128
00129 Standard_Boolean forced;
00130 int discretiso;
00131 int amode;
00132 int nbisos;
00133 TopoDS_Shape myShape;
00134 bool myIsVector;
00135
00136 };
00137
00138 #endif //GEOM_OCCREADER_H