1 // Created on: 1993-03-03
2 // Created by: Philippe DAUTRY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <PGeom2d_BSplineCurve.ixx>
19 //=======================================================================
20 //function : PGeom2d_BSplineCurve
22 //=======================================================================
24 PGeom2d_BSplineCurve::PGeom2d_BSplineCurve()
28 //=======================================================================
29 //function : PGeom2d_BSplineCurve
31 //=======================================================================
33 PGeom2d_BSplineCurve::PGeom2d_BSplineCurve
34 (const Standard_Boolean aRational,
35 const Standard_Boolean aPeriodic,
36 const Standard_Integer aSpineDegree,
37 const Handle(PColgp_HArray1OfPnt2d)& aPoles,
38 const Handle(PColStd_HArray1OfReal)& aWeights,
39 const Handle(PColStd_HArray1OfReal)& aKnots,
40 const Handle(PColStd_HArray1OfInteger)& aMultiplicities) :
43 spineDegree(aSpineDegree),
47 multiplicities(aMultiplicities)
51 //=======================================================================
54 //=======================================================================
56 void PGeom2d_BSplineCurve::Periodic(const Standard_Boolean aPeriodic)
57 { periodic = aPeriodic; }
60 //=======================================================================
63 //=======================================================================
65 Standard_Boolean PGeom2d_BSplineCurve::Periodic() const
69 //=======================================================================
72 //=======================================================================
74 void PGeom2d_BSplineCurve::Rational(const Standard_Boolean aRational)
75 { rational = aRational; }
78 //=======================================================================
81 //=======================================================================
83 Standard_Boolean PGeom2d_BSplineCurve::Rational() const
87 //=======================================================================
88 //function : SpineDegree
90 //=======================================================================
92 void PGeom2d_BSplineCurve::SpineDegree(const Standard_Integer aSpineDegree)
93 { spineDegree = aSpineDegree; }
96 //=======================================================================
97 //function : SpineDegree
99 //=======================================================================
101 Standard_Integer PGeom2d_BSplineCurve::SpineDegree() const
102 { return spineDegree; }
105 //=======================================================================
108 //=======================================================================
110 void PGeom2d_BSplineCurve::Poles(const Handle(PColgp_HArray1OfPnt2d)& aPoles)
114 //=======================================================================
117 //=======================================================================
119 Handle(PColgp_HArray1OfPnt2d) PGeom2d_BSplineCurve::Poles() const
123 //=======================================================================
126 //=======================================================================
128 void PGeom2d_BSplineCurve::Weights
129 (const Handle(PColStd_HArray1OfReal)& aWeights)
130 { weights = aWeights; }
133 //=======================================================================
136 //=======================================================================
138 Handle(PColStd_HArray1OfReal) PGeom2d_BSplineCurve::Weights() const
142 //=======================================================================
145 //=======================================================================
147 void PGeom2d_BSplineCurve::Knots
148 (const Handle(PColStd_HArray1OfReal)& aKnots)
152 //=======================================================================
155 //=======================================================================
157 Handle(PColStd_HArray1OfReal) PGeom2d_BSplineCurve::Knots() const
161 //=======================================================================
162 //function : Multiplicities
164 //=======================================================================
166 void PGeom2d_BSplineCurve::Multiplicities
167 (const Handle(PColStd_HArray1OfInteger)& aMultiplicities)
168 { multiplicities = aMultiplicities; }
171 //=======================================================================
172 //function : Multiplicities
174 //=======================================================================
176 Handle(PColStd_HArray1OfInteger)
177 PGeom2d_BSplineCurve::Multiplicities() const
178 { return multiplicities; }