1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <StepGeom_BezierSurfaceAndRationalBSplineSurface.ixx>
16 #include <StepGeom_BezierSurface.hxx>
18 #include <StepGeom_RationalBSplineSurface.hxx>
21 StepGeom_BezierSurfaceAndRationalBSplineSurface::StepGeom_BezierSurfaceAndRationalBSplineSurface () {}
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)
34 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
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)
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);
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)
68 // --- classe inherited fields ---
70 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
72 // --- ANDOR componant fields ---
74 bezierSurface = new StepGeom_BezierSurface();
75 bezierSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
77 // --- ANDOR componant fields ---
79 rationalBSplineSurface = new StepGeom_RationalBSplineSurface();
80 rationalBSplineSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aWeightsData);
84 void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetBezierSurface(const Handle(StepGeom_BezierSurface)& aBezierSurface)
86 bezierSurface = aBezierSurface;
89 Handle(StepGeom_BezierSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::BezierSurface() const
94 void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetRationalBSplineSurface(const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface)
96 rationalBSplineSurface = aRationalBSplineSurface;
99 Handle(StepGeom_RationalBSplineSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::RationalBSplineSurface() const
101 return rationalBSplineSurface;
104 //--- Specific Methods for AND classe field access ---
107 //--- Specific Methods for AND classe field access ---
110 void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetWeightsData(const Handle(TColStd_HArray2OfReal)& aWeightsData)
112 rationalBSplineSurface->SetWeightsData(aWeightsData);
115 Handle(TColStd_HArray2OfReal) StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsData() const
117 return rationalBSplineSurface->WeightsData();
120 Standard_Real StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsDataValue(const Standard_Integer num1,const Standard_Integer num2) const
122 return rationalBSplineSurface->WeightsDataValue(num1,num2);
125 Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataI () const
127 return rationalBSplineSurface->NbWeightsDataI ();
130 Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataJ () const
132 return rationalBSplineSurface->NbWeightsDataJ ();