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