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