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_BSplineSurface.ixx> |
15 | |
16 | |
17 | StepGeom_BSplineSurface::StepGeom_BSplineSurface () {} |
18 | |
19 | void StepGeom_BSplineSurface::Init( |
20 | const Handle(TCollection_HAsciiString)& aName) |
21 | { |
22 | |
23 | StepRepr_RepresentationItem::Init(aName); |
24 | } |
25 | |
26 | void StepGeom_BSplineSurface::Init( |
27 | const Handle(TCollection_HAsciiString)& aName, |
28 | const Standard_Integer aUDegree, |
29 | const Standard_Integer aVDegree, |
30 | const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList, |
31 | const StepGeom_BSplineSurfaceForm aSurfaceForm, |
32 | const StepData_Logical aUClosed, |
33 | const StepData_Logical aVClosed, |
34 | const StepData_Logical aSelfIntersect) |
35 | { |
36 | // --- classe own fields --- |
37 | uDegree = aUDegree; |
38 | vDegree = aVDegree; |
39 | controlPointsList = aControlPointsList; |
40 | surfaceForm = aSurfaceForm; |
41 | uClosed = aUClosed; |
42 | vClosed = aVClosed; |
43 | selfIntersect = aSelfIntersect; |
44 | // --- classe inherited fields --- |
45 | StepRepr_RepresentationItem::Init(aName); |
46 | } |
47 | |
48 | |
49 | void StepGeom_BSplineSurface::SetUDegree(const Standard_Integer aUDegree) |
50 | { |
51 | uDegree = aUDegree; |
52 | } |
53 | |
54 | Standard_Integer StepGeom_BSplineSurface::UDegree() const |
55 | { |
56 | return uDegree; |
57 | } |
58 | |
59 | void StepGeom_BSplineSurface::SetVDegree(const Standard_Integer aVDegree) |
60 | { |
61 | vDegree = aVDegree; |
62 | } |
63 | |
64 | Standard_Integer StepGeom_BSplineSurface::VDegree() const |
65 | { |
66 | return vDegree; |
67 | } |
68 | |
69 | void StepGeom_BSplineSurface::SetControlPointsList(const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList) |
70 | { |
71 | controlPointsList = aControlPointsList; |
72 | } |
73 | |
74 | Handle(StepGeom_HArray2OfCartesianPoint) StepGeom_BSplineSurface::ControlPointsList() const |
75 | { |
76 | return controlPointsList; |
77 | } |
78 | |
79 | Handle(StepGeom_CartesianPoint) StepGeom_BSplineSurface::ControlPointsListValue(const Standard_Integer num1,const Standard_Integer num2) const |
80 | { |
81 | return controlPointsList->Value(num1,num2); |
82 | } |
83 | |
84 | Standard_Integer StepGeom_BSplineSurface::NbControlPointsListI () const |
85 | { |
86 | if (controlPointsList.IsNull()) return 0; |
87 | return controlPointsList->UpperRow() - controlPointsList->LowerRow() + 1; |
88 | } |
89 | |
90 | Standard_Integer StepGeom_BSplineSurface::NbControlPointsListJ () const |
91 | { |
92 | if (controlPointsList.IsNull()) return 0; |
93 | return controlPointsList->UpperCol() - controlPointsList->LowerCol() + 1; |
94 | } |
95 | |
96 | void StepGeom_BSplineSurface::SetSurfaceForm(const StepGeom_BSplineSurfaceForm aSurfaceForm) |
97 | { |
98 | surfaceForm = aSurfaceForm; |
99 | } |
100 | |
101 | StepGeom_BSplineSurfaceForm StepGeom_BSplineSurface::SurfaceForm() const |
102 | { |
103 | return surfaceForm; |
104 | } |
105 | |
106 | void StepGeom_BSplineSurface::SetUClosed(const StepData_Logical aUClosed) |
107 | { |
108 | uClosed = aUClosed; |
109 | } |
110 | |
111 | StepData_Logical StepGeom_BSplineSurface::UClosed() const |
112 | { |
113 | return uClosed; |
114 | } |
115 | |
116 | void StepGeom_BSplineSurface::SetVClosed(const StepData_Logical aVClosed) |
117 | { |
118 | vClosed = aVClosed; |
119 | } |
120 | |
121 | StepData_Logical StepGeom_BSplineSurface::VClosed() const |
122 | { |
123 | return vClosed; |
124 | } |
125 | |
126 | void StepGeom_BSplineSurface::SetSelfIntersect(const StepData_Logical aSelfIntersect) |
127 | { |
128 | selfIntersect = aSelfIntersect; |
129 | } |
130 | |
131 | StepData_Logical StepGeom_BSplineSurface::SelfIntersect() const |
132 | { |
133 | return selfIntersect; |
134 | } |