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