bca03a03101c956993bf1e486066eb2f47e4a4f1
[occt.git] / src / PBRep / PBRep_TEdge.cxx
1 // Created on: 1993-07-26
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22
23 #include <PBRep_TEdge.ixx>
24
25 static const Standard_Integer ParameterMask       = 1;
26 static const Standard_Integer RangeMask           = 2;
27 static const Standard_Integer DegeneratedMask     = 4;
28
29 //=======================================================================
30 //function : PBRep_TEdge
31 //purpose  : 
32 //=======================================================================
33
34 PBRep_TEdge::PBRep_TEdge() 
35 {
36 }
37
38 //=======================================================================
39 //function : Tolerance
40 //purpose  : 
41 //=======================================================================
42
43 Standard_Real  PBRep_TEdge::Tolerance()const 
44 {
45   return myTolerance;
46 }
47
48
49 //=======================================================================
50 //function : Tolerance
51 //purpose  : 
52 //=======================================================================
53
54 void  PBRep_TEdge::Tolerance(const Standard_Real T)
55 {
56   myTolerance = T;
57 }
58
59
60 //=======================================================================
61 //function : SameParameter
62 //purpose  : 
63 //=======================================================================
64
65 Standard_Boolean  PBRep_TEdge::SameParameter()const 
66 {
67   return myFlags & ParameterMask;
68 }
69
70
71 //=======================================================================
72 //function : SameParameter
73 //purpose  : 
74 //=======================================================================
75
76 void  PBRep_TEdge::SameParameter(const Standard_Boolean S)
77 {
78   if (S) myFlags |= ParameterMask;
79   else   myFlags &= ~ParameterMask;
80 }
81
82
83 //=======================================================================
84 //function : SameRange
85 //purpose  : 
86 //=======================================================================
87
88  Standard_Boolean  PBRep_TEdge::SameRange()const 
89 {
90   return myFlags & RangeMask;
91 }
92
93
94 //=======================================================================
95 //function : SameRange
96 //purpose  : 
97 //=======================================================================
98
99  void  PBRep_TEdge::SameRange(const Standard_Boolean S)
100 {
101   if (S) myFlags |= RangeMask;
102   else   myFlags &= ~RangeMask;
103 }
104
105 //=======================================================================
106 //function : Degenerated
107 //purpose  : 
108 //=======================================================================
109
110 Standard_Boolean  PBRep_TEdge::Degenerated()const 
111 {
112   return myFlags & DegeneratedMask;
113 }
114
115
116 //=======================================================================
117 //function : Degenerated
118 //purpose  : 
119 //=======================================================================
120
121 void  PBRep_TEdge::Degenerated(const Standard_Boolean S)
122 {
123   if (S) myFlags |= DegeneratedMask; 
124   else   myFlags &= ~DegeneratedMask;
125 }
126
127
128 //=======================================================================
129 //function : Curves
130 //purpose  : 
131 //=======================================================================
132
133 Handle(PBRep_CurveRepresentation)  PBRep_TEdge::Curves()const 
134 {
135   return myCurves;
136 }
137
138
139 //=======================================================================
140 //function : Curves
141 //purpose  : 
142 //=======================================================================
143
144 void  PBRep_TEdge::Curves(const Handle(PBRep_CurveRepresentation)& C)
145 {
146   myCurves = C;
147 }
148
149