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_BSplineSurfaceWithKnots.hxx>
17 #include <TCollection_HAsciiString.hxx>
19 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BSplineSurfaceWithKnots,StepGeom_BSplineSurface)
21 StepGeom_BSplineSurfaceWithKnots::StepGeom_BSplineSurfaceWithKnots () {}
23 void StepGeom_BSplineSurfaceWithKnots::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 const Handle(TColStd_HArray1OfInteger)& aUMultiplicities,
33 const Handle(TColStd_HArray1OfInteger)& aVMultiplicities,
34 const Handle(TColStd_HArray1OfReal)& aUKnots,
35 const Handle(TColStd_HArray1OfReal)& aVKnots,
36 const StepGeom_KnotType aKnotSpec)
38 // --- classe own fields ---
39 uMultiplicities = aUMultiplicities;
40 vMultiplicities = aVMultiplicities;
44 // --- classe inherited fields ---
45 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
49 void StepGeom_BSplineSurfaceWithKnots::SetUMultiplicities(const Handle(TColStd_HArray1OfInteger)& aUMultiplicities)
51 uMultiplicities = aUMultiplicities;
54 Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnots::UMultiplicities() const
56 return uMultiplicities;
59 Standard_Integer StepGeom_BSplineSurfaceWithKnots::UMultiplicitiesValue(const Standard_Integer num) const
61 return uMultiplicities->Value(num);
64 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbUMultiplicities () const
66 return uMultiplicities->Length();
69 void StepGeom_BSplineSurfaceWithKnots::SetVMultiplicities(const Handle(TColStd_HArray1OfInteger)& aVMultiplicities)
71 vMultiplicities = aVMultiplicities;
74 Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnots::VMultiplicities() const
76 return vMultiplicities;
79 Standard_Integer StepGeom_BSplineSurfaceWithKnots::VMultiplicitiesValue(const Standard_Integer num) const
81 return vMultiplicities->Value(num);
84 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbVMultiplicities () const
86 return vMultiplicities->Length();
89 void StepGeom_BSplineSurfaceWithKnots::SetUKnots(const Handle(TColStd_HArray1OfReal)& aUKnots)
94 Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnots::UKnots() const
99 Standard_Real StepGeom_BSplineSurfaceWithKnots::UKnotsValue(const Standard_Integer num) const
101 return uKnots->Value(num);
104 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbUKnots () const
106 return uKnots->Length();
109 void StepGeom_BSplineSurfaceWithKnots::SetVKnots(const Handle(TColStd_HArray1OfReal)& aVKnots)
114 Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnots::VKnots() const
119 Standard_Real StepGeom_BSplineSurfaceWithKnots::VKnotsValue(const Standard_Integer num) const
121 return vKnots->Value(num);
124 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbVKnots () const
126 return vKnots->Length();
129 void StepGeom_BSplineSurfaceWithKnots::SetKnotSpec(const StepGeom_KnotType aKnotSpec)
131 knotSpec = aKnotSpec;
134 StepGeom_KnotType StepGeom_BSplineSurfaceWithKnots::KnotSpec() const