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_BSplineCurveWithKnots.hxx>
17 #include <TCollection_HAsciiString.hxx>
19 IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BSplineCurveWithKnots,StepGeom_BSplineCurve)
21 StepGeom_BSplineCurveWithKnots::StepGeom_BSplineCurveWithKnots () {}
23 void StepGeom_BSplineCurveWithKnots::Init(
24 const Handle(TCollection_HAsciiString)& aName,
25 const Standard_Integer aDegree,
26 const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList,
27 const StepGeom_BSplineCurveForm aCurveForm,
28 const StepData_Logical aClosedCurve,
29 const StepData_Logical aSelfIntersect)
32 StepGeom_BSplineCurve::Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect);
35 void StepGeom_BSplineCurveWithKnots::Init(
36 const Handle(TCollection_HAsciiString)& aName,
37 const Standard_Integer aDegree,
38 const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList,
39 const StepGeom_BSplineCurveForm aCurveForm,
40 const StepData_Logical aClosedCurve,
41 const StepData_Logical aSelfIntersect,
42 const Handle(TColStd_HArray1OfInteger)& aKnotMultiplicities,
43 const Handle(TColStd_HArray1OfReal)& aKnots,
44 const StepGeom_KnotType aKnotSpec)
46 // --- classe own fields ---
47 knotMultiplicities = aKnotMultiplicities;
50 // --- classe inherited fields ---
51 StepGeom_BSplineCurve::Init(aName, aDegree, aControlPointsList, aCurveForm, aClosedCurve, aSelfIntersect);
55 void StepGeom_BSplineCurveWithKnots::SetKnotMultiplicities(const Handle(TColStd_HArray1OfInteger)& aKnotMultiplicities)
57 knotMultiplicities = aKnotMultiplicities;
60 Handle(TColStd_HArray1OfInteger) StepGeom_BSplineCurveWithKnots::KnotMultiplicities() const
62 return knotMultiplicities;
65 Standard_Integer StepGeom_BSplineCurveWithKnots::KnotMultiplicitiesValue(const Standard_Integer num) const
67 return knotMultiplicities->Value(num);
70 Standard_Integer StepGeom_BSplineCurveWithKnots::NbKnotMultiplicities () const
72 return knotMultiplicities->Length();
75 void StepGeom_BSplineCurveWithKnots::SetKnots(const Handle(TColStd_HArray1OfReal)& aKnots)
80 Handle(TColStd_HArray1OfReal) StepGeom_BSplineCurveWithKnots::Knots() const
85 Standard_Real StepGeom_BSplineCurveWithKnots::KnotsValue(const Standard_Integer num) const
87 return knots->Value(num);
90 Standard_Integer StepGeom_BSplineCurveWithKnots::NbKnots () const
92 return knots->Length();
95 void StepGeom_BSplineCurveWithKnots::SetKnotSpec(const StepGeom_KnotType aKnotSpec)
100 StepGeom_KnotType StepGeom_BSplineCurveWithKnots::KnotSpec() const