b311480e |
1 | // Created on: 1995-03-21 |
2 | // Created by: Laurent BOURESCHE |
3 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
42cf5bc1 |
17 | |
18 | #include <ChFiDS_Regul.hxx> |
7fd59977 |
19 | |
20 | //======================================================================= |
21 | //function : ChFiDS_Regul |
22 | //purpose : |
23 | //======================================================================= |
7fd59977 |
24 | ChFiDS_Regul::ChFiDS_Regul() |
25 | { |
26 | } |
27 | |
28 | |
29 | //======================================================================= |
30 | //function : SetCurve |
31 | //purpose : |
32 | //======================================================================= |
33 | |
34 | void ChFiDS_Regul::SetCurve(const Standard_Integer IC) |
35 | { |
36 | icurv = Abs(IC); |
37 | } |
38 | |
39 | |
40 | //======================================================================= |
41 | //function : SetS1 |
42 | //purpose : |
43 | //======================================================================= |
44 | |
45 | void ChFiDS_Regul::SetS1(const Standard_Integer IS1, |
46 | const Standard_Boolean IsFace) |
47 | { |
48 | if(IsFace) is1 = Abs(IS1); |
49 | else is1 = -Abs(IS1); |
50 | } |
51 | |
52 | |
53 | //======================================================================= |
54 | //function : SetS2 |
55 | //purpose : |
56 | //======================================================================= |
57 | |
58 | void ChFiDS_Regul::SetS2(const Standard_Integer IS2, |
59 | const Standard_Boolean IsFace) |
60 | { |
61 | if(IsFace) is2 = Abs(IS2); |
62 | else is2 = -Abs(IS2); |
63 | } |
64 | |
65 | |
66 | //======================================================================= |
67 | //function : IsSurface1 |
68 | //purpose : |
69 | //======================================================================= |
70 | |
71 | Standard_Boolean ChFiDS_Regul::IsSurface1() const |
72 | { |
73 | return (is1<0); |
74 | } |
75 | |
76 | |
77 | //======================================================================= |
78 | //function : IsSurface2 |
79 | //purpose : |
80 | //======================================================================= |
81 | |
82 | Standard_Boolean ChFiDS_Regul::IsSurface2() const |
83 | { |
84 | return (is2<0); |
85 | } |
86 | |
87 | |
88 | //======================================================================= |
89 | //function : Curve |
90 | //purpose : |
91 | //======================================================================= |
92 | |
93 | Standard_Integer ChFiDS_Regul::Curve() const |
94 | { |
95 | return icurv; |
96 | } |
97 | |
98 | |
99 | //======================================================================= |
100 | //function : S1 |
101 | //purpose : |
102 | //======================================================================= |
103 | |
104 | Standard_Integer ChFiDS_Regul::S1() const |
105 | { |
106 | return Abs(is1); |
107 | } |
108 | |
109 | |
110 | //======================================================================= |
111 | //function : S2 |
112 | //purpose : |
113 | //======================================================================= |
114 | |
115 | Standard_Integer ChFiDS_Regul::S2() const |
116 | { |
117 | return Abs(is2); |
118 | } |
119 | |
120 | |