0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / AppBlend / AppBlend_AppSurf.lxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #include <StdFail_NotDone.hxx>
16 #include <TColgp_HArray2OfPnt.hxx>
17 #include <TColgp_HArray1OfPnt2d.hxx>
18 #include <TColStd_HArray2OfReal.hxx>
19 #include <TColStd_HArray1OfReal.hxx>
20 #include <TColStd_HArray1OfInteger.hxx>
21
22
23 inline Standard_Boolean AppBlend_AppSurf::IsDone() const
24 {
25   return done;
26 }
27
28
29 inline Standard_Integer AppBlend_AppSurf::UDegree() const
30 {
31   if (!done) {throw StdFail_NotDone();}
32   return udeg;
33 }
34
35 inline Standard_Integer AppBlend_AppSurf::VDegree() const
36 {
37   if (!done) {throw StdFail_NotDone();}
38   return vdeg;
39 }
40
41 inline const TColgp_Array2OfPnt& AppBlend_AppSurf::SurfPoles() const
42 {
43   if (!done) {throw StdFail_NotDone();}
44   return tabPoles->Array2();
45 }
46
47 inline const TColStd_Array2OfReal& AppBlend_AppSurf::SurfWeights() const
48 {
49   if (!done) {throw StdFail_NotDone();}
50   return tabWeights->Array2();
51 }
52
53
54 inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfUKnots() const
55 {
56   if (!done) {throw StdFail_NotDone();}
57   return tabUKnots->Array1();
58 }
59
60 inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfVKnots() const
61 {
62   if (!done) {throw StdFail_NotDone();}
63   return tabVKnots->Array1();
64 }
65
66 inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfUMults() const
67 {
68   if (!done) {throw StdFail_NotDone();}
69   return tabUMults->Array1();
70 }
71
72 inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfVMults() const
73 {
74   if (!done) {throw StdFail_NotDone();}
75   return tabVMults->Array1();
76 }
77
78 inline Standard_Integer AppBlend_AppSurf::NbCurves2d () const
79 {
80   if (!done) {throw StdFail_NotDone();}
81   return seqPoles2d.Length();
82 }
83
84 inline Standard_Integer AppBlend_AppSurf::Curves2dDegree() const
85 {
86   if (!done) {throw StdFail_NotDone();}
87   if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
88   return vdeg;
89 }
90
91 inline const TColgp_Array1OfPnt2d& AppBlend_AppSurf::
92   Curve2dPoles(const Standard_Integer Index) const
93 {
94   if (!done) {throw StdFail_NotDone();}
95   if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
96   return seqPoles2d(Index)->Array1();
97 }
98
99 inline const TColStd_Array1OfReal& AppBlend_AppSurf::Curves2dKnots () const
100 {
101   if (!done) {throw StdFail_NotDone();}
102   if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
103   return tabVKnots->Array1();
104 }
105
106 inline const TColStd_Array1OfInteger& AppBlend_AppSurf::Curves2dMults () const
107 {
108   if (!done) {throw StdFail_NotDone();}
109   if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
110   return tabVMults->Array1();
111 }
112
113 inline void AppBlend_AppSurf::TolReached (Standard_Real& Tol3d,
114                                           Standard_Real& Tol2d) const
115 {
116   if (!done) {throw StdFail_NotDone();}
117   Tol3d = tol3dreached;
118   Tol2d = tol2dreached;
119 }
120