0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / AppBlend / AppBlend_AppSurf.lxx
CommitLineData
b311480e 1// Copyright (c) 1995-1999 Matra Datavision
2// Copyright (c) 1999-2012 OPEN CASCADE SAS
3//
4// The content of this file is subject to the Open CASCADE Technology Public
5// License Version 6.5 (the "License"). You may not use the content of this file
6// except in compliance with the License. Please obtain a copy of the License
7// at http://www.opencascade.org and read it completely before using this file.
8//
9// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11//
12// The Original Code and all software distributed under the License is
13// distributed on an "AS IS" basis, without warranty of any kind, and the
14// Initial Developer hereby disclaims all such warranties, including without
15// limitation, any warranties of merchantability, fitness for a particular
16// purpose or non-infringement. Please see the License for the specific terms
17// and conditions governing the rights and limitations under the License.
18
7fd59977 19#include <StdFail_NotDone.hxx>
20#include <TColgp_HArray2OfPnt.hxx>
21#include <TColgp_HArray1OfPnt2d.hxx>
22#include <TColStd_HArray2OfReal.hxx>
23#include <TColStd_HArray1OfReal.hxx>
24#include <TColStd_HArray1OfInteger.hxx>
25
26
27inline Standard_Boolean AppBlend_AppSurf::IsDone() const
28{
29 return done;
30}
31
32
33inline Standard_Integer AppBlend_AppSurf::UDegree() const
34{
35 if (!done) {StdFail_NotDone::Raise();}
36 return udeg;
37}
38
39inline Standard_Integer AppBlend_AppSurf::VDegree() const
40{
41 if (!done) {StdFail_NotDone::Raise();}
42 return vdeg;
43}
44
45inline const TColgp_Array2OfPnt& AppBlend_AppSurf::SurfPoles() const
46{
47 if (!done) {StdFail_NotDone::Raise();}
48 return tabPoles->Array2();
49}
50
51inline const TColStd_Array2OfReal& AppBlend_AppSurf::SurfWeights() const
52{
53 if (!done) {StdFail_NotDone::Raise();}
54 return tabWeights->Array2();
55}
56
57
58inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfUKnots() const
59{
60 if (!done) {StdFail_NotDone::Raise();}
61 return tabUKnots->Array1();
62}
63
64inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfVKnots() const
65{
66 if (!done) {StdFail_NotDone::Raise();}
67 return tabVKnots->Array1();
68}
69
70inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfUMults() const
71{
72 if (!done) {StdFail_NotDone::Raise();}
73 return tabUMults->Array1();
74}
75
76inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfVMults() const
77{
78 if (!done) {StdFail_NotDone::Raise();}
79 return tabVMults->Array1();
80}
81
82inline Standard_Integer AppBlend_AppSurf::NbCurves2d () const
83{
84 if (!done) {StdFail_NotDone::Raise();}
85 return seqPoles2d.Length();
86}
87
88inline Standard_Integer AppBlend_AppSurf::Curves2dDegree() const
89{
90 if (!done) {StdFail_NotDone::Raise();}
91 if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
92 return vdeg;
93}
94
95inline const TColgp_Array1OfPnt2d& AppBlend_AppSurf::
96 Curve2dPoles(const Standard_Integer Index) const
97{
98 if (!done) {StdFail_NotDone::Raise();}
99 if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
100 return seqPoles2d(Index)->Array1();
101}
102
103inline const TColStd_Array1OfReal& AppBlend_AppSurf::Curves2dKnots () const
104{
105 if (!done) {StdFail_NotDone::Raise();}
106 if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
107 return tabVKnots->Array1();
108}
109
110inline const TColStd_Array1OfInteger& AppBlend_AppSurf::Curves2dMults () const
111{
112 if (!done) {StdFail_NotDone::Raise();}
113 if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();}
114 return tabVMults->Array1();
115}
116
117inline void AppBlend_AppSurf::TolReached (Standard_Real& Tol3d,
118 Standard_Real& Tol2d) const
119{
120 if (!done) {StdFail_NotDone::Raise();}
121 Tol3d = tol3dreached;
122 Tol2d = tol2dreached;
123}
124