b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | #include <StepGeom_UniformCurveAndRationalBSplineCurve.ixx> |
19 | |
20 | #include <StepGeom_UniformCurve.hxx> |
21 | |
22 | #include <StepGeom_RationalBSplineCurve.hxx> |
23 | |
24 | |
25 | StepGeom_UniformCurveAndRationalBSplineCurve::StepGeom_UniformCurveAndRationalBSplineCurve () {} |
26 | |
27 | void StepGeom_UniformCurveAndRationalBSplineCurve::Init( |
28 | const Handle(TCollection_HAsciiString)& aName, |
29 | const Standard_Integer aDegree, |
30 | const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList, |
31 | const StepGeom_BSplineCurveForm aCurveForm, |
32 | const StepData_Logical aClosedCurve, |
33 | const StepData_Logical aSelfIntersect) |
34 | { |
35 | |
36 | StepGeom_BSplineCurve::Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect); |
37 | } |
38 | |
39 | void StepGeom_UniformCurveAndRationalBSplineCurve::Init( |
40 | const Handle(TCollection_HAsciiString)& aName, |
41 | const Standard_Integer aDegree, |
42 | const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList, |
43 | const StepGeom_BSplineCurveForm aCurveForm, |
44 | const StepData_Logical aClosedCurve, |
45 | const StepData_Logical aSelfIntersect, |
46 | const Handle(StepGeom_UniformCurve)& aUniformCurve, |
47 | const Handle(StepGeom_RationalBSplineCurve)& aRationalBSplineCurve) |
48 | { |
49 | // --- classe own fields --- |
50 | uniformCurve = aUniformCurve; |
51 | rationalBSplineCurve = aRationalBSplineCurve; |
52 | // --- classe inherited fields --- |
53 | StepGeom_BSplineCurve::Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect); |
54 | } |
55 | |
56 | |
57 | void StepGeom_UniformCurveAndRationalBSplineCurve::Init( |
58 | const Handle(TCollection_HAsciiString)& aName, |
59 | const Standard_Integer aDegree, |
60 | const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList, |
61 | const StepGeom_BSplineCurveForm aCurveForm, |
62 | const StepData_Logical aClosedCurve, |
63 | const StepData_Logical aSelfIntersect, |
64 | const Handle(TColStd_HArray1OfReal)& aWeightsData) |
65 | { |
66 | // --- classe inherited fields --- |
67 | |
68 | StepGeom_BSplineCurve::Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect); |
69 | |
70 | // --- ANDOR componant fields --- |
71 | |
72 | rationalBSplineCurve = new StepGeom_RationalBSplineCurve(); |
73 | rationalBSplineCurve->Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect, aWeightsData); |
74 | |
75 | // --- ANDOR componant fields --- |
76 | |
77 | uniformCurve = new StepGeom_UniformCurve(); |
78 | uniformCurve->Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect); |
79 | } |
80 | |
81 | |
82 | void StepGeom_UniformCurveAndRationalBSplineCurve::SetUniformCurve(const Handle(StepGeom_UniformCurve)& aUniformCurve) |
83 | { |
84 | uniformCurve = aUniformCurve; |
85 | } |
86 | |
87 | Handle(StepGeom_UniformCurve) StepGeom_UniformCurveAndRationalBSplineCurve::UniformCurve() const |
88 | { |
89 | return uniformCurve; |
90 | } |
91 | |
92 | void StepGeom_UniformCurveAndRationalBSplineCurve::SetRationalBSplineCurve(const Handle(StepGeom_RationalBSplineCurve)& aRationalBSplineCurve) |
93 | { |
94 | rationalBSplineCurve = aRationalBSplineCurve; |
95 | } |
96 | |
97 | Handle(StepGeom_RationalBSplineCurve) StepGeom_UniformCurveAndRationalBSplineCurve::RationalBSplineCurve() const |
98 | { |
99 | return rationalBSplineCurve; |
100 | } |
101 | |
102 | //--- Specific Methods for AND classe field access --- |
103 | |
104 | |
105 | void StepGeom_UniformCurveAndRationalBSplineCurve::SetWeightsData(const Handle(TColStd_HArray1OfReal)& aWeightsData) |
106 | { |
107 | rationalBSplineCurve->SetWeightsData(aWeightsData); |
108 | } |
109 | |
110 | Handle(TColStd_HArray1OfReal) StepGeom_UniformCurveAndRationalBSplineCurve::WeightsData() const |
111 | { |
112 | return rationalBSplineCurve->WeightsData(); |
113 | } |
114 | |
115 | Standard_Real StepGeom_UniformCurveAndRationalBSplineCurve::WeightsDataValue(const Standard_Integer num) const |
116 | { |
117 | return rationalBSplineCurve->WeightsDataValue(num); |
118 | } |
119 | |
120 | Standard_Integer StepGeom_UniformCurveAndRationalBSplineCurve::NbWeightsData () const |
121 | { |
122 | return rationalBSplineCurve->NbWeightsData(); |
123 | } |
124 | |
125 | //--- Specific Methods for AND classe field access --- |
126 | |