0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / StepGeom / StepGeom_BSplineSurfaceWithKnots.cxx
CommitLineData
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_BSplineSurfaceWithKnots.hxx>
17#include <TCollection_HAsciiString.hxx>
7fd59977 18
92efcf78 19IMPLEMENT_STANDARD_RTTIEXT(StepGeom_BSplineSurfaceWithKnots,StepGeom_BSplineSurface)
20
7fd59977 21StepGeom_BSplineSurfaceWithKnots::StepGeom_BSplineSurfaceWithKnots () {}
22
7fd59977 23void StepGeom_BSplineSurfaceWithKnots::Init(
24 const Handle(TCollection_HAsciiString)& aName,
25 const Standard_Integer aUDegree,
26 const Standard_Integer aVDegree,
27 const Handle(StepGeom_HArray2OfCartesianPoint)& aControlPointsList,
28 const StepGeom_BSplineSurfaceForm aSurfaceForm,
29 const StepData_Logical aUClosed,
30 const StepData_Logical aVClosed,
31 const StepData_Logical aSelfIntersect,
32 const Handle(TColStd_HArray1OfInteger)& aUMultiplicities,
33 const Handle(TColStd_HArray1OfInteger)& aVMultiplicities,
34 const Handle(TColStd_HArray1OfReal)& aUKnots,
35 const Handle(TColStd_HArray1OfReal)& aVKnots,
36 const StepGeom_KnotType aKnotSpec)
37{
38 // --- classe own fields ---
39 uMultiplicities = aUMultiplicities;
40 vMultiplicities = aVMultiplicities;
41 uKnots = aUKnots;
42 vKnots = aVKnots;
43 knotSpec = aKnotSpec;
44 // --- classe inherited fields ---
45 StepGeom_BSplineSurface::Init(aName, aUDegree, aVDegree, aControlPointsList, aSurfaceForm, aUClosed, aVClosed, aSelfIntersect);
46}
47
48
49void StepGeom_BSplineSurfaceWithKnots::SetUMultiplicities(const Handle(TColStd_HArray1OfInteger)& aUMultiplicities)
50{
51 uMultiplicities = aUMultiplicities;
52}
53
54Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnots::UMultiplicities() const
55{
56 return uMultiplicities;
57}
58
59Standard_Integer StepGeom_BSplineSurfaceWithKnots::UMultiplicitiesValue(const Standard_Integer num) const
60{
61 return uMultiplicities->Value(num);
62}
63
64Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbUMultiplicities () const
65{
66 return uMultiplicities->Length();
67}
68
69void StepGeom_BSplineSurfaceWithKnots::SetVMultiplicities(const Handle(TColStd_HArray1OfInteger)& aVMultiplicities)
70{
71 vMultiplicities = aVMultiplicities;
72}
73
74Handle(TColStd_HArray1OfInteger) StepGeom_BSplineSurfaceWithKnots::VMultiplicities() const
75{
76 return vMultiplicities;
77}
78
79Standard_Integer StepGeom_BSplineSurfaceWithKnots::VMultiplicitiesValue(const Standard_Integer num) const
80{
81 return vMultiplicities->Value(num);
82}
83
84Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbVMultiplicities () const
85{
86 return vMultiplicities->Length();
87}
88
89void StepGeom_BSplineSurfaceWithKnots::SetUKnots(const Handle(TColStd_HArray1OfReal)& aUKnots)
90{
91 uKnots = aUKnots;
92}
93
94Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnots::UKnots() const
95{
96 return uKnots;
97}
98
99Standard_Real StepGeom_BSplineSurfaceWithKnots::UKnotsValue(const Standard_Integer num) const
100{
101 return uKnots->Value(num);
102}
103
104Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbUKnots () const
105{
106 return uKnots->Length();
107}
108
109void StepGeom_BSplineSurfaceWithKnots::SetVKnots(const Handle(TColStd_HArray1OfReal)& aVKnots)
110{
111 vKnots = aVKnots;
112}
113
114Handle(TColStd_HArray1OfReal) StepGeom_BSplineSurfaceWithKnots::VKnots() const
115{
116 return vKnots;
117}
118
119Standard_Real StepGeom_BSplineSurfaceWithKnots::VKnotsValue(const Standard_Integer num) const
120{
121 return vKnots->Value(num);
122}
123
124Standard_Integer StepGeom_BSplineSurfaceWithKnots::NbVKnots () const
125{
126 return vKnots->Length();
127}
128
129void StepGeom_BSplineSurfaceWithKnots::SetKnotSpec(const StepGeom_KnotType aKnotSpec)
130{
131 knotSpec = aKnotSpec;
132}
133
134StepGeom_KnotType StepGeom_BSplineSurfaceWithKnots::KnotSpec() const
135{
136 return knotSpec;
137}