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 <StepGeom_BSplineSurfaceWithKnots.hxx>
16 #include <TCollection_HAsciiString.hxx>
18 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BSplineSurfaceWithKnots,StepGeom_BSplineSurface)
20 StepGeom_BSplineSurfaceWithKnots::StepGeom_BSplineSurfaceWithKnots () {}
22 void StepGeom_BSplineSurfaceWithKnots::Init(
23 const Handle(TCollection_HAsciiString)& aName,
24 const Standard_Integer aUDegree,
25 const Standard_Integer aVDegree,
26 const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList,
27 const StepGeom_BSplineSurfaceForm aSurfaceForm,
28 const StepData_Logical aUClosed,
29 const StepData_Logical aVClosed,
30 const StepData_Logical aSelfIntersect,
31 const Handle(TColStd_HArray1OfInteger)& aUMultiplicities,
32 const Handle(TColStd_HArray1OfInteger)& aVMultiplicities,
33 const Handle(TColStd_HArray1OfReal)& aUKnots,
34 const Handle(TColStd_HArray1OfReal)& aVKnots,
35 const StepGeom_KnotType aKnotSpec)
37 // --- classe own fields ---
38 uMultiplicities = aUMultiplicities;
39 vMultiplicities = aVMultiplicities;
43 // --- classe inherited fields ---
44 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
48 void StepGeom_BSplineSurfaceWithKnots::SetUMultiplicities(const Handle(TColStd_HArray1OfInteger)& aUMultiplicities)
50 uMultiplicities = aUMultiplicities;
53 Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnots::UMultiplicities() const
55 return uMultiplicities;
58 Standard_Integer StepGeom_BSplineSurfaceWithKnots::UMultiplicitiesValue(const Standard_Integer num) const
60 return uMultiplicities->Value(num);
63 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbUMultiplicities () const
65 return uMultiplicities->Length();
68 void StepGeom_BSplineSurfaceWithKnots::SetVMultiplicities(const Handle(TColStd_HArray1OfInteger)& aVMultiplicities)
70 vMultiplicities = aVMultiplicities;
73 Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnots::VMultiplicities() const
75 return vMultiplicities;
78 Standard_Integer StepGeom_BSplineSurfaceWithKnots::VMultiplicitiesValue(const Standard_Integer num) const
80 return vMultiplicities->Value(num);
83 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbVMultiplicities () const
85 return vMultiplicities->Length();
88 void StepGeom_BSplineSurfaceWithKnots::SetUKnots(const Handle(TColStd_HArray1OfReal)& aUKnots)
93 Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnots::UKnots() const
98 Standard_Real StepGeom_BSplineSurfaceWithKnots::UKnotsValue(const Standard_Integer num) const
100 return uKnots->Value(num);
103 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbUKnots () const
105 return uKnots->Length();
108 void StepGeom_BSplineSurfaceWithKnots::SetVKnots(const Handle(TColStd_HArray1OfReal)& aVKnots)
113 Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnots::VKnots() const
118 Standard_Real StepGeom_BSplineSurfaceWithKnots::VKnotsValue(const Standard_Integer num) const
120 return vKnots->Value(num);
123 Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbVKnots () const
125 return vKnots->Length();
128 void StepGeom_BSplineSurfaceWithKnots::SetKnotSpec(const StepGeom_KnotType aKnotSpec)
130 knotSpec = aKnotSpec;
133 StepGeom_KnotType StepGeom_BSplineSurfaceWithKnots::KnotSpec() const