973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <Standard_Type.hxx> |
7fd59977 |
16 | #include <StepGeom_BSplineSurfaceWithKnots.hxx> |
42cf5bc1 |
17 | #include <StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface.hxx> |
7fd59977 |
18 | #include <StepGeom_RationalBSplineSurface.hxx> |
42cf5bc1 |
19 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
20 | |
92efcf78 |
21 | IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface,StepGeom_BSplineSurface) |
22 | |
7fd59977 |
23 | StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface () {} |
24 | |
7fd59977 |
25 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::Init( |
26 | const Handle(TCollection_HAsciiString)& aName, |
27 | const Standard_Integer aUDegree, |
28 | const Standard_Integer aVDegree, |
29 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
30 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
31 | const StepData_Logical aUClosed, |
32 | const StepData_Logical aVClosed, |
33 | const StepData_Logical aSelfIntersect, |
34 | const Handle(StepGeom_BSplineSurfaceWithKnots)& aBSplineSurfaceWithKnots, |
35 | const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface) |
36 | { |
37 | // --- classe own fields --- |
38 | bSplineSurfaceWithKnots = aBSplineSurfaceWithKnots; |
39 | rationalBSplineSurface = aRationalBSplineSurface; |
40 | // --- classe inherited fields --- |
41 | StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
42 | } |
43 | |
44 | |
45 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::Init( |
46 | const Handle(TCollection_HAsciiString)& aName, |
47 | const Standard_Integer aUDegree, |
48 | const Standard_Integer aVDegree, |
49 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
50 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
51 | const StepData_Logical aUClosed, |
52 | const StepData_Logical aVClosed, |
53 | const StepData_Logical aSelfIntersect, |
54 | const Handle(TColStd_HArray1OfInteger)& aUMultiplicities, |
55 | const Handle(TColStd_HArray1OfInteger)& aVMultiplicities, |
56 | const Handle(TColStd_HArray1OfReal)& aUKnots, |
57 | const Handle(TColStd_HArray1OfReal)& aVKnots, |
58 | const StepGeom_KnotType aKnotSpec, |
59 | const Handle(TColStd_HArray2OfReal)& aWeightsData) |
60 | { |
61 | // --- classe inherited fields --- |
62 | |
63 | StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
64 | |
65 | // --- ANDOR componant fields --- |
66 | |
67 | bSplineSurfaceWithKnots = new StepGeom_BSplineSurfaceWithKnots(); |
68 | bSplineSurfaceWithKnots->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aUMultiplicities, aVMultiplicities, aUKnots, aVKnots, aKnotSpec); |
69 | |
70 | // --- ANDOR componant fields --- |
71 | |
72 | rationalBSplineSurface = new StepGeom_RationalBSplineSurface(); |
73 | rationalBSplineSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aWeightsData); |
74 | } |
75 | |
76 | |
77 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetBSplineSurfaceWithKnots(const Handle(StepGeom_BSplineSurfaceWithKnots)& aBSplineSurfaceWithKnots) |
78 | { |
79 | bSplineSurfaceWithKnots = aBSplineSurfaceWithKnots; |
80 | } |
81 | |
82 | Handle(StepGeom_BSplineSurfaceWithKnots) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::BSplineSurfaceWithKnots() const |
83 | { |
84 | return bSplineSurfaceWithKnots; |
85 | } |
86 | |
87 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetRationalBSplineSurface(const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface) |
88 | { |
89 | rationalBSplineSurface = aRationalBSplineSurface; |
90 | } |
91 | |
92 | Handle(StepGeom_RationalBSplineSurface) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::RationalBSplineSurface() const |
93 | { |
94 | return rationalBSplineSurface; |
95 | } |
96 | |
97 | //--- Specific Methods for AND classe field access --- |
98 | |
99 | |
100 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetUMultiplicities(const Handle(TColStd_HArray1OfInteger)& aUMultiplicities) |
101 | { |
102 | bSplineSurfaceWithKnots->SetUMultiplicities(aUMultiplicities); |
103 | } |
104 | |
105 | Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::UMultiplicities() const |
106 | { |
107 | return bSplineSurfaceWithKnots->UMultiplicities(); |
108 | } |
109 | |
110 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::UMultiplicitiesValue(const Standard_Integer num) const |
111 | { |
112 | return bSplineSurfaceWithKnots->UMultiplicitiesValue(num); |
113 | } |
114 | |
115 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::NbUMultiplicities () const |
116 | { |
117 | return bSplineSurfaceWithKnots->NbUMultiplicities(); |
118 | } |
119 | |
120 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetVMultiplicities(const Handle(TColStd_HArray1OfInteger)& aVMultiplicities) |
121 | { |
122 | bSplineSurfaceWithKnots->SetVMultiplicities(aVMultiplicities); |
123 | } |
124 | |
125 | Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::VMultiplicities() const |
126 | { |
127 | return bSplineSurfaceWithKnots->VMultiplicities(); |
128 | } |
129 | |
130 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::VMultiplicitiesValue(const Standard_Integer num) const |
131 | { |
132 | return bSplineSurfaceWithKnots->VMultiplicitiesValue(num); |
133 | } |
134 | |
135 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::NbVMultiplicities () const |
136 | { |
137 | return bSplineSurfaceWithKnots->NbVMultiplicities(); |
138 | } |
139 | |
140 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetUKnots(const Handle(TColStd_HArray1OfReal)& aUKnots) |
141 | { |
142 | bSplineSurfaceWithKnots->SetUKnots(aUKnots); |
143 | } |
144 | |
145 | Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::UKnots() const |
146 | { |
147 | return bSplineSurfaceWithKnots->UKnots(); |
148 | } |
149 | |
150 | Standard_Real StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::UKnotsValue(const Standard_Integer num) const |
151 | { |
152 | return bSplineSurfaceWithKnots->UKnotsValue(num); |
153 | } |
154 | |
155 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::NbUKnots () const |
156 | { |
157 | return bSplineSurfaceWithKnots->NbUKnots(); |
158 | } |
159 | |
160 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetVKnots(const Handle(TColStd_HArray1OfReal)& aVKnots) |
161 | { |
162 | bSplineSurfaceWithKnots->SetVKnots(aVKnots); |
163 | } |
164 | |
165 | Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::VKnots() const |
166 | { |
167 | return bSplineSurfaceWithKnots->VKnots(); |
168 | } |
169 | |
170 | Standard_Real StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::VKnotsValue(const Standard_Integer num) const |
171 | { |
172 | return bSplineSurfaceWithKnots->VKnotsValue(num); |
173 | } |
174 | |
175 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::NbVKnots () const |
176 | { |
177 | return bSplineSurfaceWithKnots->NbVKnots(); |
178 | } |
179 | |
180 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetKnotSpec(const StepGeom_KnotType aKnotSpec) |
181 | { |
182 | bSplineSurfaceWithKnots->SetKnotSpec(aKnotSpec); |
183 | } |
184 | |
185 | StepGeom_KnotType StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::KnotSpec() const |
186 | { |
187 | return bSplineSurfaceWithKnots->KnotSpec(); |
188 | } |
189 | |
190 | //--- Specific Methods for AND classe field access --- |
191 | |
192 | |
193 | void StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::SetWeightsData(const Handle(TColStd_HArray2OfReal)& aWeightsData) |
194 | { |
195 | rationalBSplineSurface->SetWeightsData(aWeightsData); |
196 | } |
197 | |
198 | Handle(TColStd_HArray2OfReal) StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::WeightsData() const |
199 | { |
200 | return rationalBSplineSurface->WeightsData(); |
201 | } |
202 | |
203 | Standard_Real StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::WeightsDataValue(const Standard_Integer num1,const Standard_Integer num2) const |
204 | { |
205 | return rationalBSplineSurface->WeightsDataValue(num1,num2); |
206 | } |
207 | |
208 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::NbWeightsDataI () const |
209 | { |
210 | return rationalBSplineSurface->NbWeightsDataI (); |
211 | } |
212 | |
213 | Standard_Integer StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface::NbWeightsDataJ () const |
214 | { |
215 | return rationalBSplineSurface->NbWeightsDataJ (); |
216 | } |