0024337: Draw Harness - relax vinit syntax
[occt.git] / src / PBRep / PBRep_TEdge1.cxx
CommitLineData
b311480e 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
7fd59977 21
22
23#include <PBRep_TEdge1.ixx>
24
25// Enum terms are better than statics who must be intialized.
26enum {
27 PBRep_ParameterMask = 1,
28 PBRep_RangeMask = 2,
29 PBRep_DegeneratedMask = 4
30};
31
32//=======================================================================
33//function : PBRep_TEdge1
34//purpose :
35//=======================================================================
36
37PBRep_TEdge1::PBRep_TEdge1()
38{
39}
40
41//=======================================================================
42//function : Tolerance
43//purpose :
44//=======================================================================
45
46Standard_Real PBRep_TEdge1::Tolerance()const
47{
48 return myTolerance;
49}
50
51
52//=======================================================================
53//function : Tolerance
54//purpose :
55//=======================================================================
56
57void PBRep_TEdge1::Tolerance(const Standard_Real T)
58{
59 myTolerance = T;
60}
61
62
63//=======================================================================
64//function : SameParameter
65//purpose :
66//=======================================================================
67
68Standard_Boolean PBRep_TEdge1::SameParameter()const
69{
70 return myFlags & PBRep_ParameterMask;
71}
72
73
74//=======================================================================
75//function : SameParameter
76//purpose :
77//=======================================================================
78
79void PBRep_TEdge1::SameParameter(const Standard_Boolean S)
80{
81 if (S) myFlags |= PBRep_ParameterMask;
82 else myFlags &= ~PBRep_ParameterMask;
83}
84
85
86//=======================================================================
87//function : SameRange
88//purpose :
89//=======================================================================
90
91 Standard_Boolean PBRep_TEdge1::SameRange()const
92{
93 return myFlags & PBRep_RangeMask;
94}
95
96
97//=======================================================================
98//function : SameRange
99//purpose :
100//=======================================================================
101
102 void PBRep_TEdge1::SameRange(const Standard_Boolean S)
103{
104 if (S) myFlags |= PBRep_RangeMask;
105 else myFlags &= ~PBRep_RangeMask;
106}
107
108//=======================================================================
109//function : Degenerated
110//purpose :
111//=======================================================================
112
113Standard_Boolean PBRep_TEdge1::Degenerated()const
114{
115 return myFlags & PBRep_DegeneratedMask;
116}
117
118
119//=======================================================================
120//function : Degenerated
121//purpose :
122//=======================================================================
123
124void PBRep_TEdge1::Degenerated(const Standard_Boolean S)
125{
126 if (S) myFlags |= PBRep_DegeneratedMask;
127 else myFlags &= ~PBRep_DegeneratedMask;
128}
129
130
131//=======================================================================
132//function : Curves
133//purpose :
134//=======================================================================
135
136Handle(PBRep_CurveRepresentation) PBRep_TEdge1::Curves()const
137{
138 return myCurves;
139}
140
141
142//=======================================================================
143//function : Curves
144//purpose :
145//=======================================================================
146
147void PBRep_TEdge1::Curves(const Handle(PBRep_CurveRepresentation)& C)
148{
149 myCurves = C;
150}
151
152