1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
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>
23 inline Standard_Boolean AppBlend_AppSurf::IsDone() const
29 inline Standard_Integer AppBlend_AppSurf::UDegree() const
31 if (!done) {throw StdFail_NotDone();}
35 inline Standard_Integer AppBlend_AppSurf::VDegree() const
37 if (!done) {throw StdFail_NotDone();}
41 inline const TColgp_Array2OfPnt& AppBlend_AppSurf::SurfPoles() const
43 if (!done) {throw StdFail_NotDone();}
44 return tabPoles->Array2();
47 inline const TColStd_Array2OfReal& AppBlend_AppSurf::SurfWeights() const
49 if (!done) {throw StdFail_NotDone();}
50 return tabWeights->Array2();
54 inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfUKnots() const
56 if (!done) {throw StdFail_NotDone();}
57 return tabUKnots->Array1();
60 inline const TColStd_Array1OfReal& AppBlend_AppSurf::SurfVKnots() const
62 if (!done) {throw StdFail_NotDone();}
63 return tabVKnots->Array1();
66 inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfUMults() const
68 if (!done) {throw StdFail_NotDone();}
69 return tabUMults->Array1();
72 inline const TColStd_Array1OfInteger& AppBlend_AppSurf::SurfVMults() const
74 if (!done) {throw StdFail_NotDone();}
75 return tabVMults->Array1();
78 inline Standard_Integer AppBlend_AppSurf::NbCurves2d () const
80 if (!done) {throw StdFail_NotDone();}
81 return seqPoles2d.Length();
84 inline Standard_Integer AppBlend_AppSurf::Curves2dDegree() const
86 if (!done) {throw StdFail_NotDone();}
87 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
91 inline const TColgp_Array1OfPnt2d& AppBlend_AppSurf::
92 Curve2dPoles(const Standard_Integer Index) const
94 if (!done) {throw StdFail_NotDone();}
95 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
96 return seqPoles2d(Index)->Array1();
99 inline const TColStd_Array1OfReal& AppBlend_AppSurf::Curves2dKnots () const
101 if (!done) {throw StdFail_NotDone();}
102 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
103 return tabVKnots->Array1();
106 inline const TColStd_Array1OfInteger& AppBlend_AppSurf::Curves2dMults () const
108 if (!done) {throw StdFail_NotDone();}
109 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
110 return tabVMults->Array1();
113 inline void AppBlend_AppSurf::TolReached (Standard_Real& Tol3d,
114 Standard_Real& Tol2d) const
116 if (!done) {throw StdFail_NotDone();}
117 Tol3d = tol3dreached;
118 Tol2d = tol2dreached;