1 // Created on: 1997-06-26
2 // Created by: Philippe MANGIN
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <StdFail_NotDone.hxx>
18 #include <TColgp_HArray2OfPnt.hxx>
19 #include <TColgp_HArray1OfPnt2d.hxx>
20 #include <TColStd_HArray2OfReal.hxx>
21 #include <TColStd_HArray1OfReal.hxx>
22 #include <TColStd_HArray1OfInteger.hxx>
24 inline Standard_Boolean Approx_SweepApproximation::IsDone() const
30 inline Standard_Integer Approx_SweepApproximation::UDegree() const
32 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
37 inline Standard_Integer Approx_SweepApproximation::VDegree() const
39 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
44 inline const TColgp_Array2OfPnt& Approx_SweepApproximation::SurfPoles() const
46 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
47 return tabPoles->Array2();
51 inline const TColStd_Array2OfReal& Approx_SweepApproximation::SurfWeights() const
53 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
54 return tabWeights->Array2();
58 inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfUKnots() const
60 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
61 return tabUKnots->Array1();
65 inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfVKnots() const
67 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
68 return tabVKnots->Array1();
72 inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfUMults() const
74 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
75 return tabUMults->Array1();
79 inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfVMults() const
81 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
82 return tabVMults->Array1();
86 inline Standard_Integer Approx_SweepApproximation::NbCurves2d() const
88 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
93 inline Standard_Integer Approx_SweepApproximation::Curves2dDegree() const
95 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
96 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
101 inline const TColgp_Array1OfPnt2d& Approx_SweepApproximation::Curve2dPoles(const Standard_Integer Index) const
103 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
104 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
105 return seqPoles2d(Index)->Array1();
109 inline const TColStd_Array1OfReal& Approx_SweepApproximation::Curves2dKnots() const
111 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
112 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
113 return tab2dKnots->Array1();
117 inline const TColStd_Array1OfInteger& Approx_SweepApproximation::Curves2dMults() const
119 if (!done) {throw StdFail_NotDone(" Approx_SweepApproximation");}
120 if (seqPoles2d.Length() == 0) {throw Standard_DomainError();}
121 return tab2dMults->Array1();
125 inline void Approx_SweepApproximation::TolReached(Standard_Real& Tol3d,Standard_Real& Tol2d) const