Warning, /include/opencascade/Approx_SweepApproximation.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1997-06-26
0002 // Created by: Philippe MANGIN
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016
0017 #include <StdFail_NotDone.hxx>
0018 #include <Standard_Integer.hxx>
0019 #include <NCollection_Array1.hxx>
0020 #include <NCollection_HArray1.hxx>
0021 #include <NCollection_Array2.hxx>
0022 #include <NCollection_HArray2.hxx>
0023 #include <gp_Pnt2d.hxx>
0024 #include <gp_Pnt.hxx>
0025
0026 inline bool Approx_SweepApproximation::IsDone() const
0027 {
0028 return done;
0029 }
0030
0031 inline int Approx_SweepApproximation::UDegree() const
0032 {
0033 if (!done)
0034 {
0035 throw StdFail_NotDone(" Approx_SweepApproximation");
0036 }
0037 return udeg;
0038 }
0039
0040 inline int Approx_SweepApproximation::VDegree() const
0041 {
0042 if (!done)
0043 {
0044 throw StdFail_NotDone(" Approx_SweepApproximation");
0045 }
0046 return vdeg;
0047 }
0048
0049 inline const NCollection_Array2<gp_Pnt>& Approx_SweepApproximation::SurfPoles() const
0050 {
0051 if (!done)
0052 {
0053 throw StdFail_NotDone(" Approx_SweepApproximation");
0054 }
0055 return tabPoles->Array2();
0056 }
0057
0058 inline const NCollection_Array2<double>& Approx_SweepApproximation::SurfWeights() const
0059 {
0060 if (!done)
0061 {
0062 throw StdFail_NotDone(" Approx_SweepApproximation");
0063 }
0064 return tabWeights->Array2();
0065 }
0066
0067 inline const NCollection_Array1<double>& Approx_SweepApproximation::SurfUKnots() const
0068 {
0069 if (!done)
0070 {
0071 throw StdFail_NotDone(" Approx_SweepApproximation");
0072 }
0073 return tabUKnots->Array1();
0074 }
0075
0076 inline const NCollection_Array1<double>& Approx_SweepApproximation::SurfVKnots() const
0077 {
0078 if (!done)
0079 {
0080 throw StdFail_NotDone(" Approx_SweepApproximation");
0081 }
0082 return tabVKnots->Array1();
0083 }
0084
0085 inline const NCollection_Array1<int>& Approx_SweepApproximation::SurfUMults() const
0086 {
0087 if (!done)
0088 {
0089 throw StdFail_NotDone(" Approx_SweepApproximation");
0090 }
0091 return tabUMults->Array1();
0092 }
0093
0094 inline const NCollection_Array1<int>& Approx_SweepApproximation::SurfVMults() const
0095 {
0096 if (!done)
0097 {
0098 throw StdFail_NotDone(" Approx_SweepApproximation");
0099 }
0100 return tabVMults->Array1();
0101 }
0102
0103 inline int Approx_SweepApproximation::NbCurves2d() const
0104 {
0105 if (!done)
0106 {
0107 throw StdFail_NotDone(" Approx_SweepApproximation");
0108 }
0109 return Num2DSS;
0110 }
0111
0112 inline int Approx_SweepApproximation::Curves2dDegree() const
0113 {
0114 if (!done)
0115 {
0116 throw StdFail_NotDone(" Approx_SweepApproximation");
0117 }
0118 if (seqPoles2d.Length() == 0)
0119 {
0120 throw Standard_DomainError();
0121 }
0122 return deg2d;
0123 }
0124
0125 inline const NCollection_Array1<gp_Pnt2d>& Approx_SweepApproximation::Curve2dPoles(
0126 const int Index) const
0127 {
0128 if (!done)
0129 {
0130 throw StdFail_NotDone(" Approx_SweepApproximation");
0131 }
0132 if (seqPoles2d.Length() == 0)
0133 {
0134 throw Standard_DomainError();
0135 }
0136 return seqPoles2d(Index)->Array1();
0137 }
0138
0139 inline const NCollection_Array1<double>& Approx_SweepApproximation::Curves2dKnots() const
0140 {
0141 if (!done)
0142 {
0143 throw StdFail_NotDone(" Approx_SweepApproximation");
0144 }
0145 if (seqPoles2d.Length() == 0)
0146 {
0147 throw Standard_DomainError();
0148 }
0149 return tab2dKnots->Array1();
0150 }
0151
0152 inline const NCollection_Array1<int>& Approx_SweepApproximation::Curves2dMults() const
0153 {
0154 if (!done)
0155 {
0156 throw StdFail_NotDone(" Approx_SweepApproximation");
0157 }
0158 if (seqPoles2d.Length() == 0)
0159 {
0160 throw Standard_DomainError();
0161 }
0162 return tab2dMults->Array1();
0163 }
0164
0165 /*
0166 inline void Approx_SweepApproximation::TolReached(double& Tol3d,double& Tol2d) const
0167 {
0168
0169 }*/