b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | #include <StepGeom_BSplineSurface.ixx> |
19 | |
20 | |
21 | StepGeom_BSplineSurface::StepGeom_BSplineSurface () {} |
22 | |
23 | void StepGeom_BSplineSurface::Init( |
24 | const Handle(TCollection_HAsciiString)& aName) |
25 | { |
26 | |
27 | StepRepr_RepresentationItem::Init(aName); |
28 | } |
29 | |
30 | void StepGeom_BSplineSurface::Init( |
31 | const Handle(TCollection_HAsciiString)& aName, |
32 | const Standard_Integer aUDegree, |
33 | const Standard_Integer aVDegree, |
34 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
35 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
36 | const StepData_Logical aUClosed, |
37 | const StepData_Logical aVClosed, |
38 | const StepData_Logical aSelfIntersect) |
39 | { |
40 | // --- classe own fields --- |
41 | uDegree = aUDegree; |
42 | vDegree = aVDegree; |
43 | controlPointsList = aControlPointsList; |
44 | surfaceForm = aSurfaceForm; |
45 | uClosed = aUClosed; |
46 | vClosed = aVClosed; |
47 | selfIntersect = aSelfIntersect; |
48 | // --- classe inherited fields --- |
49 | StepRepr_RepresentationItem::Init(aName); |
50 | } |
51 | |
52 | |
53 | void StepGeom_BSplineSurface::SetUDegree(const Standard_Integer aUDegree) |
54 | { |
55 | uDegree = aUDegree; |
56 | } |
57 | |
58 | Standard_Integer StepGeom_BSplineSurface::UDegree() const |
59 | { |
60 | return uDegree; |
61 | } |
62 | |
63 | void StepGeom_BSplineSurface::SetVDegree(const Standard_Integer aVDegree) |
64 | { |
65 | vDegree = aVDegree; |
66 | } |
67 | |
68 | Standard_Integer StepGeom_BSplineSurface::VDegree() const |
69 | { |
70 | return vDegree; |
71 | } |
72 | |
73 | void StepGeom_BSplineSurface::SetControlPointsList(const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList) |
74 | { |
75 | controlPointsList = aControlPointsList; |
76 | } |
77 | |
78 | Handle(StepGeom_HArray2OfCartesianPoint) StepGeom_BSplineSurface::ControlPointsList() const |
79 | { |
80 | return controlPointsList; |
81 | } |
82 | |
83 | Handle(StepGeom_CartesianPoint) StepGeom_BSplineSurface::ControlPointsListValue(const Standard_Integer num1,const Standard_Integer num2) const |
84 | { |
85 | return controlPointsList->Value(num1,num2); |
86 | } |
87 | |
88 | Standard_Integer StepGeom_BSplineSurface::NbControlPointsListI () const |
89 | { |
90 | if (controlPointsList.IsNull()) return 0; |
91 | return controlPointsList->UpperRow() - controlPointsList->LowerRow() + 1; |
92 | } |
93 | |
94 | Standard_Integer StepGeom_BSplineSurface::NbControlPointsListJ () const |
95 | { |
96 | if (controlPointsList.IsNull()) return 0; |
97 | return controlPointsList->UpperCol() - controlPointsList->LowerCol() + 1; |
98 | } |
99 | |
100 | void StepGeom_BSplineSurface::SetSurfaceForm(const StepGeom_BSplineSurfaceForm aSurfaceForm) |
101 | { |
102 | surfaceForm = aSurfaceForm; |
103 | } |
104 | |
105 | StepGeom_BSplineSurfaceForm StepGeom_BSplineSurface::SurfaceForm() const |
106 | { |
107 | return surfaceForm; |
108 | } |
109 | |
110 | void StepGeom_BSplineSurface::SetUClosed(const StepData_Logical aUClosed) |
111 | { |
112 | uClosed = aUClosed; |
113 | } |
114 | |
115 | StepData_Logical StepGeom_BSplineSurface::UClosed() const |
116 | { |
117 | return uClosed; |
118 | } |
119 | |
120 | void StepGeom_BSplineSurface::SetVClosed(const StepData_Logical aVClosed) |
121 | { |
122 | vClosed = aVClosed; |
123 | } |
124 | |
125 | StepData_Logical StepGeom_BSplineSurface::VClosed() const |
126 | { |
127 | return vClosed; |
128 | } |
129 | |
130 | void StepGeom_BSplineSurface::SetSelfIntersect(const StepData_Logical aSelfIntersect) |
131 | { |
132 | selfIntersect = aSelfIntersect; |
133 | } |
134 | |
135 | StepData_Logical StepGeom_BSplineSurface::SelfIntersect() const |
136 | { |
137 | return selfIntersect; |
138 | } |