b311480e |
1 | // Created on: 1997-06-26 |
2 | // Created by: Philippe MANGIN |
3 | // Copyright (c) 1997-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
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> |
23 | |
24 | inline Standard_Boolean Approx_SweepApproximation::IsDone() const |
25 | { |
26 | return done; |
27 | } |
28 | |
29 | |
30 | inline Standard_Integer Approx_SweepApproximation::UDegree() const |
31 | { |
32 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
33 | return udeg; |
34 | } |
35 | |
36 | |
37 | inline Standard_Integer Approx_SweepApproximation::VDegree() const |
38 | { |
39 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
40 | return vdeg; |
41 | } |
42 | |
43 | |
44 | inline const TColgp_Array2OfPnt& Approx_SweepApproximation::SurfPoles() const |
45 | { |
46 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
47 | return tabPoles->Array2(); |
48 | } |
49 | |
50 | |
51 | inline const TColStd_Array2OfReal& Approx_SweepApproximation::SurfWeights() const |
52 | { |
53 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
54 | return tabWeights->Array2(); |
55 | } |
56 | |
57 | |
58 | inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfUKnots() const |
59 | { |
60 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
61 | return tabUKnots->Array1(); |
62 | } |
63 | |
64 | |
65 | inline const TColStd_Array1OfReal& Approx_SweepApproximation::SurfVKnots() const |
66 | { |
67 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
68 | return tabVKnots->Array1(); |
69 | } |
70 | |
71 | |
72 | inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfUMults() const |
73 | { |
74 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
75 | return tabUMults->Array1(); |
76 | } |
77 | |
78 | |
79 | inline const TColStd_Array1OfInteger& Approx_SweepApproximation::SurfVMults() const |
80 | { |
81 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
82 | return tabVMults->Array1(); |
83 | } |
84 | |
85 | |
86 | inline Standard_Integer Approx_SweepApproximation::NbCurves2d() const |
87 | { |
88 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
89 | return Num2DSS; |
90 | } |
91 | |
92 | |
93 | inline Standard_Integer Approx_SweepApproximation::Curves2dDegree() const |
94 | { |
95 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
96 | if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();} |
97 | return deg2d; |
98 | } |
99 | |
100 | |
101 | inline const TColgp_Array1OfPnt2d& Approx_SweepApproximation::Curve2dPoles(const Standard_Integer Index) const |
102 | { |
103 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
104 | if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();} |
105 | return seqPoles2d(Index)->Array1(); |
106 | } |
107 | |
108 | |
109 | inline const TColStd_Array1OfReal& Approx_SweepApproximation::Curves2dKnots() const |
110 | { |
111 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
112 | if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();} |
113 | return tab2dKnots->Array1(); |
114 | } |
115 | |
116 | |
117 | inline const TColStd_Array1OfInteger& Approx_SweepApproximation::Curves2dMults() const |
118 | { |
119 | if (!done) {StdFail_NotDone::Raise(" Approx_SweepApproximation");} |
120 | if (seqPoles2d.Length() == 0) {Standard_DomainError::Raise();} |
121 | return tab2dMults->Array1(); |
122 | } |
123 | |
124 | /* |
125 | inline void Approx_SweepApproximation::TolReached(Standard_Real& Tol3d,Standard_Real& Tol2d) const |
126 | { |
127 | |
128 | }*/ |