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.
15 #include <Standard_Type.hxx>
16 #include <StepGeom_BezierSurface.hxx>
17 #include <StepGeom_BezierSurfaceAndRationalBSplineSurface.hxx>
18 #include <StepGeom_RationalBSplineSurface.hxx>
19 #include <TCollection_HAsciiString.hxx>
21 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BezierSurfaceAndRationalBSplineSurface,StepGeom_BSplineSurface)
23 StepGeom_BezierSurfaceAndRationalBSplineSurface::StepGeom_BezierSurfaceAndRationalBSplineSurface () {}
25 void StepGeom_BezierSurfaceAndRationalBSplineSurface::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_BezierSurface)& aBezierSurface,
35 const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface)
37 // --- classe own fields ---
38 bezierSurface = aBezierSurface;
39 rationalBSplineSurface = aRationalBSplineSurface;
40 // --- classe inherited fields ---
41 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
45 void StepGeom_BezierSurfaceAndRationalBSplineSurface::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)
56 // --- classe inherited fields ---
58 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
60 // --- ANDOR componant fields ---
62 bezierSurface = new StepGeom_BezierSurface();
63 bezierSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
65 // --- ANDOR componant fields ---
67 rationalBSplineSurface = new StepGeom_RationalBSplineSurface();
68 rationalBSplineSurface->Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect, aWeightsData);
72 void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetBezierSurface(const Handle(StepGeom_BezierSurface)& aBezierSurface)
74 bezierSurface = aBezierSurface;
77 Handle(StepGeom_BezierSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::BezierSurface() const
82 void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetRationalBSplineSurface(const Handle(StepGeom_RationalBSplineSurface)& aRationalBSplineSurface)
84 rationalBSplineSurface = aRationalBSplineSurface;
87 Handle(StepGeom_RationalBSplineSurface) StepGeom_BezierSurfaceAndRationalBSplineSurface::RationalBSplineSurface() const
89 return rationalBSplineSurface;
92 //--- Specific Methods for AND classe field access ---
95 //--- Specific Methods for AND classe field access ---
98 void StepGeom_BezierSurfaceAndRationalBSplineSurface::SetWeightsData(const Handle(TColStd_HArray2OfReal)& aWeightsData)
100 rationalBSplineSurface->SetWeightsData(aWeightsData);
103 Handle(TColStd_HArray2OfReal) StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsData() const
105 return rationalBSplineSurface->WeightsData();
108 Standard_Real StepGeom_BezierSurfaceAndRationalBSplineSurface::WeightsDataValue(const Standard_Integer num1,const Standard_Integer num2) const
110 return rationalBSplineSurface->WeightsDataValue(num1,num2);
113 Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataI () const
115 return rationalBSplineSurface->NbWeightsDataI ();
118 Standard_Integer StepGeom_BezierSurfaceAndRationalBSplineSurface::NbWeightsDataJ () const
120 return rationalBSplineSurface->NbWeightsDataJ ();