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_RationalBSplineSurface.hxx> |
42cf5bc1 |
17 | #include <StepGeom_UniformSurface.hxx> |
18 | #include <StepGeom_UniformSurfaceAndRationalBSplineSurface.hxx> |
19 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
20 | |
92efcf78 |
21 | IMPLEMENT_STANDARD_RTTIEXT(StepGeom_UniformSurfaceAndRationalBSplineSurface,StepGeom_BSplineSurface) |
22 | |
7fd59977 |
23 | StepGeom_UniformSurfaceAndRationalBSplineSurface::StepGeom_UniformSurfaceAndRationalBSplineSurface () {} |
24 | |
7fd59977 |
25 | void StepGeom_UniformSurfaceAndRationalBSplineSurface::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_UniformSurface)& aUniformSurface, |
35 | const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface) |
36 | { |
37 | // --- classe own fields --- |
38 | uniformSurface = aUniformSurface; |
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_UniformSurfaceAndRationalBSplineSurface::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_HArray2OfReal)& aWeightsData) |
55 | { |
56 | // --- classe inherited fields --- |
57 | |
58 | StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
59 | |
60 | // --- ANDOR componant fields --- |
61 | |
62 | rationalBSplineSurface = new StepGeom_RationalBSplineSurface(); |
63 | rationalBSplineSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aWeightsData); |
64 | |
65 | // --- ANDOR componant fields --- |
66 | |
67 | uniformSurface = new StepGeom_UniformSurface(); |
68 | uniformSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
69 | } |
70 | |
71 | |
72 | void StepGeom_UniformSurfaceAndRationalBSplineSurface::SetUniformSurface(const Handle(StepGeom_UniformSurface)& aUniformSurface) |
73 | { |
74 | uniformSurface = aUniformSurface; |
75 | } |
76 | |
77 | Handle(StepGeom_UniformSurface) StepGeom_UniformSurfaceAndRationalBSplineSurface::UniformSurface() const |
78 | { |
79 | return uniformSurface; |
80 | } |
81 | |
82 | void StepGeom_UniformSurfaceAndRationalBSplineSurface::SetRationalBSplineSurface(const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface) |
83 | { |
84 | rationalBSplineSurface = aRationalBSplineSurface; |
85 | } |
86 | |
87 | Handle(StepGeom_RationalBSplineSurface) StepGeom_UniformSurfaceAndRationalBSplineSurface::RationalBSplineSurface() const |
88 | { |
89 | return rationalBSplineSurface; |
90 | } |
91 | |
92 | //--- Specific Methods for AND classe field access --- |
93 | |
94 | |
95 | void StepGeom_UniformSurfaceAndRationalBSplineSurface::SetWeightsData(const Handle(TColStd_HArray2OfReal)& aWeightsData) |
96 | { |
97 | rationalBSplineSurface->SetWeightsData(aWeightsData); |
98 | } |
99 | |
100 | Handle(TColStd_HArray2OfReal) StepGeom_UniformSurfaceAndRationalBSplineSurface::WeightsData() const |
101 | { |
102 | return rationalBSplineSurface->WeightsData(); |
103 | } |
104 | |
105 | Standard_Real StepGeom_UniformSurfaceAndRationalBSplineSurface::WeightsDataValue(const Standard_Integer num1,const Standard_Integer num2) const |
106 | { |
107 | return rationalBSplineSurface->WeightsDataValue(num1,num2); |
108 | } |
109 | |
110 | Standard_Integer StepGeom_UniformSurfaceAndRationalBSplineSurface::NbWeightsDataI () const |
111 | { |
112 | return rationalBSplineSurface->NbWeightsDataI (); |
113 | } |
114 | |
115 | Standard_Integer StepGeom_UniformSurfaceAndRationalBSplineSurface::NbWeightsDataJ () const |
116 | { |
117 | return rationalBSplineSurface->NbWeightsDataJ (); |
118 | } |
119 | |
120 | //--- Specific Methods for AND classe field access --- |
121 | |