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 | #include <StepGeom_BezierSurfaceAndRationalBSplineSurface.ixx> |
15 | |
16 | #include <StepGeom_BezierSurface.hxx> |
17 | |
18 | #include <StepGeom_RationalBSplineSurface.hxx> |
19 | |
20 | |
21 | StepGeom_BezierSurfaceAndRationalBSplineSurface::StepGeom_BezierSurfaceAndRationalBSplineSurface () {} |
22 | |
23 | void StepGeom_BezierSurfaceAndRationalBSplineSurface::Init( |
24 | const Handle(TCollection_HAsciiString)& aName, |
25 | const Standard_Integer aUDegree, |
26 | const Standard_Integer aVDegree, |
27 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
28 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
29 | const StepData_Logical aUClosed, |
30 | const StepData_Logical aVClosed, |
31 | const StepData_Logical aSelfIntersect) |
32 | { |
33 | |
34 | StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
35 | } |
36 | |
37 | void StepGeom_BezierSurfaceAndRationalBSplineSurface::Init( |
38 | const Handle(TCollection_HAsciiString)& aName, |
39 | const Standard_Integer aUDegree, |
40 | const Standard_Integer aVDegree, |
41 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
42 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
43 | const StepData_Logical aUClosed, |
44 | const StepData_Logical aVClosed, |
45 | const StepData_Logical aSelfIntersect, |
46 | const Handle(StepGeom_BezierSurface)& aBezierSurface, |
47 | const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface) |
48 | { |
49 | // --- classe own fields --- |
50 | bezierSurface = aBezierSurface; |
51 | rationalBSplineSurface = aRationalBSplineSurface; |
52 | // --- classe inherited fields --- |
53 | StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
54 | } |
55 | |
56 | |
57 | void StepGeom_BezierSurfaceAndRationalBSplineSurface::Init( |
58 | const Handle(TCollection_HAsciiString)& aName, |
59 | const Standard_Integer aUDegree, |
60 | const Standard_Integer aVDegree, |
61 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
62 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
63 | const StepData_Logical aUClosed, |
64 | const StepData_Logical aVClosed, |
65 | const StepData_Logical aSelfIntersect, |
66 | const Handle(TColStd_HArray2OfReal)& aWeightsData) |
67 | { |
68 | // --- classe inherited fields --- |
69 | |
70 | StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
71 | |
72 | // --- ANDOR componant fields --- |
73 | |
74 | bezierSurface = new StepGeom_BezierSurface(); |
75 | bezierSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect); |
76 | |
77 | // --- ANDOR componant fields --- |
78 | |
79 | rationalBSplineSurface = new StepGeom_RationalBSplineSurface(); |
80 | rationalBSplineSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aWeightsData); |
81 | } |
82 | |
83 | |
84 | void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetBezierSurface(const Handle(StepGeom_BezierSurface)& aBezierSurface) |
85 | { |
86 | bezierSurface = aBezierSurface; |
87 | } |
88 | |
89 | Handle(StepGeom_BezierSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::BezierSurface() const |
90 | { |
91 | return bezierSurface; |
92 | } |
93 | |
94 | void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetRationalBSplineSurface(const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface) |
95 | { |
96 | rationalBSplineSurface = aRationalBSplineSurface; |
97 | } |
98 | |
99 | Handle(StepGeom_RationalBSplineSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::RationalBSplineSurface() const |
100 | { |
101 | return rationalBSplineSurface; |
102 | } |
103 | |
104 | //--- Specific Methods for AND classe field access --- |
105 | |
106 | |
107 | //--- Specific Methods for AND classe field access --- |
108 | |
109 | |
110 | void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetWeightsData(const Handle(TColStd_HArray2OfReal)& aWeightsData) |
111 | { |
112 | rationalBSplineSurface->SetWeightsData(aWeightsData); |
113 | } |
114 | |
115 | Handle(TColStd_HArray2OfReal) StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsData() const |
116 | { |
117 | return rationalBSplineSurface->WeightsData(); |
118 | } |
119 | |
120 | Standard_Real StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsDataValue(const Standard_Integer num1,const Standard_Integer num2) const |
121 | { |
122 | return rationalBSplineSurface->WeightsDataValue(num1,num2); |
123 | } |
124 | |
125 | Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataI () const |
126 | { |
127 | return rationalBSplineSurface->NbWeightsDataI (); |
128 | } |
129 | |
130 | Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataJ () const |
131 | { |
132 | return rationalBSplineSurface->NbWeightsDataJ (); |
133 | } |