ef358034b8c4db0b72d13e5babf83cf40698c5df
[occt.git] / src / DBRep / DBRep.hxx
1 // Created on: 1991-06-25
2 // Created by: Christophe MARION
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _DBRep_HeaderFile
18 #define _DBRep_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_CString.hxx>
25 #include <TopAbs_ShapeEnum.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Draw_Interpretor.hxx>
28 #include <Standard_Real.hxx>
29 #include <Standard_Integer.hxx>
30 class TopoDS_Shape;
31 class DBRep_Edge;
32 class DBRep_Face;
33 class DBRep_HideData;
34 class DBRep_DrawableShape;
35 class DBRep_IsoBuilder;
36
37
38 //! Used to display BRep objects  using the DrawTrSurf
39 //! package.
40 //! The DrawableShape is a Display object build from a
41 //! Shape.
42 //! Provides methods to manage a directory of named shapes.
43 //! Provides a set of Draw commands for Shapes.
44 class DBRep 
45 {
46 public:
47
48   DEFINE_STANDARD_ALLOC
49
50   
51   //! Creation of isoparametric curves.
52   //! Implements ProgressIndicator for DRAW
53   //! Sets  <S> in the  variable  <Name>.  Overwrite the
54   //! variable if already set.
55   Standard_EXPORT static void Set (const Standard_CString Name, const TopoDS_Shape& S);
56   
57   //! Returns the shape in the variable  <Name>. Returns
58   //! a null shape if the variable is not set or  not of
59   //! the given <Typ>.  If <Complain> is  True a message
60   //! is printed on cout if the variable is not set.
61   Standard_EXPORT static TopoDS_Shape Get (Standard_CString& Name, const TopAbs_ShapeEnum Typ = TopAbs_SHAPE, const Standard_Boolean Complain = Standard_False);
62   
63   //! Defines the basic commands.
64   Standard_EXPORT static void BasicCommands (Draw_Interpretor& theCommands);
65   
66   //! True if HLR, False if wireframe.
67   Standard_EXPORT static Standard_Boolean HLRMode();
68   
69   //! True if display Rg1Lines.
70   Standard_EXPORT static Standard_Boolean Rg1Mode();
71   
72   //! True if display RgNLines.
73   Standard_EXPORT static Standard_Boolean RgNMode();
74   
75   //! True if display HiddenLines.
76   Standard_EXPORT static Standard_Boolean HidMode();
77   
78   //! discretisation angle for edges.
79   Standard_EXPORT static Standard_Real HLRAngle();
80   
81   //! number of iso in U and V
82   Standard_EXPORT static Standard_Integer NbIsos();
83   
84   //! discretisation number of points for curves
85   //! set progress indicator
86   //! get progress indicator
87   Standard_EXPORT static Standard_Integer Discretisation();
88
89
90
91
92 protected:
93
94
95
96
97
98 private:
99
100
101
102
103 friend class DBRep_Edge;
104 friend class DBRep_Face;
105 friend class DBRep_HideData;
106 friend class DBRep_DrawableShape;
107 friend class DBRep_IsoBuilder;
108
109 };
110
111
112
113
114
115
116
117 #endif // _DBRep_HeaderFile