973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | #include <StepGeom_BSplineCurve.ixx> |
15 | |
16 | |
17 | StepGeom_BSplineCurve::StepGeom_BSplineCurve () {} |
18 | |
19 | void StepGeom_BSplineCurve::Init( |
20 | const Handle(TCollection_HAsciiString)& aName) |
21 | { |
22 | |
23 | StepRepr_RepresentationItem::Init(aName); |
24 | } |
25 | |
26 | void StepGeom_BSplineCurve::Init( |
27 | const Handle(TCollection_HAsciiString)& aName, |
28 | const Standard_Integer aDegree, |
29 | const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList, |
30 | const StepGeom_BSplineCurveForm aCurveForm, |
31 | const StepData_Logical aClosedCurve, |
32 | const StepData_Logical aSelfIntersect) |
33 | { |
34 | // --- classe own fields --- |
35 | degree = aDegree; |
36 | controlPointsList = aControlPointsList; |
37 | curveForm = aCurveForm; |
38 | closedCurve = aClosedCurve; |
39 | selfIntersect = aSelfIntersect; |
40 | // --- classe inherited fields --- |
41 | StepRepr_RepresentationItem::Init(aName); |
42 | } |
43 | |
44 | |
45 | void StepGeom_BSplineCurve::SetDegree(const Standard_Integer aDegree) |
46 | { |
47 | degree = aDegree; |
48 | } |
49 | |
50 | Standard_Integer StepGeom_BSplineCurve::Degree() const |
51 | { |
52 | return degree; |
53 | } |
54 | |
55 | void StepGeom_BSplineCurve::SetControlPointsList(const Handle(StepGeom_HArray1OfCartesianPoint)& aControlPointsList) |
56 | { |
57 | controlPointsList = aControlPointsList; |
58 | } |
59 | |
60 | Handle(StepGeom_HArray1OfCartesianPoint) StepGeom_BSplineCurve::ControlPointsList() const |
61 | { |
62 | return controlPointsList; |
63 | } |
64 | |
65 | Handle(StepGeom_CartesianPoint) StepGeom_BSplineCurve::ControlPointsListValue(const Standard_Integer num) const |
66 | { |
67 | return controlPointsList->Value(num); |
68 | } |
69 | |
70 | Standard_Integer StepGeom_BSplineCurve::NbControlPointsList () const |
71 | { |
72 | if (controlPointsList.IsNull()) return 0; |
73 | return controlPointsList->Length(); |
74 | } |
75 | |
76 | void StepGeom_BSplineCurve::SetCurveForm(const StepGeom_BSplineCurveForm aCurveForm) |
77 | { |
78 | curveForm = aCurveForm; |
79 | } |
80 | |
81 | StepGeom_BSplineCurveForm StepGeom_BSplineCurve::CurveForm() const |
82 | { |
83 | return curveForm; |
84 | } |
85 | |
86 | void StepGeom_BSplineCurve::SetClosedCurve(const StepData_Logical aClosedCurve) |
87 | { |
88 | closedCurve = aClosedCurve; |
89 | } |
90 | |
91 | StepData_Logical StepGeom_BSplineCurve::ClosedCurve() const |
92 | { |
93 | return closedCurve; |
94 | } |
95 | |
96 | void StepGeom_BSplineCurve::SetSelfIntersect(const StepData_Logical aSelfIntersect) |
97 | { |
98 | selfIntersect = aSelfIntersect; |
99 | } |
100 | |
101 | StepData_Logical StepGeom_BSplineCurve::SelfIntersect() const |
102 | { |
103 | return selfIntersect; |
104 | } |