65be265785ba4342521dd8f1b7c9a5d175a3282f
[occt.git] / src / BRep / BRep_TEdge.hxx
1 // Created on: 1992-05-27
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1992-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 _BRep_TEdge_HeaderFile
18 #define _BRep_TEdge_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Real.hxx>
24 #include <Standard_Integer.hxx>
25 #include <BRep_ListOfCurveRepresentation.hxx>
26 #include <TopoDS_TEdge.hxx>
27 #include <Standard_Boolean.hxx>
28 class TopoDS_TShape;
29
30
31 class BRep_TEdge;
32 DEFINE_STANDARD_HANDLE(BRep_TEdge, TopoDS_TEdge)
33
34 //! The TEdge from BRep is  inherited from  the  TEdge
35 //! from TopoDS. It contains the geometric data.
36 //!
37 //! The TEdge contains :
38 //!
39 //! * A tolerance.
40 //!
41 //! * A same parameter flag.
42 //!
43 //! * A same range flag.
44 //!
45 //! * A Degenerated flag.
46 //!
47 //! *  A  list   of curve representation.
48 class BRep_TEdge : public TopoDS_TEdge
49 {
50
51 public:
52
53   
54   //! Creates an empty TEdge.
55   Standard_EXPORT BRep_TEdge();
56   
57     Standard_Real Tolerance() const;
58   
59     void Tolerance (const Standard_Real T);
60   
61   //! Sets the tolerance  to the   max  of <T>  and  the
62   //! current  tolerance.
63     void UpdateTolerance (const Standard_Real T);
64   
65   Standard_EXPORT Standard_Boolean SameParameter() const;
66   
67   Standard_EXPORT void SameParameter (const Standard_Boolean S);
68   
69   Standard_EXPORT Standard_Boolean SameRange() const;
70   
71   Standard_EXPORT void SameRange (const Standard_Boolean S);
72   
73   Standard_EXPORT Standard_Boolean Degenerated() const;
74   
75   Standard_EXPORT void Degenerated (const Standard_Boolean S);
76   
77     const BRep_ListOfCurveRepresentation& Curves() const;
78   
79     BRep_ListOfCurveRepresentation& ChangeCurves();
80   
81   //! Returns a copy  of the  TShape  with no sub-shapes.
82   Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
83
84   //! Dumps the content of me into the stream
85   Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
86
87
88
89
90   DEFINE_STANDARD_RTTIEXT(BRep_TEdge,TopoDS_TEdge)
91
92 protected:
93
94
95
96
97 private:
98
99
100   Standard_Real myTolerance;
101   Standard_Integer myFlags;
102   BRep_ListOfCurveRepresentation myCurves;
103
104
105 };
106
107
108 #include <BRep_TEdge.lxx>
109
110
111
112
113
114 #endif // _BRep_TEdge_HeaderFile